From 53d2f8899f71a1b2ca4788cd74845daa683efb2e Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Fri, 26 Oct 2012 14:30:46 +0200 Subject: [PATCH 1/4] arm: mvebu: increase atomic coherent pool size for armada 370/XP For Armada 370/XP we have the same problem that for the commit cb01b63, so we applied the same solution: "The default 256 KiB coherent pool may be too small for some of the Kirkwood devices, so increase it to make sure that devices will be able to allocate their buffers with GFP_ATOMIC flag" Signed-off-by: Gregory CLEMENT Acked-by: Marek Szyprowski --- arch/arm/mach-mvebu/armada-370-xp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c index 3292d6da5dc7..cd6eac17fb67 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.c +++ b/arch/arm/mach-mvebu/armada-370-xp.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -44,6 +45,16 @@ void __init armada_370_xp_timer_and_clk_init(void) armada_370_xp_timer_init(); } +void __init armada_370_xp_init_early(void) +{ + /* + * Some Armada 370/XP devices allocate their coherent buffers + * from atomic context. Increase size of atomic coherent pool + * to make sure such the allocations won't fail. + */ + init_dma_coherent_pool_size(SZ_1M); +} + struct sys_timer armada_370_xp_timer = { .init = armada_370_xp_timer_and_clk_init, }; @@ -62,6 +73,7 @@ static const char * const armada_370_xp_dt_board_dt_compat[] = { DT_MACHINE_START(ARMADA_XP_DT, "Marvell Aramada 370/XP (Device Tree)") .init_machine = armada_370_xp_dt_init, .map_io = armada_370_xp_map_io, + .init_early = armada_370_xp_init_early, .init_irq = armada_370_xp_init_irq, .handle_irq = armada_370_xp_handle_irq, .timer = &armada_370_xp_timer, From a6a6de1a0a8479ad5c31392a9896dfd735e3c5f5 Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Fri, 26 Oct 2012 14:30:47 +0200 Subject: [PATCH 2/4] arm: mvebu: SATA support: SoC-level DT data for Armada 370/XP Signed-off-by: Gregory CLEMENT Signed-off-by: Lior Amsalem Signed-off-by: Thomas Petazzoni --- arch/arm/boot/dts/armada-370-xp.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index 94b4b9e03571..0abc8a16fc25 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi @@ -69,6 +69,16 @@ compatible = "marvell,armada-addr-decoding-controller"; reg = <0xd0020000 0x258>; }; + + sata@d00a0000 { + compatible = "marvell,orion-sata"; + reg = <0xd00a0000 0x2400>; + interrupts = <55>; + clocks = <&gateclk 15>, <&gateclk 30>; + clock-names = "0", "1"; + status = "disabled"; + }; + }; }; From 5872c6fe65626f7375249befe928e3e042192861 Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Fri, 26 Oct 2012 14:30:48 +0200 Subject: [PATCH 3/4] arm: mvebu: SATA support: mvebu_defconfig update Signed-off-by: Gregory CLEMENT Signed-off-by: Lior Amsalem Signed-off-by: Thomas Petazzoni --- arch/arm/configs/multi_v7_defconfig | 2 ++ arch/arm/configs/mvebu_defconfig | 3 +++ 2 files changed, 5 insertions(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 159f75fc4377..dbea6f4efe9f 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -17,8 +17,10 @@ CONFIG_ARM_APPENDED_DTB=y CONFIG_VFP=y CONFIG_NEON=y CONFIG_NET=y +CONFIG_BLK_DEV_SD=y CONFIG_ATA=y CONFIG_SATA_HIGHBANK=y +CONFIG_SATA_MV=y CONFIG_NETDEVICES=y CONFIG_NET_CALXEDA_XGMAC=y CONFIG_SMSC911X=y diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index 3458752c4bb2..cdec70600994 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -20,6 +20,9 @@ CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y CONFIG_VFP=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_BLK_DEV_SD=y +CONFIG_ATA=y +CONFIG_SATA_MV=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_OF_PLATFORM=y From 3d82daaaa6c7b91a534a54c7d123fe419155bf98 Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Fri, 26 Oct 2012 14:30:49 +0200 Subject: [PATCH 4/4] arm: mvebu: SATA support: board-level DT data for Armada 370/XP boards Add the SATA device tree bindings for - Armada XP evaluation board (DB-78460-BP) - Armada 370 evaluation board (DB-88F6710-BP-DDR3) Signed-off-by: Gregory CLEMENT Signed-off-by: Lior Amsalem Signed-off-by: Thomas Petazzoni --- arch/arm/boot/dts/armada-370-db.dts | 4 ++++ arch/arm/boot/dts/armada-xp-db.dts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts index 4a31b0396623..cfc080777da1 100644 --- a/arch/arm/boot/dts/armada-370-db.dts +++ b/arch/arm/boot/dts/armada-370-db.dts @@ -34,5 +34,9 @@ clock-frequency = <200000000>; status = "okay"; }; + sata@d00a0000 { + nr-ports = <2>; + status = "okay"; + }; }; }; diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts index b1fc728515e9..e59f14f14dd0 100644 --- a/arch/arm/boot/dts/armada-xp-db.dts +++ b/arch/arm/boot/dts/armada-xp-db.dts @@ -46,5 +46,9 @@ clock-frequency = <250000000>; status = "okay"; }; + sata@d00a0000 { + nr-ports = <2>; + status = "okay"; + }; }; };