diff options
author | Andrew Lunn <andrew@lunn.ch> | 2011-05-15 07:32:50 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-05-16 15:13:19 -0400 |
commit | 9e613f8a7904f2b7516eed08f413463c579325bd (patch) | |
tree | 30c0fb01bc1af921009079536b4d9ec3a0222e41 /arch/arm/plat-orion | |
parent | 4fcd3f374a928081d391cd9a570afe3b2c692fdc (diff) |
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')
-rw-r--r-- | arch/arm/plat-orion/common.c | 35 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/common.h | 5 |
2 files changed, 40 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 @@ | |||
14 | #include <linux/dma-mapping.h> | 14 | #include <linux/dma-mapping.h> |
15 | #include <linux/serial_8250.h> | 15 | #include <linux/serial_8250.h> |
16 | #include <linux/mbus.h> | 16 | #include <linux/mbus.h> |
17 | #include <linux/ata_platform.h> | ||
17 | #include <linux/mv643xx_eth.h> | 18 | #include <linux/mv643xx_eth.h> |
18 | #include <linux/mv643xx_i2c.h> | 19 | #include <linux/mv643xx_i2c.h> |
19 | #include <net/dsa.h> | 20 | #include <net/dsa.h> |
@@ -889,3 +890,37 @@ void __init orion_ehci_2_init(struct mbus_dram_target_info *mbus_dram_info, | |||
889 | 890 | ||
890 | platform_device_register(&orion_ehci_2); | 891 | platform_device_register(&orion_ehci_2); |
891 | } | 892 | } |
893 | |||
894 | /***************************************************************************** | ||
895 | * SATA | ||
896 | ****************************************************************************/ | ||
897 | static struct resource orion_sata_resources[2] = { | ||
898 | { | ||
899 | .name = "sata base", | ||
900 | }, { | ||
901 | .name = "sata irq", | ||
902 | }, | ||
903 | }; | ||
904 | |||
905 | static struct platform_device orion_sata = { | ||
906 | .name = "sata_mv", | ||
907 | .id = 0, | ||
908 | .dev = { | ||
909 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
910 | }, | ||
911 | }; | ||
912 | |||
913 | void __init orion_sata_init(struct mv_sata_platform_data *sata_data, | ||
914 | struct mbus_dram_target_info *mbus_dram_info, | ||
915 | unsigned long mapbase, | ||
916 | unsigned long irq) | ||
917 | { | ||
918 | sata_data->dram = mbus_dram_info; | ||
919 | orion_sata.dev.platform_data = sata_data; | ||
920 | fill_resources(&orion_sata, orion_sata_resources, | ||
921 | mapbase, 0x5000 - 1, irq); | ||
922 | |||
923 | platform_device_register(&orion_sata); | ||
924 | } | ||
925 | |||
926 | |||
diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h index 6386f8e5df25..0ec6b663a834 100644 --- a/arch/arm/plat-orion/include/plat/common.h +++ b/arch/arm/plat-orion/include/plat/common.h | |||
@@ -104,4 +104,9 @@ void __init orion_ehci_1_init(struct mbus_dram_target_info *mbus_dram_info, | |||
104 | void __init orion_ehci_2_init(struct mbus_dram_target_info *mbus_dram_info, | 104 | void __init orion_ehci_2_init(struct mbus_dram_target_info *mbus_dram_info, |
105 | unsigned long mapbase, | 105 | unsigned long mapbase, |
106 | unsigned long irq); | 106 | unsigned long irq); |
107 | |||
108 | void __init orion_sata_init(struct mv_sata_platform_data *sata_data, | ||
109 | struct mbus_dram_target_info *mbus_dram_info, | ||
110 | unsigned long mapbase, | ||
111 | unsigned long irq); | ||
107 | #endif | 112 | #endif |