Commit b9db83af authored by Ben Dooks's avatar Ben Dooks

[ARM] ANUBIS: Move to using ata_platform driver (libata)

Change the (as yet unused) IDE bus on the Simtec Anubis board
to use pata_platform and thus libata to provide IDE support.
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent b7a12d19
...@@ -29,6 +29,7 @@ config MACH_ANUBIS ...@@ -29,6 +29,7 @@ config MACH_ANUBIS
bool "Simtec Electronics ANUBIS" bool "Simtec Electronics ANUBIS"
select CPU_S3C2440 select CPU_S3C2440
select PM_SIMTEC if PM select PM_SIMTEC if PM
select HAVE_PATA_PLATFORM
help help
Say Y here if you are using the Simtec Electronics ANUBIS Say Y here if you are using the Simtec Electronics ANUBIS
development system development system
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/ata_platform.h>
#include <linux/sm501.h> #include <linux/sm501.h>
#include <linux/sm501-regs.h> #include <linux/sm501-regs.h>
...@@ -241,14 +242,18 @@ static struct s3c2410_platform_nand anubis_nand_info = { ...@@ -241,14 +242,18 @@ static struct s3c2410_platform_nand anubis_nand_info = {
/* IDE channels */ /* IDE channels */
struct pata_platform_info anubis_ide_platdata = {
.ioport_shift = 5,
};
static struct resource anubis_ide0_resource[] = { static struct resource anubis_ide0_resource[] = {
{ {
.start = S3C2410_CS3, .start = S3C2410_CS3,
.end = S3C2410_CS3 + (8*32) - 1, .end = S3C2410_CS3 + (8*32) - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, { }, {
.start = S3C2410_CS3 + (1<<26), .start = S3C2410_CS3 + (1<<26) + (6*32),
.end = S3C2410_CS3 + (1<<26) + (8*32) - 1, .end = S3C2410_CS3 + (1<<26) + (7*32) - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, { }, {
.start = IRQ_IDE0, .start = IRQ_IDE0,
...@@ -258,10 +263,14 @@ static struct resource anubis_ide0_resource[] = { ...@@ -258,10 +263,14 @@ static struct resource anubis_ide0_resource[] = {
}; };
static struct platform_device anubis_device_ide0 = { static struct platform_device anubis_device_ide0 = {
.name = "simtec-ide", .name = "pata_platform",
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(anubis_ide0_resource), .num_resources = ARRAY_SIZE(anubis_ide0_resource),
.resource = anubis_ide0_resource, .resource = anubis_ide0_resource,
.dev = {
.platform_data = &anubis_ide_platdata,
.coherent_dma_mask = ~0,
},
}; };
static struct resource anubis_ide1_resource[] = { static struct resource anubis_ide1_resource[] = {
...@@ -270,8 +279,8 @@ static struct resource anubis_ide1_resource[] = { ...@@ -270,8 +279,8 @@ static struct resource anubis_ide1_resource[] = {
.end = S3C2410_CS4 + (8*32) - 1, .end = S3C2410_CS4 + (8*32) - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, { }, {
.start = S3C2410_CS4 + (1<<26), .start = S3C2410_CS4 + (1<<26) + (6*32),
.end = S3C2410_CS4 + (1<<26) + (8*32) - 1, .end = S3C2410_CS4 + (1<<26) + (7*32) - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, { }, {
.start = IRQ_IDE0, .start = IRQ_IDE0,
...@@ -280,12 +289,15 @@ static struct resource anubis_ide1_resource[] = { ...@@ -280,12 +289,15 @@ static struct resource anubis_ide1_resource[] = {
}, },
}; };
static struct platform_device anubis_device_ide1 = { static struct platform_device anubis_device_ide1 = {
.name = "simtec-ide", .name = "pata_platform",
.id = 1, .id = 1,
.num_resources = ARRAY_SIZE(anubis_ide1_resource), .num_resources = ARRAY_SIZE(anubis_ide1_resource),
.resource = anubis_ide1_resource, .resource = anubis_ide1_resource,
.dev = {
.platform_data = &anubis_ide_platdata,
.coherent_dma_mask = ~0,
},
}; };
/* Asix AX88796 10/100 ethernet controller */ /* Asix AX88796 10/100 ethernet controller */
......
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