Commit f244baa3 authored by Saeed Bishara's avatar Saeed Bishara Committed by Nicolas Pitre

[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: default avatarSaeed Bishara <saeed@marvell.com>
Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
parent a4ffc0a0
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/timex.h> #include <asm/timex.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/arch/orion.h> #include <asm/arch/hardware.h>
#include "common.h" #include "common.h"
/***************************************************************************** /*****************************************************************************
...@@ -249,6 +249,40 @@ static struct platform_device orion_i2c = { ...@@ -249,6 +249,40 @@ static struct platform_device orion_i2c = {
}, },
}; };
/*****************************************************************************
* Sata port
****************************************************************************/
static struct resource orion_sata_resources[] = {
{
.name = "sata base",
.start = ORION_SATA_REG_BASE,
.end = ORION_SATA_REG_BASE + 0x5000 - 1,
.flags = IORESOURCE_MEM,
},
{
.name = "sata irq",
.start = IRQ_ORION_SATA,
.end = IRQ_ORION_SATA,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device orion_sata = {
.name = "sata_mv",
.id = 0,
.dev = {
.coherent_dma_mask = 0xffffffff,
},
.num_resources = ARRAY_SIZE(orion_sata_resources),
.resource = orion_sata_resources,
};
void __init orion_sata_init(struct mv_sata_platform_data *sata_data)
{
orion_sata.dev.platform_data = sata_data;
platform_device_register(&orion_sata);
}
/***************************************************************************** /*****************************************************************************
* General * General
****************************************************************************/ ****************************************************************************/
......
...@@ -75,4 +75,12 @@ struct mv643xx_eth_platform_data; ...@@ -75,4 +75,12 @@ struct mv643xx_eth_platform_data;
void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data); void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data);
/*
* Orion Sata platform_data, used by machine-setup
*/
struct mv_sata_platform_data;
void __init orion_sata_init(struct mv_sata_platform_data *sata_data);
#endif /* __ARCH_ORION_COMMON_H__ */ #endif /* __ARCH_ORION_COMMON_H__ */
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/mv643xx_eth.h> #include <linux/mv643xx_eth.h>
#include <linux/ata_platform.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/gpio.h> #include <asm/gpio.h>
...@@ -229,6 +230,13 @@ static struct i2c_board_info __initdata rd88f5182_i2c_rtc = { ...@@ -229,6 +230,13 @@ static struct i2c_board_info __initdata rd88f5182_i2c_rtc = {
.addr = 0x68, .addr = 0x68,
}; };
/*****************************************************************************
* Sata
****************************************************************************/
static struct mv_sata_platform_data rd88f5182_sata_data = {
.n_ports = 2,
};
/***************************************************************************** /*****************************************************************************
* General Setup * General Setup
****************************************************************************/ ****************************************************************************/
...@@ -292,6 +300,7 @@ static void __init rd88f5182_init(void) ...@@ -292,6 +300,7 @@ static void __init rd88f5182_init(void)
platform_add_devices(rd88f5182_devices, ARRAY_SIZE(rd88f5182_devices)); platform_add_devices(rd88f5182_devices, ARRAY_SIZE(rd88f5182_devices));
i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1); i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1);
orion_eth_init(&rd88f5182_eth_data); orion_eth_init(&rd88f5182_eth_data);
orion_sata_init(&rd88f5182_sata_data);
} }
MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design") MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment