aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 11:36:38 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 11:36:38 -0400
commitb81c2266e36f6bdf0c7186d21b375e32d8929df8 (patch)
tree0d39ac63f433764a11cdad116be488034497278a
parent7f6f33c131b34a5eca6350c2bd8a254e55550e92 (diff)
bast-ide: fix resources reservation
* Tell IDE layer to not manage resources by setting hwif->mmio flag and request resources in bastide_init(). * Use request_mem_region() for resources reservation. * Use driver name for resources reservation. Cc: Ben Dooks <support@simtec.co.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/arm/bast-ide.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c
index 3bd2c6dcd80b..a80b9574865e 100644
--- a/drivers/ide/arm/bast-ide.c
+++ b/drivers/ide/arm/bast-ide.c
@@ -21,6 +21,8 @@
21#include <asm/arch/bast-map.h> 21#include <asm/arch/bast-map.h>
22#include <asm/arch/bast-irq.h> 22#include <asm/arch/bast-irq.h>
23 23
24#define DRV_NAME "bast-ide"
25
24static int __init bastide_register(unsigned int base, unsigned int aux, int irq) 26static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
25{ 27{
26 ide_hwif_t *hwif; 28 ide_hwif_t *hwif;
@@ -53,6 +55,7 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
53 ide_init_port_data(hwif, i); 55 ide_init_port_data(hwif, i);
54 56
55 ide_init_port_hw(hwif, &hw); 57 ide_init_port_hw(hwif, &hw);
58 hwif->mmio = 1;
56 hwif->quirkproc = NULL; 59 hwif->quirkproc = NULL;
57 60
58 idx[0] = i; 61 idx[0] = i;
@@ -64,6 +67,8 @@ out:
64 67
65static int __init bastide_init(void) 68static int __init bastide_init(void)
66{ 69{
70 unsigned long base = BAST_VA_IDEPRI + BAST_IDE_CS;
71
67 /* we can treat the VR1000 and the BAST the same */ 72 /* we can treat the VR1000 and the BAST the same */
68 73
69 if (!(machine_is_bast() || machine_is_vr1000())) 74 if (!(machine_is_bast() || machine_is_vr1000()))
@@ -71,6 +76,11 @@ static int __init bastide_init(void)
71 76
72 printk("BAST: IDE driver, (c) 2003-2004 Simtec Electronics\n"); 77 printk("BAST: IDE driver, (c) 2003-2004 Simtec Electronics\n");
73 78
79 if (!request_mem_region(base, 0x400000, DRV_NAME)) {
80 printk(KERN_ERR "%s: resources busy\n", DRV_NAME);
81 return -EBUSY;
82 }
83
74 bastide_register(BAST_VA_IDEPRI, BAST_VA_IDEPRIAUX, IRQ_IDE0); 84 bastide_register(BAST_VA_IDEPRI, BAST_VA_IDEPRIAUX, IRQ_IDE0);
75 bastide_register(BAST_VA_IDESEC, BAST_VA_IDESECAUX, IRQ_IDE1); 85 bastide_register(BAST_VA_IDESEC, BAST_VA_IDESECAUX, IRQ_IDE1);
76 86