bus: ti-sysc: fix uclass driver id
PATCH 1/1 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.
---
drivers/bus/ti-sysc.c | 4 ++-- include/dm/uclass-id.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/bus/ti-sysc.c +2 -2
@@ -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,
include/dm/uclass-id.h +1 -0
@@ -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 */
Signature · 1 line
2.17.1
PATCH 1/1 bus: ti-sysc: fix uclass driver id
Hi Dario,
Quoted 7 lines · Dario Binacchi
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.
Quoted 7 lines
Signed-off-by Dario Binacchi <[email protected]>---
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