aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2016-09-08 07:47:37 +0100
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2016-09-21 15:04:32 +0200
commit8291bc87474ae2eb8564447a5c474f5d2a45836c (patch)
treeb951ef5b3aad2f7ea0341a1b62c12334f022e1ea /drivers
parentce701721596618afc0affc50f1708ece156891f9 (diff)
downloadu-boot-8291bc87474ae2eb8564447a5c474f5d2a45836c.zip
u-boot-8291bc87474ae2eb8564447a5c474f5d2a45836c.tar.gz
u-boot-8291bc87474ae2eb8564447a5c474f5d2a45836c.tar.bz2
dm: syscon: Provide a generic syscon driver
Provide a trivial syscon driver matching the generic "syscon" compatible string, allowing for simple system controllers to be used without a custom driver just as in Linux. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/core/syscon-uclass.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/core/syscon-uclass.c b/drivers/core/syscon-uclass.c
index 01bd968..2148469 100644
--- a/drivers/core/syscon-uclass.c
+++ b/drivers/core/syscon-uclass.c
@@ -95,3 +95,14 @@ UCLASS_DRIVER(syscon) = {
.per_device_auto_alloc_size = sizeof(struct syscon_uc_info),
.pre_probe = syscon_pre_probe,
};
+
+static const struct udevice_id generic_syscon_ids[] = {
+ { .compatible = "syscon" },
+ { }
+};
+
+U_BOOT_DRIVER(generic_syscon) = {
+ .name = "syscon",
+ .id = UCLASS_SYSCON,
+ .of_match = generic_syscon_ids,
+};