summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-orion/common.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2011-05-15 13:32:50 +0200
committerNicolas Pitre <nico@fluxnic.net>2011-05-16 15:13:19 -0400
commit9e613f8a7904f2b7516eed08f413463c579325bd (patch)
tree30c0fb01bc1af921009079536b4d9ec3a0222e41 /arch/arm/plat-orion/common.c
parent4fcd3f374a928081d391cd9a570afe3b2c692fdc (diff)
downloadlinux-9e613f8a7904f2b7516eed08f413463c579325bd.tar.bz2
ARM: orion: Consolidate SATA platform setup.
Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/plat-orion/common.c')
-rw-r--r--arch/arm/plat-orion/common.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c
index 802cbf4b2f3c..d1cf7c3fb744 100644
--- a/arch/arm/plat-orion/common.c
+++ b/arch/arm/plat-orion/common.c
@@ -14,6 +14,7 @@
#include <linux/dma-mapping.h>
#include <linux/serial_8250.h>
#include <linux/mbus.h>
+#include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h>
#include <linux/mv643xx_i2c.h>
#include <net/dsa.h>
@@ -889,3 +890,37 @@ void __init orion_ehci_2_init(struct mbus_dram_target_info *mbus_dram_info,
platform_device_register(&orion_ehci_2);
}
+
+/*****************************************************************************
+ * SATA
+ ****************************************************************************/
+static struct resource orion_sata_resources[2] = {
+ {
+ .name = "sata base",
+ }, {
+ .name = "sata irq",
+ },
+};
+
+static struct platform_device orion_sata = {
+ .name = "sata_mv",
+ .id = 0,
+ .dev = {
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ },
+};
+
+void __init orion_sata_init(struct mv_sata_platform_data *sata_data,
+ struct mbus_dram_target_info *mbus_dram_info,
+ unsigned long mapbase,
+ unsigned long irq)
+{
+ sata_data->dram = mbus_dram_info;
+ orion_sata.dev.platform_data = sata_data;
+ fill_resources(&orion_sata, orion_sata_resources,
+ mapbase, 0x5000 - 1, irq);
+
+ platform_device_register(&orion_sata);
+}
+
+