diff mbox series

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

Message ID 20210316205145.4631-1-dariobin@libero.it
State Accepted
Commit 929e9940b0e4b9d7dfb0668ae1d7ce76a247b1e8
Delegated to: Tom Rini
Headers show
Series [v2] bus: ti-sysc: change in a normal driver | expand

Commit Message

Dario Binacchi March 16, 2021, 8:51 p.m. UTC
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(-)

Comments

Simon Glass March 17, 2021, 6:30 p.m. UTC | #1
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!
Tom Rini March 19, 2021, 8:42 p.m. UTC | #2
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!
Simon Glass March 19, 2021, 11:54 p.m. UTC | #3
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!
Tom Rini March 20, 2021, 1:06 a.m. UTC | #4
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?
Simon Glass March 20, 2021, 1:59 a.m. UTC | #5
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
Tom Rini March 20, 2021, 2:15 p.m. UTC | #6
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.
diff mbox series

Patch

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,