diff options
author | Manuel Lauss <manuel.lauss@gmail.com> | 2014-03-26 10:05:21 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-26 18:09:21 -0400 |
commit | 54ff4a1d17325a95926fee560e81d47de678dc03 (patch) | |
tree | 7b545307c39a7b6029a4da3ca18019c2a0922066 /arch/mips/alchemy | |
parent | a16afa53277a961799130ab9189c84adc2d0467e (diff) |
MIPS: Alchemy: pata_platform for DB1200
The au1xxx-ide driver isn't any faster than pata_platform since it
spends a lot of time busy waiting for DMA to finish; faster PIO/DMA
modes only work on the db1200 with a certain cpu speed, UDMA is broken,
and finally the old IDE layer is on death row, so time to switch to
the newer ATA layer.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/6662/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy')
-rw-r--r-- | arch/mips/alchemy/devboards/db1200.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/arch/mips/alchemy/devboards/db1200.c b/arch/mips/alchemy/devboards/db1200.c index 4bcf2f4e4f93..9e46667f2597 100644 --- a/arch/mips/alchemy/devboards/db1200.c +++ b/arch/mips/alchemy/devboards/db1200.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/spi/spi.h> | 35 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/flash.h> | 36 | #include <linux/spi/flash.h> |
37 | #include <linux/smc91x.h> | 37 | #include <linux/smc91x.h> |
38 | #include <linux/ata_platform.h> | ||
38 | #include <asm/mach-au1x00/au1000.h> | 39 | #include <asm/mach-au1x00/au1000.h> |
39 | #include <asm/mach-au1x00/au1100_mmc.h> | 40 | #include <asm/mach-au1x00/au1100_mmc.h> |
40 | #include <asm/mach-au1x00/au1xxx_dbdma.h> | 41 | #include <asm/mach-au1x00/au1xxx_dbdma.h> |
@@ -330,32 +331,38 @@ static struct platform_device db1200_eth_dev = { | |||
330 | 331 | ||
331 | /**********************************************************************/ | 332 | /**********************************************************************/ |
332 | 333 | ||
334 | static struct pata_platform_info db1200_ide_info = { | ||
335 | .ioport_shift = DB1200_IDE_REG_SHIFT, | ||
336 | }; | ||
337 | |||
338 | #define IDE_ALT_START (14 << DB1200_IDE_REG_SHIFT) | ||
333 | static struct resource db1200_ide_res[] = { | 339 | static struct resource db1200_ide_res[] = { |
334 | [0] = { | 340 | [0] = { |
335 | .start = DB1200_IDE_PHYS_ADDR, | 341 | .start = DB1200_IDE_PHYS_ADDR, |
336 | .end = DB1200_IDE_PHYS_ADDR + DB1200_IDE_PHYS_LEN - 1, | 342 | .end = DB1200_IDE_PHYS_ADDR + IDE_ALT_START - 1, |
337 | .flags = IORESOURCE_MEM, | 343 | .flags = IORESOURCE_MEM, |
338 | }, | 344 | }, |
339 | [1] = { | 345 | [1] = { |
346 | .start = DB1200_IDE_PHYS_ADDR + IDE_ALT_START, | ||
347 | .end = DB1200_IDE_PHYS_ADDR + DB1200_IDE_PHYS_LEN - 1, | ||
348 | .flags = IORESOURCE_MEM, | ||
349 | }, | ||
350 | [2] = { | ||
340 | .start = DB1200_IDE_INT, | 351 | .start = DB1200_IDE_INT, |
341 | .end = DB1200_IDE_INT, | 352 | .end = DB1200_IDE_INT, |
342 | .flags = IORESOURCE_IRQ, | 353 | .flags = IORESOURCE_IRQ, |
343 | }, | 354 | }, |
344 | [2] = { | ||
345 | .start = AU1200_DSCR_CMD0_DMA_REQ1, | ||
346 | .end = AU1200_DSCR_CMD0_DMA_REQ1, | ||
347 | .flags = IORESOURCE_DMA, | ||
348 | }, | ||
349 | }; | 355 | }; |
350 | 356 | ||
351 | static u64 au1200_ide_dmamask = DMA_BIT_MASK(32); | 357 | static u64 au1200_ide_dmamask = DMA_BIT_MASK(32); |
352 | 358 | ||
353 | static struct platform_device db1200_ide_dev = { | 359 | static struct platform_device db1200_ide_dev = { |
354 | .name = "au1200-ide", | 360 | .name = "pata_platform", |
355 | .id = 0, | 361 | .id = 0, |
356 | .dev = { | 362 | .dev = { |
357 | .dma_mask = &au1200_ide_dmamask, | 363 | .dma_mask = &au1200_ide_dmamask, |
358 | .coherent_dma_mask = DMA_BIT_MASK(32), | 364 | .coherent_dma_mask = DMA_BIT_MASK(32), |
365 | .platform_data = &db1200_ide_info, | ||
359 | }, | 366 | }, |
360 | .num_resources = ARRAY_SIZE(db1200_ide_res), | 367 | .num_resources = ARRAY_SIZE(db1200_ide_res), |
361 | .resource = db1200_ide_res, | 368 | .resource = db1200_ide_res, |