aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/mips/au1xxx-ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/mips/au1xxx-ide.c')
-rw-r--r--drivers/ide/mips/au1xxx-ide.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index 0f4bf5d72835..85c016bdfd38 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -32,19 +32,12 @@
32#include <linux/kernel.h> 32#include <linux/kernel.h>
33#include <linux/delay.h> 33#include <linux/delay.h>
34#include <linux/platform_device.h> 34#include <linux/platform_device.h>
35
36#include <linux/init.h> 35#include <linux/init.h>
37#include <linux/ide.h> 36#include <linux/ide.h>
38#include <linux/sysdev.h> 37#include <linux/scatterlist.h>
39
40#include <linux/dma-mapping.h>
41
42#include "ide-timing.h"
43 38
44#include <asm/io.h>
45#include <asm/mach-au1x00/au1xxx.h> 39#include <asm/mach-au1x00/au1xxx.h>
46#include <asm/mach-au1x00/au1xxx_dbdma.h> 40#include <asm/mach-au1x00/au1xxx_dbdma.h>
47
48#include <asm/mach-au1x00/au1xxx_ide.h> 41#include <asm/mach-au1x00/au1xxx_ide.h>
49 42
50#define DRV_NAME "au1200-ide" 43#define DRV_NAME "au1200-ide"
@@ -56,6 +49,8 @@
56static _auide_hwif auide_hwif; 49static _auide_hwif auide_hwif;
57static int dbdma_init_done; 50static int dbdma_init_done;
58 51
52static int auide_ddma_init(_auide_hwif *auide);
53
59#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA) 54#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA)
60 55
61void auide_insw(unsigned long port, void *addr, u32 count) 56void auide_insw(unsigned long port, void *addr, u32 count)
@@ -591,13 +586,14 @@ static int au_ide_probe(struct device *dev)
591 goto out; 586 goto out;
592 } 587 }
593 588
594 if (!request_mem_region (res->start, res->end-res->start, pdev->name)) { 589 if (!request_mem_region(res->start, res->end - res->start + 1,
590 pdev->name)) {
595 pr_debug("%s: request_mem_region failed\n", DRV_NAME); 591 pr_debug("%s: request_mem_region failed\n", DRV_NAME);
596 ret = -EBUSY; 592 ret = -EBUSY;
597 goto out; 593 goto out;
598 } 594 }
599 595
600 ahwif->regbase = (u32)ioremap(res->start, res->end-res->start); 596 ahwif->regbase = (u32)ioremap(res->start, res->end - res->start + 1);
601 if (ahwif->regbase == 0) { 597 if (ahwif->regbase == 0) {
602 ret = -ENOMEM; 598 ret = -ENOMEM;
603 goto out; 599 goto out;
@@ -682,7 +678,7 @@ static int au_ide_remove(struct device *dev)
682 iounmap((void *)ahwif->regbase); 678 iounmap((void *)ahwif->regbase);
683 679
684 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 680 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
685 release_mem_region(res->start, res->end - res->start); 681 release_mem_region(res->start, res->end - res->start + 1);
686 682
687 return 0; 683 return 0;
688} 684}