--- /dev/null
+From ltsi-dev-bounces@lists.linuxfoundation.org Sat May 11 14:26:47 2013
+From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
+Date: Sun, 12 May 2013 01:26:55 +0400
+Subject: ARM: mach-shmobile: marzen: add SATA support
+To: ltsi-dev@lists.linuxfoundation.org
+Cc: vladimir.barinov@cogentembedded.com
+Message-ID: <201305120126.55306.sergei.shtylyov@cogentembedded.com>
+
+
+From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
+
+Add SATA support to marzen_defconfig.
+
+Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
+Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
+Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
+(cherry picked from commit db30abdf3c07c564d4af0f991bb7f38b728f9035)
+
+---
+This patch (already merged by Linus) is intended for the Marzen patch series.
+
+Changes from the upstream version:
+- resolved reject due to missing interim patches.
+
+ arch/arm/configs/marzen_defconfig | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/arch/arm/configs/marzen_defconfig
++++ b/arch/arm/configs/marzen_defconfig
+@@ -47,6 +47,10 @@ CONFIG_DEVTMPFS_MOUNT=y
+ # CONFIG_STANDALONE is not set
+ # CONFIG_PREVENT_FIRMWARE_BUILD is not set
+ # CONFIG_FW_LOADER is not set
++CONFIG_ATA=y
++CONFIG_ATA_SFF=y
++CONFIG_ATA_BMDMA=y
++CONFIG_SATA_RCAR=y
+ CONFIG_NETDEVICES=y
+ # CONFIG_NET_VENDOR_BROADCOM is not set
+ # CONFIG_NET_VENDOR_FARADAY is not set
--- /dev/null
+From ltsi-dev-bounces@lists.linuxfoundation.org Sat May 11 14:25:45 2013
+From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
+Date: Sun, 12 May 2013 01:25:50 +0400
+Subject: ARM: mach-shmobile: r8a7779: add SATA support
+To: ltsi-dev@lists.linuxfoundation.org
+Cc: vladimir.barinov@cogentembedded.com
+Message-ID: <201305120125.51117.sergei.shtylyov@cogentembedded.com>
+
+
+From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
+
+Add SATA clock for r8a7779 SoC (for both device tree and usual cases).
+Register SATA controller as a "late" platform device on r8a7779 SoC.
+
+Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
+Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
+Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
+(cherry picked from commit a7b9837c7749bf3333151a7d060d239caff1569d)
+
+---
+This patch (already merged by Linus) is intended for the Marzen patch series.
+
+Changes from the upstream version:
+- added SATA platform device to the "early" device table instead of "late";
+- resolved 4 rejects due to missing interim patches.
+
+ arch/arm/mach-shmobile/clock-r8a7779.c | 6 +++++-
+ arch/arm/mach-shmobile/setup-r8a7779.c | 26 ++++++++++++++++++++++++++
+ 2 files changed, 31 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/mach-shmobile/clock-r8a7779.c
++++ b/arch/arm/mach-shmobile/clock-r8a7779.c
+@@ -86,11 +86,13 @@ static struct clk div4_clks[DIV4_NR] = {
+ 0x0300, CLK_ENABLE_ON_INIT),
+ };
+
+-enum { MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021,
++enum { MSTP115,
++ MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021,
+ MSTP016, MSTP015, MSTP014,
+ MSTP_NR };
+
+ static struct clk mstp_clks[MSTP_NR] = {
++ [MSTP115] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 15, 0), /* SATA */
+ [MSTP026] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 26, 0), /* SCIF0 */
+ [MSTP025] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 25, 0), /* SCIF1 */
+ [MSTP024] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 24, 0), /* SCIF2 */
+@@ -141,6 +143,8 @@ static struct clk_lookup lookups[] = {
+ CLKDEV_CON_ID("peripheral_clk", &div4_clks[DIV4_P]),
+
+ /* MSTP32 clocks */
++ CLKDEV_DEV_ID("sata_rcar", &mstp_clks[MSTP115]), /* SATA */
++ CLKDEV_DEV_ID("fc600000.sata", &mstp_clks[MSTP115]), /* SATA w/DT */
+ CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */
+ CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP015]), /* TMU01 */
+ CLKDEV_DEV_ID("sh_tmu.2", &mstp_clks[MSTP014]), /* TMU02 */
+--- a/arch/arm/mach-shmobile/setup-r8a7779.c
++++ b/arch/arm/mach-shmobile/setup-r8a7779.c
+@@ -28,6 +28,7 @@
+ #include <linux/serial_sci.h>
+ #include <linux/sh_intc.h>
+ #include <linux/sh_timer.h>
++#include <linux/dma-mapping.h>
+ #include <mach/hardware.h>
+ #include <mach/irqs.h>
+ #include <mach/r8a7779.h>
+@@ -302,6 +303,30 @@ static struct platform_device i2c3_devic
+ .num_resources = ARRAY_SIZE(rcar_i2c3_res),
+ };
+
++static struct resource sata_resources[] = {
++ [0] = {
++ .name = "rcar-sata",
++ .start = 0xfc600000,
++ .end = 0xfc601fff,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = gic_spi(100),
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct platform_device sata_device = {
++ .name = "sata_rcar",
++ .id = -1,
++ .resource = sata_resources,
++ .num_resources = ARRAY_SIZE(sata_resources),
++ .dev = {
++ .dma_mask = &sata_device.dev.coherent_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++};
++
+ static struct platform_device *r8a7779_early_devices[] __initdata = {
+ &scif0_device,
+ &scif1_device,
+@@ -315,6 +340,7 @@ static struct platform_device *r8a7779_e
+ &i2c1_device,
+ &i2c2_device,
+ &i2c3_device,
++ &sata_device,
+ };
+
+ static struct platform_device *r8a7779_late_devices[] __initdata = {