aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/au1000/common
diff options
context:
space:
mode:
authorPete Popov <ppopov@embeddedalley.com>2005-09-15 04:03:12 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:32:20 -0400
commit26a940e21752e0de8f068f77dad606a7d1986937 (patch)
tree88e46225e19c4c72fa6914a21afb28c6ea52bfc6 /arch/mips/au1000/common
parent64abf64d10b3a547becefeb26394dfbefac273fb (diff)
Cleaned up AMD Au1200 IDE driver:
- converted to platform bus - removed pci dependencies - removed virt_to_phys/phys_to_virt calls System now can root off of a disk. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> diff --git a/Documentation/mips/AU1xxx_IDE.README b/Documentation/mips/AU1xxx_IDE.README new file mode 100644
Diffstat (limited to 'arch/mips/au1000/common')
-rw-r--r--arch/mips/au1000/common/dbdma.c6
-rw-r--r--arch/mips/au1000/common/platform.c32
2 files changed, 36 insertions, 2 deletions
diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c
index 8f78c2fe7cf5..eb5803aed91b 100644
--- a/arch/mips/au1000/common/dbdma.c
+++ b/arch/mips/au1000/common/dbdma.c
@@ -197,6 +197,12 @@ find_dbdev_id (u32 id)
197 return NULL; 197 return NULL;
198} 198}
199 199
200void * au1xxx_ddma_get_nextptr_virt(au1x_ddma_desc_t *dp)
201{
202 return phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
203}
204EXPORT_SYMBOL(au1xxx_ddma_get_nextptr_virt);
205
200u32 206u32
201au1xxx_ddma_add_device(dbdev_tab_t *dev) 207au1xxx_ddma_add_device(dbdev_tab_t *dev)
202{ 208{
diff --git a/arch/mips/au1000/common/platform.c b/arch/mips/au1000/common/platform.c
index 0c3fd726c3d6..4aca18f0e290 100644
--- a/arch/mips/au1000/common/platform.c
+++ b/arch/mips/au1000/common/platform.c
@@ -12,7 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/resource.h> 13#include <linux/resource.h>
14 14
15#include <asm/mach-au1x00/au1000.h> 15#include <asm/mach-au1x00/au1xxx.h>
16 16
17/* OHCI (USB full speed host controller) */ 17/* OHCI (USB full speed host controller) */
18static struct resource au1xxx_usb_ohci_resources[] = { 18static struct resource au1xxx_usb_ohci_resources[] = {
@@ -154,7 +154,6 @@ static struct platform_device au1xxx_usb_otg_device = {
154 .resource = au1xxx_usb_otg_resources, 154 .resource = au1xxx_usb_otg_resources,
155}; 155};
156 156
157/*** AU1200 LCD controller ***/
158static struct resource au1200_lcd_resources[] = { 157static struct resource au1200_lcd_resources[] = {
159 [0] = { 158 [0] = {
160 .start = LCD_PHYS_ADDR, 159 .start = LCD_PHYS_ADDR,
@@ -168,6 +167,19 @@ static struct resource au1200_lcd_resources[] = {
168 } 167 }
169}; 168};
170 169
170static struct resource au1200_ide0_resources[] = {
171 [0] = {
172 .start = AU1XXX_ATA_PHYS_ADDR,
173 .end = AU1XXX_ATA_PHYS_ADDR + AU1XXX_ATA_PHYS_LEN,
174 .flags = IORESOURCE_MEM,
175 },
176 [1] = {
177 .start = AU1XXX_ATA_INT,
178 .end = AU1XXX_ATA_INT,
179 .flags = IORESOURCE_IRQ,
180 }
181};
182
171static u64 au1200_lcd_dmamask = ~(u32)0; 183static u64 au1200_lcd_dmamask = ~(u32)0;
172 184
173static struct platform_device au1200_lcd_device = { 185static struct platform_device au1200_lcd_device = {
@@ -180,6 +192,21 @@ static struct platform_device au1200_lcd_device = {
180 .num_resources = ARRAY_SIZE(au1200_lcd_resources), 192 .num_resources = ARRAY_SIZE(au1200_lcd_resources),
181 .resource = au1200_lcd_resources, 193 .resource = au1200_lcd_resources,
182}; 194};
195
196
197static u64 ide0_dmamask = ~(u32)0;
198
199static struct platform_device au1200_ide0_device = {
200 .name = "au1200-ide",
201 .id = 0,
202 .dev = {
203 .dma_mask = &ide0_dmamask,
204 .coherent_dma_mask = 0xffffffff,
205 },
206 .num_resources = ARRAY_SIZE(au1200_ide0_resources),
207 .resource = au1200_ide0_resources,
208};
209
183#endif 210#endif
184 211
185static struct platform_device *au1xxx_platform_devices[] __initdata = { 212static struct platform_device *au1xxx_platform_devices[] __initdata = {
@@ -194,6 +221,7 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = {
194 &au1xxx_usb_gdt_device, 221 &au1xxx_usb_gdt_device,
195 &au1xxx_usb_otg_device, 222 &au1xxx_usb_otg_device,
196 &au1200_lcd_device, 223 &au1200_lcd_device,
224 &au1200_ide0_device,
197#endif 225#endif
198}; 226};
199 227