[ARM] Orion: Use the sata_mv driver for the integrated SATA controller

This patch adds instantiation for the sata_mv driver, enabling the
integrated SATA controller.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>

authored by Saeed Bishara and committed by Nicolas Pitre f244baa3 a4ffc0a0

+52 -1
+35 -1
arch/arm/mach-orion/common.c
··· 19 19 #include <asm/page.h> 20 20 #include <asm/timex.h> 21 21 #include <asm/mach/map.h> 22 - #include <asm/arch/orion.h> 22 + #include <asm/arch/hardware.h> 23 23 #include "common.h" 24 24 25 25 /***************************************************************************** ··· 248 248 .platform_data = &orion_i2c_pdata, 249 249 }, 250 250 }; 251 + 252 + /***************************************************************************** 253 + * Sata port 254 + ****************************************************************************/ 255 + static struct resource orion_sata_resources[] = { 256 + { 257 + .name = "sata base", 258 + .start = ORION_SATA_REG_BASE, 259 + .end = ORION_SATA_REG_BASE + 0x5000 - 1, 260 + .flags = IORESOURCE_MEM, 261 + }, 262 + { 263 + .name = "sata irq", 264 + .start = IRQ_ORION_SATA, 265 + .end = IRQ_ORION_SATA, 266 + .flags = IORESOURCE_IRQ, 267 + }, 268 + }; 269 + 270 + static struct platform_device orion_sata = { 271 + .name = "sata_mv", 272 + .id = 0, 273 + .dev = { 274 + .coherent_dma_mask = 0xffffffff, 275 + }, 276 + .num_resources = ARRAY_SIZE(orion_sata_resources), 277 + .resource = orion_sata_resources, 278 + }; 279 + 280 + void __init orion_sata_init(struct mv_sata_platform_data *sata_data) 281 + { 282 + orion_sata.dev.platform_data = sata_data; 283 + platform_device_register(&orion_sata); 284 + } 251 285 252 286 /***************************************************************************** 253 287 * General
+8
arch/arm/mach-orion/common.h
··· 75 75 76 76 void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data); 77 77 78 + /* 79 + * Orion Sata platform_data, used by machine-setup 80 + */ 81 + 82 + struct mv_sata_platform_data; 83 + 84 + void __init orion_sata_init(struct mv_sata_platform_data *sata_data); 85 + 78 86 #endif /* __ARCH_ORION_COMMON_H__ */
+9
arch/arm/mach-orion/rd88f5182-setup.c
··· 17 17 #include <linux/irq.h> 18 18 #include <linux/mtd/physmap.h> 19 19 #include <linux/mv643xx_eth.h> 20 + #include <linux/ata_platform.h> 20 21 #include <linux/i2c.h> 21 22 #include <asm/mach-types.h> 22 23 #include <asm/gpio.h> ··· 231 230 }; 232 231 233 232 /***************************************************************************** 233 + * Sata 234 + ****************************************************************************/ 235 + static struct mv_sata_platform_data rd88f5182_sata_data = { 236 + .n_ports = 2, 237 + }; 238 + 239 + /***************************************************************************** 234 240 * General Setup 235 241 ****************************************************************************/ 236 242 ··· 300 292 platform_add_devices(rd88f5182_devices, ARRAY_SIZE(rd88f5182_devices)); 301 293 i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1); 302 294 orion_eth_init(&rd88f5182_eth_data); 295 + orion_sata_init(&rd88f5182_sata_data); 303 296 } 304 297 305 298 MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")