ARM: dts: OMAP5 / DRA7: indicate that SATA port 0 is available.
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Mon, 9 Jan 2017 12:22:15 +0000 (13:22 +0100)
committerTony Lindgren <tony@atomide.com>
Fri, 13 Jan 2017 17:16:52 +0000 (09:16 -0800)
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.

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.

Cc: <stable@vger.kernel.org> # v4.6+
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Acked-by: Roger Quadros <rogerq@ti.com>
[tony@atomide.com: updated comments with what goes wrong]
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/dra7.dtsi
arch/arm/boot/dts/omap5.dtsi

index 1faf24acd521d3cc4ed22d24c8fe0ff469e9a30a..5ba161679e01f97c868266aee23b34c62d079c3a 100644 (file)
                        phy-names = "sata-phy";
                        clocks = <&sata_ref_clk>;
                        ti,hwmods = "sata";
+                       ports-implemented = <0x1>;
                };
 
                rtc: rtc@48838000 {
index 7cd92babc41a688cf8bb474972d053ea7b8b33d6..0844737b72b27c53b0c8ed88940abf5d2937d637 100644 (file)
                        phy-names = "sata-phy";
                        clocks = <&sata_ref_clk>;
                        ti,hwmods = "sata";
+                       ports-implemented = <0x1>;
                };
 
                dss: dss@58000000 {