diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-07 22:51:47 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-07 22:51:47 -0500 |
commit | 6b995751c2e851d2bc9c277b5884d0adb519e31d (patch) | |
tree | 7a15b41b5d8ce612915584a0773c670d5c0ab5b8 /drivers/mtd/maps/dc21285.c | |
parent | 6c2f4267833f453156f8f439cc32eb4c92f357b4 (diff) | |
parent | d27ba47e7e8c466c18983a1779d611f82d6a354f (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/mtd/maps/dc21285.c')
-rw-r--r-- | drivers/mtd/maps/dc21285.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c index e5b74169fde6..701620b6baed 100644 --- a/drivers/mtd/maps/dc21285.c +++ b/drivers/mtd/maps/dc21285.c | |||
@@ -4,8 +4,8 @@ | |||
4 | * (C) 2000 Nicolas Pitre <nico@cam.org> | 4 | * (C) 2000 Nicolas Pitre <nico@cam.org> |
5 | * | 5 | * |
6 | * This code is GPL | 6 | * This code is GPL |
7 | * | 7 | * |
8 | * $Id: dc21285.c,v 1.22 2004/11/01 13:39:21 rmk Exp $ | 8 | * $Id: dc21285.c,v 1.24 2005/11/07 11:14:26 gleixner Exp $ |
9 | */ | 9 | */ |
10 | #include <linux/config.h> | 10 | #include <linux/config.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
@@ -27,9 +27,9 @@ | |||
27 | static struct mtd_info *dc21285_mtd; | 27 | static struct mtd_info *dc21285_mtd; |
28 | 28 | ||
29 | #ifdef CONFIG_ARCH_NETWINDER | 29 | #ifdef CONFIG_ARCH_NETWINDER |
30 | /* | 30 | /* |
31 | * This is really ugly, but it seams to be the only | 31 | * This is really ugly, but it seams to be the only |
32 | * realiable way to do it, as the cpld state machine | 32 | * realiable way to do it, as the cpld state machine |
33 | * is unpredictible. So we have a 25us penalty per | 33 | * is unpredictible. So we have a 25us penalty per |
34 | * write access. | 34 | * write access. |
35 | */ | 35 | */ |
@@ -150,7 +150,7 @@ static struct map_info dc21285_map = { | |||
150 | static struct mtd_partition *dc21285_parts; | 150 | static struct mtd_partition *dc21285_parts; |
151 | static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; | 151 | static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; |
152 | #endif | 152 | #endif |
153 | 153 | ||
154 | static int __init init_dc21285(void) | 154 | static int __init init_dc21285(void) |
155 | { | 155 | { |
156 | 156 | ||
@@ -160,20 +160,20 @@ static int __init init_dc21285(void) | |||
160 | 160 | ||
161 | /* Determine bankwidth */ | 161 | /* Determine bankwidth */ |
162 | switch (*CSR_SA110_CNTL & (3<<14)) { | 162 | switch (*CSR_SA110_CNTL & (3<<14)) { |
163 | case SA110_CNTL_ROMWIDTH_8: | 163 | case SA110_CNTL_ROMWIDTH_8: |
164 | dc21285_map.bankwidth = 1; | 164 | dc21285_map.bankwidth = 1; |
165 | dc21285_map.read = dc21285_read8; | 165 | dc21285_map.read = dc21285_read8; |
166 | dc21285_map.write = dc21285_write8; | 166 | dc21285_map.write = dc21285_write8; |
167 | dc21285_map.copy_to = dc21285_copy_to_8; | 167 | dc21285_map.copy_to = dc21285_copy_to_8; |
168 | break; | 168 | break; |
169 | case SA110_CNTL_ROMWIDTH_16: | 169 | case SA110_CNTL_ROMWIDTH_16: |
170 | dc21285_map.bankwidth = 2; | 170 | dc21285_map.bankwidth = 2; |
171 | dc21285_map.read = dc21285_read16; | 171 | dc21285_map.read = dc21285_read16; |
172 | dc21285_map.write = dc21285_write16; | 172 | dc21285_map.write = dc21285_write16; |
173 | dc21285_map.copy_to = dc21285_copy_to_16; | 173 | dc21285_map.copy_to = dc21285_copy_to_16; |
174 | break; | 174 | break; |
175 | case SA110_CNTL_ROMWIDTH_32: | 175 | case SA110_CNTL_ROMWIDTH_32: |
176 | dc21285_map.bankwidth = 4; | 176 | dc21285_map.bankwidth = 4; |
177 | dc21285_map.read = dc21285_read32; | 177 | dc21285_map.read = dc21285_read32; |
178 | dc21285_map.write = dc21285_write32; | 178 | dc21285_map.write = dc21285_write32; |
179 | dc21285_map.copy_to = dc21285_copy_to_32; | 179 | dc21285_map.copy_to = dc21285_copy_to_32; |
@@ -201,20 +201,20 @@ static int __init init_dc21285(void) | |||
201 | if (!dc21285_mtd) { | 201 | if (!dc21285_mtd) { |
202 | iounmap(dc21285_map.virt); | 202 | iounmap(dc21285_map.virt); |
203 | return -ENXIO; | 203 | return -ENXIO; |
204 | } | 204 | } |
205 | 205 | ||
206 | dc21285_mtd->owner = THIS_MODULE; | 206 | dc21285_mtd->owner = THIS_MODULE; |
207 | 207 | ||
208 | #ifdef CONFIG_MTD_PARTITIONS | 208 | #ifdef CONFIG_MTD_PARTITIONS |
209 | nrparts = parse_mtd_partitions(dc21285_mtd, probes, &dc21285_parts, 0); | 209 | nrparts = parse_mtd_partitions(dc21285_mtd, probes, &dc21285_parts, 0); |
210 | if (nrparts > 0) | 210 | if (nrparts > 0) |
211 | add_mtd_partitions(dc21285_mtd, dc21285_parts, nrparts); | 211 | add_mtd_partitions(dc21285_mtd, dc21285_parts, nrparts); |
212 | else | 212 | else |
213 | #endif | 213 | #endif |
214 | add_mtd_device(dc21285_mtd); | 214 | add_mtd_device(dc21285_mtd); |
215 | 215 | ||
216 | if(machine_is_ebsa285()) { | 216 | if(machine_is_ebsa285()) { |
217 | /* | 217 | /* |
218 | * Flash timing is determined with bits 19-16 of the | 218 | * Flash timing is determined with bits 19-16 of the |
219 | * CSR_SA110_CNTL. The value is the number of wait cycles, or | 219 | * CSR_SA110_CNTL. The value is the number of wait cycles, or |
220 | * 0 for 16 cycles (the default). Cycles are 20 ns. | 220 | * 0 for 16 cycles (the default). Cycles are 20 ns. |
@@ -227,7 +227,7 @@ static int __init init_dc21285(void) | |||
227 | /* tristate time */ | 227 | /* tristate time */ |
228 | *CSR_SA110_CNTL = ((*CSR_SA110_CNTL & ~0x0f000000) | (7 << 24)); | 228 | *CSR_SA110_CNTL = ((*CSR_SA110_CNTL & ~0x0f000000) | (7 << 24)); |
229 | } | 229 | } |
230 | 230 | ||
231 | return 0; | 231 | return 0; |
232 | } | 232 | } |
233 | 233 | ||