All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bus: ti-sysc: fix uclass driver id
@ 2021-03-15 21:18 Dario Binacchi
  2021-03-16  2:28 ` Simon Glass
  0 siblings, 1 reply; 2+ messages in thread
From: Dario Binacchi @ 2021-03-15 21:18 UTC (permalink / raw)
  To: u-boot

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 */
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] bus: ti-sysc: fix uclass driver id
  2021-03-15 21:18 [PATCH] bus: ti-sysc: fix uclass driver id Dario Binacchi
@ 2021-03-16  2:28 ` Simon Glass
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2021-03-16  2:28 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-16  2:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 21:18 [PATCH] bus: ti-sysc: fix uclass driver id Dario Binacchi
2021-03-16  2:28 ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.