diff options
Diffstat (limited to 'drivers/mtd/maps/cdb89712.c')
-rw-r--r-- | drivers/mtd/maps/cdb89712.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/mtd/maps/cdb89712.c b/drivers/mtd/maps/cdb89712.c index ab15dac2f936..9f17bb6c5a9d 100644 --- a/drivers/mtd/maps/cdb89712.c +++ b/drivers/mtd/maps/cdb89712.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Flash on Cirrus CDB89712 | 2 | * Flash on Cirrus CDB89712 |
3 | * | 3 | * |
4 | * $Id: cdb89712.c,v 1.10 2004/11/04 13:24:14 gleixner Exp $ | 4 | * $Id: cdb89712.c,v 1.11 2005/11/07 11:14:26 gleixner Exp $ |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
@@ -37,13 +37,13 @@ struct resource cdb89712_flash_resource = { | |||
37 | static int __init init_cdb89712_flash (void) | 37 | static int __init init_cdb89712_flash (void) |
38 | { | 38 | { |
39 | int err; | 39 | int err; |
40 | 40 | ||
41 | if (request_resource (&ioport_resource, &cdb89712_flash_resource)) { | 41 | if (request_resource (&ioport_resource, &cdb89712_flash_resource)) { |
42 | printk(KERN_NOTICE "Failed to reserve Cdb89712 FLASH space\n"); | 42 | printk(KERN_NOTICE "Failed to reserve Cdb89712 FLASH space\n"); |
43 | err = -EBUSY; | 43 | err = -EBUSY; |
44 | goto out; | 44 | goto out; |
45 | } | 45 | } |
46 | 46 | ||
47 | cdb89712_flash_map.virt = ioremap(FLASH_START, FLASH_SIZE); | 47 | cdb89712_flash_map.virt = ioremap(FLASH_START, FLASH_SIZE); |
48 | if (!cdb89712_flash_map.virt) { | 48 | if (!cdb89712_flash_map.virt) { |
49 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 FLASH space\n"); | 49 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 FLASH space\n"); |
@@ -64,13 +64,13 @@ static int __init init_cdb89712_flash (void) | |||
64 | } | 64 | } |
65 | 65 | ||
66 | flash_mtd->owner = THIS_MODULE; | 66 | flash_mtd->owner = THIS_MODULE; |
67 | 67 | ||
68 | if (add_mtd_device(flash_mtd)) { | 68 | if (add_mtd_device(flash_mtd)) { |
69 | printk("FLASH device addition failed\n"); | 69 | printk("FLASH device addition failed\n"); |
70 | err = -ENOMEM; | 70 | err = -ENOMEM; |
71 | goto out_probe; | 71 | goto out_probe; |
72 | } | 72 | } |
73 | 73 | ||
74 | return 0; | 74 | return 0; |
75 | 75 | ||
76 | out_probe: | 76 | out_probe: |
@@ -107,13 +107,13 @@ struct resource cdb89712_sram_resource = { | |||
107 | static int __init init_cdb89712_sram (void) | 107 | static int __init init_cdb89712_sram (void) |
108 | { | 108 | { |
109 | int err; | 109 | int err; |
110 | 110 | ||
111 | if (request_resource (&ioport_resource, &cdb89712_sram_resource)) { | 111 | if (request_resource (&ioport_resource, &cdb89712_sram_resource)) { |
112 | printk(KERN_NOTICE "Failed to reserve Cdb89712 SRAM space\n"); | 112 | printk(KERN_NOTICE "Failed to reserve Cdb89712 SRAM space\n"); |
113 | err = -EBUSY; | 113 | err = -EBUSY; |
114 | goto out; | 114 | goto out; |
115 | } | 115 | } |
116 | 116 | ||
117 | cdb89712_sram_map.virt = ioremap(SRAM_START, SRAM_SIZE); | 117 | cdb89712_sram_map.virt = ioremap(SRAM_START, SRAM_SIZE); |
118 | if (!cdb89712_sram_map.virt) { | 118 | if (!cdb89712_sram_map.virt) { |
119 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 SRAM space\n"); | 119 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 SRAM space\n"); |
@@ -130,13 +130,13 @@ static int __init init_cdb89712_sram (void) | |||
130 | 130 | ||
131 | sram_mtd->owner = THIS_MODULE; | 131 | sram_mtd->owner = THIS_MODULE; |
132 | sram_mtd->erasesize = 16; | 132 | sram_mtd->erasesize = 16; |
133 | 133 | ||
134 | if (add_mtd_device(sram_mtd)) { | 134 | if (add_mtd_device(sram_mtd)) { |
135 | printk("SRAM device addition failed\n"); | 135 | printk("SRAM device addition failed\n"); |
136 | err = -ENOMEM; | 136 | err = -ENOMEM; |
137 | goto out_probe; | 137 | goto out_probe; |
138 | } | 138 | } |
139 | 139 | ||
140 | return 0; | 140 | return 0; |
141 | 141 | ||
142 | out_probe: | 142 | out_probe: |
@@ -175,13 +175,13 @@ struct resource cdb89712_bootrom_resource = { | |||
175 | static int __init init_cdb89712_bootrom (void) | 175 | static int __init init_cdb89712_bootrom (void) |
176 | { | 176 | { |
177 | int err; | 177 | int err; |
178 | 178 | ||
179 | if (request_resource (&ioport_resource, &cdb89712_bootrom_resource)) { | 179 | if (request_resource (&ioport_resource, &cdb89712_bootrom_resource)) { |
180 | printk(KERN_NOTICE "Failed to reserve Cdb89712 BOOTROM space\n"); | 180 | printk(KERN_NOTICE "Failed to reserve Cdb89712 BOOTROM space\n"); |
181 | err = -EBUSY; | 181 | err = -EBUSY; |
182 | goto out; | 182 | goto out; |
183 | } | 183 | } |
184 | 184 | ||
185 | cdb89712_bootrom_map.virt = ioremap(BOOTROM_START, BOOTROM_SIZE); | 185 | cdb89712_bootrom_map.virt = ioremap(BOOTROM_START, BOOTROM_SIZE); |
186 | if (!cdb89712_bootrom_map.virt) { | 186 | if (!cdb89712_bootrom_map.virt) { |
187 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 BootROM space\n"); | 187 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 BootROM space\n"); |
@@ -198,13 +198,13 @@ static int __init init_cdb89712_bootrom (void) | |||
198 | 198 | ||
199 | bootrom_mtd->owner = THIS_MODULE; | 199 | bootrom_mtd->owner = THIS_MODULE; |
200 | bootrom_mtd->erasesize = 0x10000; | 200 | bootrom_mtd->erasesize = 0x10000; |
201 | 201 | ||
202 | if (add_mtd_device(bootrom_mtd)) { | 202 | if (add_mtd_device(bootrom_mtd)) { |
203 | printk("BootROM device addition failed\n"); | 203 | printk("BootROM device addition failed\n"); |
204 | err = -ENOMEM; | 204 | err = -ENOMEM; |
205 | goto out_probe; | 205 | goto out_probe; |
206 | } | 206 | } |
207 | 207 | ||
208 | return 0; | 208 | return 0; |
209 | 209 | ||
210 | out_probe: | 210 | out_probe: |
@@ -225,16 +225,16 @@ out: | |||
225 | static int __init init_cdb89712_maps(void) | 225 | static int __init init_cdb89712_maps(void) |
226 | { | 226 | { |
227 | 227 | ||
228 | printk(KERN_INFO "Cirrus CDB89712 MTD mappings:\n Flash 0x%x at 0x%x\n SRAM 0x%x at 0x%x\n BootROM 0x%x at 0x%x\n", | 228 | printk(KERN_INFO "Cirrus CDB89712 MTD mappings:\n Flash 0x%x at 0x%x\n SRAM 0x%x at 0x%x\n BootROM 0x%x at 0x%x\n", |
229 | FLASH_SIZE, FLASH_START, SRAM_SIZE, SRAM_START, BOOTROM_SIZE, BOOTROM_START); | 229 | FLASH_SIZE, FLASH_START, SRAM_SIZE, SRAM_START, BOOTROM_SIZE, BOOTROM_START); |
230 | 230 | ||
231 | init_cdb89712_flash(); | 231 | init_cdb89712_flash(); |
232 | init_cdb89712_sram(); | 232 | init_cdb89712_sram(); |
233 | init_cdb89712_bootrom(); | 233 | init_cdb89712_bootrom(); |
234 | 234 | ||
235 | return 0; | 235 | return 0; |
236 | } | 236 | } |
237 | 237 | ||
238 | 238 | ||
239 | static void __exit cleanup_cdb89712_maps(void) | 239 | static void __exit cleanup_cdb89712_maps(void) |
240 | { | 240 | { |
@@ -244,7 +244,7 @@ static void __exit cleanup_cdb89712_maps(void) | |||
244 | iounmap((void *)cdb89712_sram_map.virt); | 244 | iounmap((void *)cdb89712_sram_map.virt); |
245 | release_resource (&cdb89712_sram_resource); | 245 | release_resource (&cdb89712_sram_resource); |
246 | } | 246 | } |
247 | 247 | ||
248 | if (flash_mtd) { | 248 | if (flash_mtd) { |
249 | del_mtd_device(flash_mtd); | 249 | del_mtd_device(flash_mtd); |
250 | map_destroy(flash_mtd); | 250 | map_destroy(flash_mtd); |