aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaeed Bishara <saeed@marvell.com>2008-01-29 17:33:32 -0500
committerNicolas Pitre <nico@cam.org>2008-02-08 11:52:23 -0500
commitf244baa3cafb4a49934d1fd944e29885a0fdbc3e (patch)
treef638d21639490add6959cd396f9a8b996add9cb7
parenta4ffc0a0b240a29cbe489f6db9dae112a49ef1c1 (diff)
[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>
-rw-r--r--arch/arm/mach-orion/common.c36
-rw-r--r--arch/arm/mach-orion/common.h8
-rw-r--r--arch/arm/mach-orion/rd88f5182-setup.c9
3 files changed, 52 insertions, 1 deletions
diff --git a/arch/arm/mach-orion/common.c b/arch/arm/mach-orion/common.c
index 5e20b6b32508..5f41fc537fa5 100644
--- a/arch/arm/mach-orion/common.c
+++ b/arch/arm/mach-orion/common.c
@@ -19,7 +19,7 @@
19#include <asm/page.h> 19#include <asm/page.h>
20#include <asm/timex.h> 20#include <asm/timex.h>
21#include <asm/mach/map.h> 21#include <asm/mach/map.h>
22#include <asm/arch/orion.h> 22#include <asm/arch/hardware.h>
23#include "common.h" 23#include "common.h"
24 24
25/***************************************************************************** 25/*****************************************************************************
@@ -250,6 +250,40 @@ static struct platform_device orion_i2c = {
250}; 250};
251 251
252/***************************************************************************** 252/*****************************************************************************
253 * Sata port
254 ****************************************************************************/
255static 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
270static 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
280void __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}
285
286/*****************************************************************************
253 * General 287 * General
254 ****************************************************************************/ 288 ****************************************************************************/
255 289
diff --git a/arch/arm/mach-orion/common.h b/arch/arm/mach-orion/common.h
index 06c10c06f03e..10154ec885df 100644
--- a/arch/arm/mach-orion/common.h
+++ b/arch/arm/mach-orion/common.h
@@ -75,4 +75,12 @@ struct mv643xx_eth_platform_data;
75 75
76void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data); 76void __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
82struct mv_sata_platform_data;
83
84void __init orion_sata_init(struct mv_sata_platform_data *sata_data);
85
78#endif /* __ARCH_ORION_COMMON_H__ */ 86#endif /* __ARCH_ORION_COMMON_H__ */
diff --git a/arch/arm/mach-orion/rd88f5182-setup.c b/arch/arm/mach-orion/rd88f5182-setup.c
index 026d74325d01..797c54c80c2b 100644
--- a/arch/arm/mach-orion/rd88f5182-setup.c
+++ b/arch/arm/mach-orion/rd88f5182-setup.c
@@ -17,6 +17,7 @@
17#include <linux/irq.h> 17#include <linux/irq.h>
18#include <linux/mtd/physmap.h> 18#include <linux/mtd/physmap.h>
19#include <linux/mv643xx_eth.h> 19#include <linux/mv643xx_eth.h>
20#include <linux/ata_platform.h>
20#include <linux/i2c.h> 21#include <linux/i2c.h>
21#include <asm/mach-types.h> 22#include <asm/mach-types.h>
22#include <asm/gpio.h> 23#include <asm/gpio.h>
@@ -230,6 +231,13 @@ static struct i2c_board_info __initdata rd88f5182_i2c_rtc = {
230}; 231};
231 232
232/***************************************************************************** 233/*****************************************************************************
234 * Sata
235 ****************************************************************************/
236static struct mv_sata_platform_data rd88f5182_sata_data = {
237 .n_ports = 2,
238};
239
240/*****************************************************************************
233 * General Setup 241 * General Setup
234 ****************************************************************************/ 242 ****************************************************************************/
235 243
@@ -292,6 +300,7 @@ static void __init rd88f5182_init(void)
292 platform_add_devices(rd88f5182_devices, ARRAY_SIZE(rd88f5182_devices)); 300 platform_add_devices(rd88f5182_devices, ARRAY_SIZE(rd88f5182_devices));
293 i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1); 301 i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1);
294 orion_eth_init(&rd88f5182_eth_data); 302 orion_eth_init(&rd88f5182_eth_data);
303 orion_sata_init(&rd88f5182_sata_data);
295} 304}
296 305
297MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design") 306MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")