summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/setup-r8a7779.c
diff options
context:
space:
mode:
authorVladimir Barinov <vladimir.barinov@cogentembedded.com>2013-02-27 23:39:14 +0300
committerSimon Horman <horms+renesas@verge.net.au>2013-03-13 02:13:22 +0900
commita7b9837c7749bf3333151a7d060d239caff1569d (patch)
tree5ce37a1ccaa6bb2839169ebc6dbfe44649dc5455 /arch/arm/mach-shmobile/setup-r8a7779.c
parent7840a65a0384f87b7d02fdaff5001a6d8f5f6491 (diff)
downloadop-kernel-dev-a7b9837c7749bf3333151a7d060d239caff1569d.zip
op-kernel-dev-a7b9837c7749bf3333151a7d060d239caff1569d.tar.gz
ARM: mach-shmobile: r8a7779: add SATA support
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>
Diffstat (limited to 'arch/arm/mach-shmobile/setup-r8a7779.c')
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7779.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 0068b9f..10031fe 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -29,6 +29,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>
@@ -322,6 +323,30 @@ static struct platform_device i2c3_device = {
.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_devices_dt[] __initdata = {
&scif0_device,
&scif1_device,
@@ -338,6 +363,7 @@ static struct platform_device *r8a7779_late_devices[] __initdata = {
&i2c1_device,
&i2c2_device,
&i2c3_device,
+ &sata_device,
};
void __init r8a7779_add_standard_devices(void)
OpenPOWER on IntegriCloud