]> git.sur5r.net Git - u-boot/commitdiff
dm: syscon: Provide a generic syscon driver
authorPaul Burton <paul.burton@imgtec.com>
Thu, 8 Sep 2016 06:47:37 +0000 (07:47 +0100)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Wed, 21 Sep 2016 13:04:32 +0000 (15:04 +0200)
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>
drivers/core/syscon-uclass.c

index 01bd9683a7a757ccf20a9a769c83ee1555350cd6..2148469abc10e1e13468bc0ed58c695446d20c08 100644 (file)
@@ -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,
+};