|
32 | 32 | #include <linux/kernel.h> |
33 | 33 | #include <linux/delay.h> |
34 | 34 | #include <linux/platform_device.h> |
35 | | - |
36 | 35 | #include <linux/init.h> |
37 | 36 | #include <linux/ide.h> |
38 | | -#include <linux/sysdev.h> |
39 | | - |
40 | | -#include <linux/dma-mapping.h> |
41 | | - |
42 | | -#include "ide-timing.h" |
| 37 | +#include <linux/scatterlist.h> |
43 | 38 |
|
44 | | -#include <asm/io.h> |
45 | 39 | #include <asm/mach-au1x00/au1xxx.h> |
46 | 40 | #include <asm/mach-au1x00/au1xxx_dbdma.h> |
47 | | - |
48 | 41 | #include <asm/mach-au1x00/au1xxx_ide.h> |
49 | 42 |
|
50 | 43 | #define DRV_NAME "au1200-ide" |
|
56 | 49 | static _auide_hwif auide_hwif; |
57 | 50 | static int dbdma_init_done; |
58 | 51 |
|
| 52 | +static int auide_ddma_init(_auide_hwif *auide); |
| 53 | + |
59 | 54 | #if defined(CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA) |
60 | 55 |
|
61 | 56 | void auide_insw(unsigned long port, void *addr, u32 count) |
@@ -591,13 +586,14 @@ static int au_ide_probe(struct device *dev) |
591 | 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 | 591 | pr_debug("%s: request_mem_region failed\n", DRV_NAME); |
596 | 592 | ret = -EBUSY; |
597 | 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 | 597 | if (ahwif->regbase == 0) { |
602 | 598 | ret = -ENOMEM; |
603 | 599 | goto out; |
@@ -682,7 +678,7 @@ static int au_ide_remove(struct device *dev) |
682 | 678 | iounmap((void *)ahwif->regbase); |
683 | 679 |
|
684 | 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 | 683 | return 0; |
688 | 684 | } |
|
0 commit comments