[PATCH v2] bus: ti-sysc: change in a normal driver

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.
The driver does not need to be an uclass driver, so lets remove it. I had turned it into an uclass driver because I thought wrongly it had to call the dm_scan_fdt_dev routine to work properly, but some tests on the board have shown otherwise.
Signed-off-by: Dario Binacchi dariobin@libero.it
---
Changes in v2: - Remove UCLASS_SYSC id. - Change ti-sysc in a normal driver instead of an uclass driver. Previous tests, where I had removed the uclass driver, failed because I added the dm_scan_fdt_dev routine to the driver bind routine (I moved it from the uclass driver post_bind routine to the normal driver bind one).
drivers/bus/ti-sysc.c | 6 ------ 1 file changed, 6 deletions(-)
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 4e3d610300..778c0654f6 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -148,12 +148,6 @@ clocks_err: return err; }
-UCLASS_DRIVER(ti_sysc) = { - .id = UCLASS_SIMPLE_BUS, - .name = "ti_sysc", - .post_bind = dm_scan_fdt_dev -}; - U_BOOT_DRIVER(ti_sysc) = { .name = "ti_sysc", .id = UCLASS_SIMPLE_BUS,

On Wed, 17 Mar 2021 at 09:51, 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.
The driver does not need to be an uclass driver, so lets remove it. I had turned it into an uclass driver because I thought wrongly it had to call the dm_scan_fdt_dev routine to work properly, but some tests on the board have shown otherwise.
Signed-off-by: Dario Binacchi dariobin@libero.it
Changes in v2:
- Remove UCLASS_SYSC id.
- Change ti-sysc in a normal driver instead of an uclass driver. Previous tests, where I had removed the uclass driver, failed because I added the dm_scan_fdt_dev routine to the driver bind routine (I moved it from the uclass driver post_bind routine to the normal driver bind one).
drivers/bus/ti-sysc.c | 6 ------ 1 file changed, 6 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
Thank you!

On Tue, Mar 16, 2021 at 09:51:44PM +0100, Dario Binacchi 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.
The driver does not need to be an uclass driver, so lets remove it. I had turned it into an uclass driver because I thought wrongly it had to call the dm_scan_fdt_dev routine to work properly, but some tests on the board have shown otherwise.
Signed-off-by: Dario Binacchi dariobin@libero.it Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

On Sat, 20 Mar 2021 at 09:42, Tom Rini trini@konsulko.com wrote:
On Tue, Mar 16, 2021 at 09:51:44PM +0100, Dario Binacchi 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.
The driver does not need to be an uclass driver, so lets remove it. I had turned it into an uclass driver because I thought wrongly it had to call the dm_scan_fdt_dev routine to work properly, but some tests on the board have shown otherwise.
Signed-off-by: Dario Binacchi dariobin@libero.it Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!
Also applied to u-boot-dm/next, thanks!

On Sat, Mar 20, 2021 at 12:54:00PM +1300, Simon Glass wrote:
On Sat, 20 Mar 2021 at 09:42, Tom Rini trini@konsulko.com wrote:
On Tue, Mar 16, 2021 at 09:51:44PM +0100, Dario Binacchi 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.
The driver does not need to be an uclass driver, so lets remove it. I had turned it into an uclass driver because I thought wrongly it had to call the dm_scan_fdt_dev routine to work properly, but some tests on the board have shown otherwise.
Signed-off-by: Dario Binacchi dariobin@libero.it Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!
Also applied to u-boot-dm/next, thanks!
Well, wait, no, why? -rc5 will get merged to -next in time I hope. Is this going to block other work in dm/next?

Hi Tom,
On Sat, 20 Mar 2021 at 14:06, Tom Rini trini@konsulko.com wrote:
On Sat, Mar 20, 2021 at 12:54:00PM +1300, Simon Glass wrote:
On Sat, 20 Mar 2021 at 09:42, Tom Rini trini@konsulko.com wrote:
On Tue, Mar 16, 2021 at 09:51:44PM +0100, Dario Binacchi 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.
The driver does not need to be an uclass driver, so lets remove it. I had turned it into an uclass driver because I thought wrongly it had to call the dm_scan_fdt_dev routine to work properly, but some tests on the board have shown otherwise.
Signed-off-by: Dario Binacchi dariobin@libero.it Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!
Also applied to u-boot-dm/next, thanks!
Well, wait, no, why? -rc5 will get merged to -next in time I hope. Is this going to block other work in dm/next?
Ah I'm about to send a pull request which fails without this. I can hold off if you like?
Regards, Simon

On Sat, Mar 20, 2021 at 02:59:05PM +1300, Simon Glass wrote:
Hi Tom,
On Sat, 20 Mar 2021 at 14:06, Tom Rini trini@konsulko.com wrote:
On Sat, Mar 20, 2021 at 12:54:00PM +1300, Simon Glass wrote:
On Sat, 20 Mar 2021 at 09:42, Tom Rini trini@konsulko.com wrote:
On Tue, Mar 16, 2021 at 09:51:44PM +0100, Dario Binacchi 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.
The driver does not need to be an uclass driver, so lets remove it. I had turned it into an uclass driver because I thought wrongly it had to call the dm_scan_fdt_dev routine to work properly, but some tests on the board have shown otherwise.
Signed-off-by: Dario Binacchi dariobin@libero.it Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!
Also applied to u-boot-dm/next, thanks!
Well, wait, no, why? -rc5 will get merged to -next in time I hope. Is this going to block other work in dm/next?
Ah I'm about to send a pull request which fails without this. I can hold off if you like?
Ah, OK. git should do the right thing in the end, I hope. I'll do a quick local test to confirm once you send me the PR.
participants (3)
-
Dario Binacchi
-
Simon Glass
-
Tom Rini