devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: OMAP5 / DRA7: indicate that SATA port 0 is available.
@ 2017-01-09 12:22 Jean-Jacques Hiblot
  2017-01-12 22:30 ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Jean-Jacques Hiblot @ 2017-01-09 12:22 UTC (permalink / raw)
  To: bcousson, tony, linux-omap, devicetree
  Cc: rogerq, Jean-Jacques Hiblot, stable

AHCI provides the register PORTS_IMPL to let the software know which port
is supported. The register must be initialized by the bootloader. However
in some cases u-boot doesn't properly initialize this value (if it is not
compiled with SATA support for example or if the SATA initialization fails).
The DTS entry "ports-implemented" can be used to override the value in
PORTS_IMPL.
Adding this entry in the dts allows us no to worry about what is done by
the bootloader.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Acked-by: Roger Quadros <rogerq@ti.com>

Cc: <stable@vger.kernel.org> # v4.6+
---
 arch/arm/boot/dts/dra7.dtsi  | 1 +
 arch/arm/boot/dts/omap5.dtsi | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index 1faf24a..5ba1616 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -1378,6 +1378,7 @@
 			phy-names = "sata-phy";
 			clocks = <&sata_ref_clk>;
 			ti,hwmods = "sata";
+			ports-implemented = <0x1>;
 		};
 
 		rtc: rtc@48838000 {
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 7cd92ba..0844737 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -988,6 +988,7 @@
 			phy-names = "sata-phy";
 			clocks = <&sata_ref_clk>;
 			ti,hwmods = "sata";
+			ports-implemented = <0x1>;
 		};
 
 		dss: dss@58000000 {
-- 
1.9.1

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

* Re: [PATCH] ARM: dts: OMAP5 / DRA7: indicate that SATA port 0 is available.
  2017-01-09 12:22 [PATCH] ARM: dts: OMAP5 / DRA7: indicate that SATA port 0 is available Jean-Jacques Hiblot
@ 2017-01-12 22:30 ` Tony Lindgren
       [not found]   ` <20170112223007.GP2630-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2017-01-12 22:30 UTC (permalink / raw)
  To: Jean-Jacques Hiblot; +Cc: bcousson, linux-omap, devicetree, rogerq, stable

* Jean-Jacques Hiblot <jjhiblot@ti.com> [170109 04:23]:
> AHCI provides the register PORTS_IMPL to let the software know which port
> is supported. The register must be initialized by the bootloader. However
> in some cases u-boot doesn't properly initialize this value (if it is not
> compiled with SATA support for example or if the SATA initialization fails).
> The DTS entry "ports-implemented" can be used to override the value in
> PORTS_IMPL.
> Adding this entry in the dts allows us no to worry about what is done by
> the bootloader.

Adding into omap-for-v4.11/dt thanks.

Tony

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

* Re: [PATCH] ARM: dts: OMAP5 / DRA7: indicate that SATA port 0 is available.
       [not found]   ` <20170112223007.GP2630-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
@ 2017-01-12 22:36     ` Tony Lindgren
  2017-01-13  7:59       ` Jean-Jacques Hiblot
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2017-01-12 22:36 UTC (permalink / raw)
  To: Jean-Jacques Hiblot
  Cc: bcousson-rdvid1DuHRBWk0Htik3J/w,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, rogerq-l0cyMroinI0,
	stable-u79uwXL29TY76Z2rM5mHXA

* Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> [170112 14:31]:
> * Jean-Jacques Hiblot <jjhiblot-l0cyMroinI0@public.gmane.org> [170109 04:23]:
> > AHCI provides the register PORTS_IMPL to let the software know which port
> > is supported. The register must be initialized by the bootloader. However
> > in some cases u-boot doesn't properly initialize this value (if it is not
> > compiled with SATA support for example or if the SATA initialization fails).
> > The DTS entry "ports-implemented" can be used to override the value in
> > PORTS_IMPL.
> > Adding this entry in the dts allows us no to worry about what is done by
> > the bootloader.
> 
> Adding into omap-for-v4.11/dt thanks.

Actually not applying just yet as I just noticed you tagged this for stable.

Care to describe what breaks and on which devices without this patch?

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] ARM: dts: OMAP5 / DRA7: indicate that SATA port 0 is available.
  2017-01-12 22:36     ` Tony Lindgren
