Support for Marvell AHCI interface on Armada 38x
Subsystems (4)
v2 cover Support for Marvell AHCI interface on Armada 38x
Hello,
The Marvell Armada 38x ARM processors use an AHCI compatible interface for SATA (in replacement of the Marvell-specific SATA interface, handled by the sata_mv driver). However, like all DMA-capable Marvell interfaces, some specific MBus window configuration must be done, so a small specific glue layer is needed, which relies on the recently introduced libahci_platform.c.
Changes since v1:
* Rebased on top of v3.15-rc1
* Added a preliminary patch that orders alphabetically the list of compatible strings in the DT binding document ahci-platform.txt. Suggested by Andrew Lunn.
* Made the availability of MBus DRAM window informations mandatory. Suggested by Andrew Lunn.
* Fixed the module alias name. Suggested by Bartlomiej Zolnierkiewicz.
Details of the patches:
* The first patch is a DT binding documentation cleanup. I believe it should be taken by the ATA maintainer, because the second patch (driver patch) depends on it.
* The second patch of this series contains the driver itself, which is fairly straight-forward. It should be taken by Tejun Heo as the ATA maintainer.
* The last three patches add the Device Tree and defconfig changes. They should be taken by the respective ARM maintainers (mvebu maintainers for the DT and mvebu_v7_defconfig, and arm-soc maintainers for the multi_v7_defconfig change).
Thanks!
Thomas
Thomas Petazzoni (5):
Documentation: dt-bindings: reformat and order list of ahci-platform
compatibles
ata: ahci_mvebu: new driver for Marvell Armada 380 AHCI interfaces
ARM: mvebu: add Device Tree description of AHCI interfaces on Armada
38x
ARM: configs: add ahci_mvebu to mvebu_v7_defconfig
ARM: configs: add ahci_mvebu to multi_v7_defconfig
.../devicetree/bindings/ata/ahci-platform.txt | 13 ++- arch/arm/boot/dts/armada-385-db.dts | 8 ++ arch/arm/boot/dts/armada-38x.dtsi | 16 +++ arch/arm/configs/multi_v7_defconfig | 1 + arch/arm/configs/mvebu_v7_defconfig | 1 + drivers/ata/Kconfig | 9 ++ drivers/ata/Makefile | 1 + drivers/ata/ahci_mvebu.c | 107 +++++++++++++++++++++ 8 files changed, 152 insertions(+), 4 deletions(-) create mode 100644 drivers/ata/ahci_mvebu.c
Signature · 1 line
1.8.3.2
PATCH v2 1/5 Documentation: dt-bindings: reformat and order list of ahci-platform compatibles
The ahci-platform.txt Device Tree binding documentation is gaining a growing number of compatible strings, and it will gain one more with the addition of the Marvell Armada 380 AHCI support. It is therefore time to reformat this list into a proper bullet list, and more importantly order it alphabetically;
--- Documentation/devicetree/bindings/ata/ahci-platform.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/ata/ahci-platform.txt +8 -4
@@ -4,10 +4,14 @@ SATA nodes are defined to describe on-chip Serial ATA controllers. Each SATA controller should have its own node. Required properties: -- compatible : compatible list, one of "snps,spear-ahci", - "snps,exynos5440-ahci", "ibm,476gtr-ahci", - "allwinner,sun4i-a10-ahci", "fsl,imx53-ahci" - "fsl,imx6q-ahci" or "snps,dwc-ahci" +- compatible : compatible string, one of: + - "allwinner,sun4i-a10-ahci" + - "fsl,imx53-ahci" + - "fsl,imx6q-ahci" + - "ibm,476gtr-ahci" + - "snps,dwc-ahci" + - "snps,exynos5440-ahci" + - "snps,spear-ahci" - interrupts : <interrupt mapping for SATA IRQ> - reg : <registers mapping>
Signature · 1 line
1.8.3.2
Andrew Lunn
maintainerPATCH v2 1/5 Documentation: dt-bindings: reformat and order list of ahci-platform compatibles
Quoted 8 lines · Thomas Petazzoni
The ahci-platform.txt Device Tree binding documentation is gaining a growing number of compatible strings, and it will gain one more with the addition of the Marvell Armada 380 AHCI support. It is therefore time to reformat this list into a proper bullet list, and more importantly order it alphabetically;
Suggested-by Andrew Lunn <[email protected]>Signed-off-by Thomas Petazzoni <[email protected]>
Thanks Thomas
Andrew
Quoted 30 lines
--- Documentation/devicetree/bindings/ata/ahci-platform.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)Documentation/devicetree/bindings/ata/ahci-platform.txt +8
-4@@ -4,10 +4,14 @@ SATA nodes are defined to describe on-chip Serial ATA controllers. Each SATA controller should have its own node. Required properties: -- compatible : compatible list, one of "snps,spear-ahci", - "snps,exynos5440-ahci", "ibm,476gtr-ahci", - "allwinner,sun4i-a10-ahci", "fsl,imx53-ahci" - "fsl,imx6q-ahci" or "snps,dwc-ahci" +- compatible : compatible string, one of: + - "allwinner,sun4i-a10-ahci" + - "fsl,imx53-ahci" + - "fsl,imx6q-ahci" + - "ibm,476gtr-ahci" + - "snps,dwc-ahci" + - "snps,exynos5440-ahci" + - "snps,spear-ahci" - interrupts : <interrupt mapping for SATA IRQ> - reg : <registers mapping>Signature · 1 line
1.8.3.2
PATCH v2 2/5 ata: ahci_mvebu: new driver for Marvell Armada 380 AHCI interfaces
In reply to Thomas PetazzoniThe Marvell Armada 380 SoC includes two AHCI compatible interfaces. However, like all DMA-capable Marvell interface, they require special handling to configure MBus windows. Therefore, this commit adds a new ahci_mvebu driver, which relies on the libahci_platform.c code recently introduced.
--- .../devicetree/bindings/ata/ahci-platform.txt | 1 + drivers/ata/Kconfig | 9 ++ drivers/ata/Makefile | 1 + drivers/ata/ahci_mvebu.c | 107 +++++++++++++++++++++ 4 files changed, 118 insertions(+) create mode 100644 drivers/ata/ahci_mvebu.c
Documentation/devicetree/bindings/ata/ahci-platform.txt +1 -0
@@ -9,6 +9,7 @@ Required properties: - "fsl,imx53-ahci" - "fsl,imx6q-ahci" - "ibm,476gtr-ahci" + - "marvell,armada-380-ahci" - "snps,dwc-ahci" - "snps,exynos5440-ahci" - "snps,spear-ahci"
drivers/ata/Kconfig +9 -0
@@ -123,6 +123,15 @@ config AHCI_IMX If unsure, say N. +config AHCI_MVEBU + tristate "Marvell EBU AHCI SATA support" + depends on ARCH_MVEBU + help + This option enables support for the Marvebu EBU SoC's + onboard AHCI SATA. + + If unsure, say N. + config AHCI_SUNXI tristate "Allwinner sunxi AHCI SATA support" depends on ARCH_SUNXI
drivers/ata/Makefile +1 -0
@@ -12,6 +12,7 @@ obj-$(CONFIG_SATA_DWC) += sata_dwc_460ex.o obj-$(CONFIG_SATA_HIGHBANK) += sata_highbank.o libahci.o obj-$(CONFIG_AHCI_DA850) += ahci_da850.o libahci.o libahci_platform.o obj-$(CONFIG_AHCI_IMX) += ahci_imx.o libahci.o libahci_platform.o +obj-$(CONFIG_AHCI_MVEBU) += ahci_mvebu.o libahci.o libahci_platform.o obj-$(CONFIG_AHCI_SUNXI) += ahci_sunxi.o libahci.o libahci_platform.o obj-$(CONFIG_AHCI_ST) += ahci_st.o libahci.o libahci_platform.o obj-$(CONFIG_AHCI_XGENE) += ahci_xgene.o libahci.o libahci_platform.o
drivers/ata/ahci_mvebu.c new file +107 -0
107 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v2 3/5 ARM: mvebu: add Device Tree description of AHCI interfaces on Armada 38x
In reply to Thomas PetazzoniThe Marvell Armada 38x processors contain two AHCI compatible interfaces. This commit adds the Device Tree description of those interfaces at the SoC level, and also enables them on the Armada 385 DB platform, which allows access to both interfaces through SATA ports.
--- arch/arm/boot/dts/armada-385-db.dts | 8 ++++++++ arch/arm/boot/dts/armada-38x.dtsi | 16 ++++++++++++++++ 2 files changed, 24 insertions(+)
arch/arm/boot/dts/armada-385-db.dts +8 -0
@@ -81,6 +81,14 @@ }; }; + sata at a8000 { + status = "okay"; + }; + + sata at e0000 { + status = "okay"; + }; + flash at d0000 { status = "okay"; num-cs = <1>;
arch/arm/boot/dts/armada-38x.dtsi +16 -0
@@ -338,6 +338,22 @@ reg = <0x72004 0x4>; }; + sata at a8000 { + compatible = "marvell,armada-380-ahci"; + reg = <0xa8000 0x2000>; + interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&gateclk 15>; + status = "disabled"; + }; + + sata at e0000 { + compatible = "marvell,armada-380-ahci"; + reg = <0xe0000 0x2000>; + interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&gateclk 30>; + status = "disabled"; + }; + coredivclk: clock at e4250 { compatible = "marvell,armada-380-corediv-clock"; reg = <0xe4250 0xc>;
Signature · 1 line
1.8.3.2
PATCH v2 4/5 ARM: configs: add ahci_mvebu to mvebu_v7_defconfig
In reply to Thomas PetazzoniThe Marvell Armada 38x platform needs the ahci_mvebu driver enabled for the AHCI interfaces, so this commit enables the corresponding Kconfig option in mvebu_v7_defconfig.
--- arch/arm/configs/mvebu_v7_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/mvebu_v7_defconfig +1 -0
@@ -36,6 +36,7 @@ CONFIG_CFG80211=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_BLK_DEV_SD=y CONFIG_ATA=y +CONFIG_AHCI_MVEBU=y CONFIG_SATA_MV=y CONFIG_NETDEVICES=y CONFIG_MVNETA=y
Signature · 1 line
1.8.3.2
PATCH v2 5/5 ARM: configs: add ahci_mvebu to multi_v7_defconfig
In reply to Thomas PetazzoniThe Marvell Armada 38x platform needs the ahci_mvebu driver enabled for the AHCI interfaces, so this commit enables the corresponding Kconfig option in multi_v7_defconfig.
--- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/multi_v7_defconfig +1 -0
@@ -116,6 +116,7 @@ CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SR=y CONFIG_SCSI_MULTI_LUN=y CONFIG_ATA=y +CONFIG_AHCI_MVEBU=y CONFIG_SATA_AHCI_PLATFORM=y CONFIG_SATA_HIGHBANK=y CONFIG_SATA_MV=y
Signature · 1 line
1.8.3.2
Andrew Lunn
maintainerv2 cover Support for Marvell AHCI interface on Armada 38x
In reply to Thomas PetazzoniQuoted 17 lines · Thomas Petazzoni
Hello,
The Marvell Armada 38x ARM processors use an AHCI compatible interface for SATA (in replacement of the Marvell-specific SATA interface, handled by the
sata_mvdriver). However, like all DMA-capable Marvell interfaces, some specific MBus window configuration must be done, so a small specific glue layer is needed, which relies on the recently introducedlibahci_platform.c.Changes since v1:
* Rebased on top of v3.15-rc1
* Added a preliminary patch that orders alphabetically the list of compatible strings in the DT binding document ahci-platform.txt. Suggested by Andrew Lunn.
Quoted 5 lines
* Made the availability of MBus DRAM window informations mandatory. Suggested by Andrew Lunn.
* Fixed the module alias name. Suggested by Bartlomiej Zolnierkiewicz.
Andrew
Quoted 43 lines
Details of the patches:
* The first patch is a DT binding documentation cleanup. I believe it should be taken by the ATA maintainer, because the second patch (driver patch) depends on it.
* The second patch of this series contains the driver itself, which is fairly straight-forward. It should be taken by Tejun Heo as the ATA maintainer.
* The last three patches add the Device Tree and defconfig changes. They should be taken by the respective ARM maintainers (mvebu maintainers for the DT and
mvebu_v7_defconfig, and arm-soc maintainers for themulti_v7_defconfigchange).Thanks!
Thomas
Thomas Petazzoni (5):
Documentation: dt-bindings: reformat and order list of ahci-platform
compatibles
ata:ahci_mvebu: new driver for Marvell Armada 380 AHCI interfaces
ARM: mvebu: add Device Tree description of AHCI interfaces on Armada38xARM: configs: add
ahci_mvebutomvebu_v7_defconfig
ARM: configs: addahci_mvebutomulti_v7_defconfig.../devicetree/bindings/ata/ahci-platform.txt | 13 ++- arch/arm/boot/dts/armada-385-db.dts | 8 ++ arch/arm/boot/dts/armada-38x.dtsi | 16 +++ arch/arm/configs/multi_v7_defconfig | 1 + arch/arm/configs/mvebu_v7_defconfig | 1 + drivers/ata/Kconfig | 9 ++ drivers/ata/Makefile | 1 + drivers/ata/ahci_mvebu.c | 107 +++++++++++++++++++++ 8 files changed, 152 insertions(+), 4 deletions(-) create mode 100644 drivers/ata/ahci_mvebu.cSignature · 1 line
1.8.3.2
v2 cover Support for Marvell AHCI interface on Armada 38x
In reply to Thomas PetazzoniHi,
Quoted 17 lines · Thomas Petazzoni
Hello,
The Marvell Armada 38x ARM processors use an AHCI compatible interface for SATA (in replacement of the Marvell-specific SATA interface, handled by the
sata_mvdriver). However, like all DMA-capable Marvell interfaces, some specific MBus window configuration must be done, so a small specific glue layer is needed, which relies on the recently introducedlibahci_platform.c.Changes since v1:
* Rebased on top of v3.15-rc1
* Added a preliminary patch that orders alphabetically the list of compatible strings in the DT binding document ahci-platform.txt. Suggested by Andrew Lunn.
Quoted 5 lines
* Made the availability of MBus DRAM window informations mandatory. Suggested by Andrew Lunn.
* Fixed the module alias name. Suggested by Bartlomiej Zolnierkiewicz.
Well, you could have also added a comment explaining the lack of the Power Management support..
Quoted 6 lines
Details of the patches:
* The first patch is a DT binding documentation cleanup. I believe it should be taken by the ATA maintainer, because the second patch (driver patch) depends on it.
Quoted 8 lines
* The second patch of this series contains the driver itself, which is fairly straight-forward. It should be taken by Tejun Heo as the ATA maintainer.
* The last three patches add the Device Tree and defconfig changes. They should be taken by the respective ARM maintainers (mvebu maintainers for the DT and
mvebu_v7_defconfig, and arm-soc maintainers for themulti_v7_defconfigchange).
Anyway, all patches look OK to me.
Quoted 13 lines
Thanks!
Thomas
Thomas Petazzoni (5):
Documentation: dt-bindings: reformat and order list of ahci-platform
compatibles
ata:ahci_mvebu: new driver for Marvell Armada 380 AHCI interfaces
ARM: mvebu: add Device Tree description of AHCI interfaces on Armada38xARM: configs: add
ahci_mvebutomvebu_v7_defconfig
ARM: configs: addahci_mvebutomulti_v7_defconfig
Quoted 10 lines
.../devicetree/bindings/ata/ahci-platform.txt | 13 ++- arch/arm/boot/dts/armada-385-db.dts | 8 ++ arch/arm/boot/dts/armada-38x.dtsi | 16 +++ arch/arm/configs/multi_v7_defconfig | 1 + arch/arm/configs/mvebu_v7_defconfig | 1 + drivers/ata/Kconfig | 9 ++ drivers/ata/Makefile | 1 + drivers/ata/ahci_mvebu.c | 107 +++++++++++++++++++++ 8 files changed, 152 insertions(+), 4 deletions(-) create mode 100644 drivers/ata/ahci_mvebu.c
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
v2 cover Support for Marvell AHCI interface on Armada 38x
Dear Bartlomiej Zolnierkiewicz,
Quoted 5 lines · Bartlomiej Zolnierkiewicz
Quoted 2 lines
* Fixed the module alias name. Suggested by Bartlomiej Zolnierkiewicz.
Well, you could have also added a comment explaining the lack of the Power Management support..
True, sorry for this. Should I resend a new version of the patch series with an indication about this in the commit log? Or is this OK as it is?
Note that working on power management support is part of our mid-term TODO list for this platform, so it will not remain unimplemented forever.
Quoted 3 lines
Anyway, all patches look OK to me.
Reviewed-by Bartlomiej Zolnierkiewicz <[email protected]>
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
v2 cover Support for Marvell AHCI interface on Armada 38x
Quoted 4 lines · Thomas Petazzoni
Dear Bartlomiej Zolnierkiewicz,
On Mon, 14 Apr 2014 17:53:37 +0200, Bartlomiej Zolnierkiewicz wrote:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
* Fixed the module alias name. Suggested by Bartlomiej Zolnierkiewicz.
Well, you could have also added a comment explaining the lack of the Power Management support..
True, sorry for this. Should I resend a new version of the patch series with an indication about this in the commit log? Or is this OK as it is?
Please include the comment in the next revision if this is not too much trouble (I assume that you would like to do another re-spin just to add Acked-by/Reviewed-by tags anyway).
Quoted 3 lines
Note that working on power management support is part of our mid-term TODO list for this platform, so it will not remain unimplemented forever.
OK, good to hear that.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
v2 cover Support for Marvell AHCI interface on Armada 38x
Dear Bartlomiej Zolnierkiewicz,
Quoted 11 lines · Bartlomiej Zolnierkiewicz
Quoted 10 lines · Thomas Petazzoni
Dear Bartlomiej Zolnierkiewicz,
Quoted 5 lines · Bartlomiej Zolnierkiewicz
Quoted 2 lines
* Fixed the module alias name. Suggested by Bartlomiej Zolnierkiewicz.
Well, you could have also added a comment explaining the lack of the Power Management support..
Quoted 6 lines
Quoted 2 lines
True, sorry for this. Should I resend a new version of the patch series with an indication about this in the commit log? Or is this OK as it is?
Please include the comment in the next revision if this is not too much trouble (I assume that you would like to do another re-spin just to add Acked-by/Reviewed-by tags anyway).
Well, I wasn't planning on re-spinning just to add Acked-by/Reviewed-by tags, as those are generally added by the subsystem maintainers when applying the patches. Though if Tejun says otherwise, I can definitely re-spin without any problem.
Tejun, just let me know what you prefer.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
v2 cover Support for Marvell AHCI interface on Armada 38x
Quoted 21 lines · Thomas Petazzoni
Dear Bartlomiej Zolnierkiewicz,
Quoted 11 lines · Bartlomiej Zolnierkiewicz
Quoted 10 lines · Thomas Petazzoni
Dear Bartlomiej Zolnierkiewicz,
Quoted 5 lines · Bartlomiej Zolnierkiewicz
Quoted 2 lines
* Fixed the module alias name. Suggested by Bartlomiej Zolnierkiewicz.
Well, you could have also added a comment explaining the lack of the Power Management support..
Quoted 6 lines
Quoted 2 lines
True, sorry for this. Should I resend a new version of the patch series with an indication about this in the commit log? Or is this OK as it is?
Please include the comment in the next revision if this is not too much trouble (I assume that you would like to do another re-spin just to add Acked-by/Reviewed-by tags anyway).
Quoted 6 lines
Well, I wasn't planning on re-spinning just to add Acked-by/Reviewed-by tags, as those are generally added by the subsystem maintainers when applying the patches. Though if Tejun says otherwise, I can definitely re-spin without any problem.
Tejun, just let me know what you prefer.
I can collect the -by's but better patch description is always nice. Maybe just update the patch description and post that one as reply to the patch posted in this thread? Also, how do you want the patches to be routed? Can all go through libata?
Signature · 1 line
tejun
v2 cover Support for Marvell AHCI interface on Armada 38x
Dear Tejun Heo,
Quoted 10 lines · Tejun Heo
Quoted 6 lines
Well, I wasn't planning on re-spinning just to add Acked-by/Reviewed-by tags, as those are generally added by the subsystem maintainers when applying the patches. Though if Tejun says otherwise, I can definitely re-spin without any problem.
Tejun, just let me know what you prefer.
I can collect the -by's but better patch description is always nice. Maybe just update the patch description and post that one as reply to the patch posted in this thread?
Actually, Bartlomiej wanted the comment about the power management features to be made in the code itself, rather than in the commit log, so I guess I'll just respin the patch series. Expect a v3 tomorrow with this change.
Quoted 1 line
Also, how do you want the patches to be routed? Can all go through libata?
As written in the cover letter, I'd expect patches 1 and 2 to go through libata, and then patches 3, 4 and 5 to go through arm-soc. The reason is that patches 3, 4 and 5 modifies the Device Tree files and the ARM defconfigs, which are likely to also be changed by other commits in the same cycle. However, the DT binding documentation change and the driver change are independent, so they can go through libata.
I guess Jason Cooper, who handles the patch merging for mvebu platforms, can confirm (or not?) this proposal.
Thanks a lot for the feedback!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
v2 cover Support for Marvell AHCI interface on Armada 38x
Quoted 10 lines · Thomas Petazzoni
Quoted 1 line · Tejun Heo
Also, how do you want the patches to be routed? Can all go through libata?
As written in the cover letter, I'd expect patches 1 and 2 to go through libata, and then patches 3, 4 and 5 to go through arm-soc. The reason is that patches 3, 4 and 5 modifies the Device Tree files and the ARM defconfigs, which are likely to also be changed by other commits in the same cycle. However, the DT binding documentation change and the driver change are independent, so they can go through libata.
Quoted 2 lines
I guess Jason Cooper, who handles the patch merging for mvebu platforms, can confirm (or not?) this proposal.
Yep, this is how we do it. The only caveat is if there are going to be changes during this window that depend on the driver changes in this series. Then we would ask to set up a topic branch.
That happens a little more frequently now that we have boards in the boot farm testing linux-next and other trees. It means we also care about boot-time dependencies as well as build deps.
I'll take a closer look at this series in the next few days and let you know.
thx,
Jason.