[PATCH] bus: ti-sysc: fix uclass driver id

The module defines a duplicate uclass driver for UCLASS_SIMPLE_BUS, but it is not allowed. This breaks of-platdata and makes the result non-deterministic. Since it must be an uclass driver to work properly, a new class id has been added.
Signed-off-by: Dario Binacchi dariobin@libero.it ---
drivers/bus/ti-sysc.c | 4 ++-- include/dm/uclass-id.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 4e3d610300..2d6bef02ba 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -149,14 +149,14 @@ clocks_err: }
UCLASS_DRIVER(ti_sysc) = { - .id = UCLASS_SIMPLE_BUS, + .id = UCLASS_SYSC, .name = "ti_sysc", .post_bind = dm_scan_fdt_dev };
U_BOOT_DRIVER(ti_sysc) = { .name = "ti_sysc", - .id = UCLASS_SIMPLE_BUS, + .id = UCLASS_SYSC, .of_match = ti_sysc_ids, .probe = ti_sysc_probe, .remove = ti_sysc_remove, diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index d75de368c5..1161d2032a 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -107,6 +107,7 @@ enum uclass_id { UCLASS_SPI_FLASH, /* SPI flash */ UCLASS_SPI_GENERIC, /* Generic SPI flash target */ UCLASS_SPMI, /* System Power Management Interface bus */ + UCLASS_SYSC, /* TI sysc interconnect target bus */ UCLASS_SYSCON, /* System configuration device */ UCLASS_SYSINFO, /* Device information from hardware */ UCLASS_SYSRESET, /* System reset device */

Hi Dario,
On Tue, 16 Mar 2021 at 10:18, Dario Binacchi dariobin@libero.it wrote:
The module defines a duplicate uclass driver for UCLASS_SIMPLE_BUS, but it is not allowed. This breaks of-platdata and makes the result non-deterministic. Since it must be an uclass driver to work properly, a new class id has been added.
Signed-off-by: Dario Binacchi dariobin@libero.it
drivers/bus/ti-sysc.c | 4 ++-- include/dm/uclass-id.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
If you add a new uclass you should have a sandbox test for it.
But I actually wonder if you need to...does this work if you simply remove your uclass driver? It should. What am I missing?
Regards, Simon
participants (2)
-
Dario Binacchi
-
Simon Glass