@ 2017-01-13  7:59       ` Jean-Jacques Hiblot
  2017-01-13 17:19         ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Jean-Jacques Hiblot @ 2017-01-13  7:59 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: bcousson, linux-omap, devicetree, rogerq, stable



On 12/01/2017 23:36, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [170112 14:31]:
>> * Jean-Jacques Hiblot <jjhiblot@ti.com> [170109 04:23]:
>>> AHCI provides the register PORTS_IMPL to let the software know which port
>>> is supported. The register must be initialized by the bootloader. However
>>> in some cases u-boot doesn't properly initialize this value (if it is not
>>> compiled with SATA support for example or if the SATA initialization fails).
>>> The DTS entry "ports-implemented" can be used to override the value in
>>> PORTS_IMPL.
>>> Adding this entry in the dts allows us no to worry about what is done by
>>> the bootloader.
>> Adding into omap-for-v4.11/dt thanks.
> Actually not applying just yet as I just noticed you tagged this for stable.
>
> Care to describe what breaks and on which devices without this patch?
Hi tony,

Without this patch the SATA will not work in the following two cases:
* if there has been a failure to initialize SATA in u-boot.
* if ahci_platform module has been removed and re-inserted. The reason 
is that the content of PORTS_IMPL is lost after the module is removed. I 
suspect that it's because the controller is reset by the hwmod.

Jean-Jacques
>
> Regards,
>
> Tony

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

* Re: [PATCH] ARM: dts: OMAP5 / DRA7: indicate that SATA port 0 is available.
  2017-01-13  7:59       ` Jean-Jacques Hiblot
@ 2017-01-13 17:19         ` Tony Lindgren
  0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2017-01-13 17:19 UTC (permalink / raw)
  To: Jean-Jacques Hiblot; +Cc: bcousson, linux-omap, devicetree, rogerq, stable

* Jean-Jacques Hiblot <jjhiblot@ti.com> [170113 00:00]:
> 
> 
> On 12/01/2017 23:36, Tony Lindgren wrote:
> > * Tony Lindgren <tony@atomide.com> [170112 14:31]:
> > > * Jean-Jacques Hiblot <jjhiblot@ti.com> [170109 04:23]:
> > > > AHCI provides the register PORTS_IMPL to let the software know which port
> > > > is supported. The register must be initialized by the bootloader. However
> > > > in some cases u-boot doesn't properly initialize this value (if it is not
> > > > compiled with SATA support for example or if the SATA initialization fails).
> > > > The DTS entry "ports-implemented" can be used to override the value in
> > > > PORTS_IMPL.
> > > > Adding this entry in the dts allows us no to worry about what is done by
> > > > the bootloader.
> > > Adding into omap-for-v4.11/dt thanks.
> > Actually not applying just yet as I just noticed you tagged this for stable.
> > 
> > Care to describe what breaks and on which devices without this patch?
> Hi tony,
> 
> Without this patch the SATA will not work in the following two cases:
> * if there has been a failure to initialize SATA in u-boot.
> * if ahci_platform module has been removed and re-inserted. The reason is
> that the content of PORTS_IMPL is lost after the module is removed. I
> suspect that it's because the controller is reset by the hwmod.

OK I'll add that to the comments and apply into omap-for-v4.10/fixes.

Thanks,

Tony

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

end of thread, other threads:[~2017-01-13 17:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-09 12:22 [PATCH] ARM: dts: OMAP5 / DRA7: indicate that SATA port 0 is available Jean-Jacques Hiblot
2017-01-12 22:30 ` Tony Lindgren
     [not found]   ` <20170112223007.GP2630-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2017-01-12 22:36     ` Tony Lindgren
2017-01-13  7:59       ` Jean-Jacques Hiblot
2017-01-13 17:19         ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).