aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2011-05-15 07:32:50 -0400
committerNicolas Pitre <nico@fluxnic.net>2011-05-16 15:13:19 -0400
commit9e613f8a7904f2b7516eed08f413463c579325bd (patch)
tree30c0fb01bc1af921009079536b4d9ec3a0222e41 /arch/arm/mach-kirkwood
parent4fcd3f374a928081d391cd9a570afe3b2c692fdc (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/mach-kirkwood')
-rw-r--r--arch/arm/mach-kirkwood/common.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 9e56cbb19184..e96ec4e61615 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -172,38 +172,14 @@ static void __init kirkwood_rtc_init(void)
172/***************************************************************************** 172/*****************************************************************************
173 * SATA 173 * SATA
174 ****************************************************************************/ 174 ****************************************************************************/
175static struct resource kirkwood_sata_resources[] = {
176 {
177 .name = "sata base",
178 .start = SATA_PHYS_BASE,
179 .end = SATA_PHYS_BASE + 0x5000 - 1,
180 .flags = IORESOURCE_MEM,
181 }, {
182 .name = "sata irq",
183 .start = IRQ_KIRKWOOD_SATA,
184 .end = IRQ_KIRKWOOD_SATA,
185 .flags = IORESOURCE_IRQ,
186 },
187};
188
189static struct platform_device kirkwood_sata = {
190 .name = "sata_mv",
191 .id = 0,
192 .dev = {
193 .coherent_dma_mask = DMA_BIT_MASK(32),
194 },
195 .num_resources = ARRAY_SIZE(kirkwood_sata_resources),
196 .resource = kirkwood_sata_resources,
197};
198
199void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data) 175void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data)
200{ 176{
201 kirkwood_clk_ctrl |= CGC_SATA0; 177 kirkwood_clk_ctrl |= CGC_SATA0;
202 if (sata_data->n_ports > 1) 178 if (sata_data->n_ports > 1)
203 kirkwood_clk_ctrl |= CGC_SATA1; 179 kirkwood_clk_ctrl |= CGC_SATA1;
204 sata_data->dram = &kirkwood_mbus_dram_info; 180
205 kirkwood_sata.dev.platform_data = sata_data; 181 orion_sata_init(sata_data, &kirkwood_mbus_dram_info,
206 platform_device_register(&kirkwood_sata); 182 SATA_PHYS_BASE, IRQ_KIRKWOOD_SATA);
207} 183}
208 184
209 185