Message ID | 1534356079-2986-1-git-send-email-ley.foon.tan@intel.com |
---|---|
State | Deferred |
Delegated to: | Tom Rini |
Headers | show |
Series | [U-Boot] arm: dts: socfpga: stratix10: Move reset manager node to top | expand |
On 08/15/2018 08:01 PM, Ley Foon Tan wrote: > Move reset manager node to top, so reset driver can be load before > other drivers. Peripheral drivers have dependency on reset framework > to reset the hardware. > > Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com> This will break the next time you sync DTs with Linux, NAK. The reset manager should just load when it's needed by other drivers. If it doesn't work that way, something is seriously broken and that is what needs to be fixed. > --- > arch/arm/dts/socfpga_stratix10.dtsi | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/arch/arm/dts/socfpga_stratix10.dtsi b/arch/arm/dts/socfpga_stratix10.dtsi > index ccd3f32..748a436 100644 > --- a/arch/arm/dts/socfpga_stratix10.dtsi > +++ b/arch/arm/dts/socfpga_stratix10.dtsi > @@ -87,6 +87,14 @@ > reg = <0xffd10000 0x1000>; > }; > > + rst: rstmgr@ffd11000 { > + #reset-cells = <1>; > + compatible = "altr,rst-mgr"; > + reg = <0xffd11000 0x1000>; > + altr,modrst-offset = <0x20>; > + u-boot,dm-pre-reloc; > + }; > + > gmac0: ethernet@ff800000 { > compatible = "altr,socfpga-stmmac", "snps,dwmac-3.74a", "snps,dwmac"; > reg = <0xff800000 0x2000>; > @@ -234,14 +242,6 @@ > reg = <0xffe00000 0x100000>; > }; > > - rst: rstmgr@ffd11000 { > - #reset-cells = <1>; > - compatible = "altr,rst-mgr"; > - reg = <0xffd11000 0x1000>; > - altr,modrst-offset = <0x20>; > - u-boot,dm-pre-reloc; > - }; > - > spi0: spi@ffda4000 { > compatible = "snps,dw-apb-ssi"; > #address-cells = <1>; >
On Wed, Aug 15, 2018 at 6:13 PM, Marek Vasut <marex@denx.de> wrote: > On 08/15/2018 08:01 PM, Ley Foon Tan wrote: >> Move reset manager node to top, so reset driver can be load before >> other drivers. Peripheral drivers have dependency on reset framework >> to reset the hardware. >> >> Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com> > > This will break the next time you sync DTs with Linux, NAK. > The reset manager should just load when it's needed by other drivers. If > it doesn't work that way, something is seriously broken and that is what > needs to be fixed. Yes, seem that it doesn't load the reset manager driver automatically when other driver depend on it. Notice this issue when enable reset framework in GPIO, GPIO driver is loaded at very beginning before go to command prompt. Found this can work in SPL, but not in U-boot (load reset manager driver automatically). Regards Ley Foon
On 08/15/2018 12:28 PM, Ley Foon Tan wrote: > On Wed, Aug 15, 2018 at 6:13 PM, Marek Vasut <marex@denx.de> wrote: >> On 08/15/2018 08:01 PM, Ley Foon Tan wrote: >>> Move reset manager node to top, so reset driver can be load before >>> other drivers. Peripheral drivers have dependency on reset framework >>> to reset the hardware. >>> >>> Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com> >> >> This will break the next time you sync DTs with Linux, NAK. >> The reset manager should just load when it's needed by other drivers. If >> it doesn't work that way, something is seriously broken and that is what >> needs to be fixed. > Yes, seem that it doesn't load the reset manager driver automatically > when other driver depend on it. > Notice this issue when enable reset framework in GPIO, GPIO driver is > loaded at very beginning before go to command prompt. > Found this can work in SPL, but not in U-boot (load reset manager > driver automatically). That's probably because you're using the reset in .bind instead of .probe , as it should be used ? .bind is ONLY for binding the driver with the DM core.
On Wed, Aug 15, 2018 at 6:31 PM, Marek Vasut <marex@denx.de> wrote: > On 08/15/2018 12:28 PM, Ley Foon Tan wrote: >> On Wed, Aug 15, 2018 at 6:13 PM, Marek Vasut <marex@denx.de> wrote: >>> On 08/15/2018 08:01 PM, Ley Foon Tan wrote: >>>> Move reset manager node to top, so reset driver can be load before >>>> other drivers. Peripheral drivers have dependency on reset framework >>>> to reset the hardware. >>>> >>>> Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com> >>> >>> This will break the next time you sync DTs with Linux, NAK. >>> The reset manager should just load when it's needed by other drivers. If >>> it doesn't work that way, something is seriously broken and that is what >>> needs to be fixed. >> Yes, seem that it doesn't load the reset manager driver automatically >> when other driver depend on it. >> Notice this issue when enable reset framework in GPIO, GPIO driver is >> loaded at very beginning before go to command prompt. >> Found this can work in SPL, but not in U-boot (load reset manager >> driver automatically). > > That's probably because you're using the reset in .bind instead of > .probe , as it should be used ? .bind is ONLY for binding the driver > with the DM core. > Yes, you are right. Will fix that. Regards Ley Foon
diff --git a/arch/arm/dts/socfpga_stratix10.dtsi b/arch/arm/dts/socfpga_stratix10.dtsi index ccd3f32..748a436 100644 --- a/arch/arm/dts/socfpga_stratix10.dtsi +++ b/arch/arm/dts/socfpga_stratix10.dtsi @@ -87,6 +87,14 @@ reg = <0xffd10000 0x1000>; }; + rst: rstmgr@ffd11000 { + #reset-cells = <1>; + compatible = "altr,rst-mgr"; + reg = <0xffd11000 0x1000>; + altr,modrst-offset = <0x20>; + u-boot,dm-pre-reloc; + }; + gmac0: ethernet@ff800000 { compatible = "altr,socfpga-stmmac", "snps,dwmac-3.74a", "snps,dwmac"; reg = <0xff800000 0x2000>; @@ -234,14 +242,6 @@ reg = <0xffe00000 0x100000>; }; - rst: rstmgr@ffd11000 { - #reset-cells = <1>; - compatible = "altr,rst-mgr"; - reg = <0xffd11000 0x1000>; - altr,modrst-offset = <0x20>; - u-boot,dm-pre-reloc; - }; - spi0: spi@ffda4000 { compatible = "snps,dw-apb-ssi"; #address-cells = <1>;
Move reset manager node to top, so reset driver can be load before other drivers. Peripheral drivers have dependency on reset framework to reset the hardware. Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com> --- arch/arm/dts/socfpga_stratix10.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)