diff options
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 47 |
1 files changed, 8 insertions, 39 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index 3e6c47bdce53..19344763fc56 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c | |||
@@ -317,14 +317,14 @@ static void fixup_s29gl032n_sectors(struct mtd_info *mtd, void *param) | |||
317 | 317 | ||
318 | /* Used to fix CFI-Tables of chips without Extended Query Tables */ | 318 | /* Used to fix CFI-Tables of chips without Extended Query Tables */ |
319 | static struct cfi_fixup cfi_nopri_fixup_table[] = { | 319 | static struct cfi_fixup cfi_nopri_fixup_table[] = { |
320 | { CFI_MFR_SST, 0x234A, fixup_sst39vf, NULL, }, // SST39VF1602 | 320 | { CFI_MFR_SST, 0x234A, fixup_sst39vf, NULL, }, /* SST39VF1602 */ |
321 | { CFI_MFR_SST, 0x234B, fixup_sst39vf, NULL, }, // SST39VF1601 | 321 | { CFI_MFR_SST, 0x234B, fixup_sst39vf, NULL, }, /* SST39VF1601 */ |
322 | { CFI_MFR_SST, 0x235A, fixup_sst39vf, NULL, }, // SST39VF3202 | 322 | { CFI_MFR_SST, 0x235A, fixup_sst39vf, NULL, }, /* SST39VF3202 */ |
323 | { CFI_MFR_SST, 0x235B, fixup_sst39vf, NULL, }, // SST39VF3201 | 323 | { CFI_MFR_SST, 0x235B, fixup_sst39vf, NULL, }, /* SST39VF3201 */ |
324 | { CFI_MFR_SST, 0x235C, fixup_sst39vf_rev_b, NULL, }, // SST39VF3202B | 324 | { CFI_MFR_SST, 0x235C, fixup_sst39vf_rev_b, NULL, }, /* SST39VF3202B */ |
325 | { CFI_MFR_SST, 0x235D, fixup_sst39vf_rev_b, NULL, }, // SST39VF3201B | 325 | { CFI_MFR_SST, 0x235D, fixup_sst39vf_rev_b, NULL, }, /* SST39VF3201B */ |
326 | { CFI_MFR_SST, 0x236C, fixup_sst39vf_rev_b, NULL, }, // SST39VF6402B | 326 | { CFI_MFR_SST, 0x236C, fixup_sst39vf_rev_b, NULL, }, /* SST39VF6402B */ |
327 | { CFI_MFR_SST, 0x236D, fixup_sst39vf_rev_b, NULL, }, // SST39VF6401B | 327 | { CFI_MFR_SST, 0x236D, fixup_sst39vf_rev_b, NULL, }, /* SST39VF6401B */ |
328 | { 0, 0, NULL, NULL } | 328 | { 0, 0, NULL, NULL } |
329 | }; | 329 | }; |
330 | 330 | ||
@@ -545,15 +545,6 @@ static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd) | |||
545 | printk(KERN_WARNING "Sum of regions (%lx) != total size of set of interleaved chips (%lx)\n", offset, devsize); | 545 | printk(KERN_WARNING "Sum of regions (%lx) != total size of set of interleaved chips (%lx)\n", offset, devsize); |
546 | goto setup_err; | 546 | goto setup_err; |
547 | } | 547 | } |
548 | #if 0 | ||
549 | // debug | ||
550 | for (i=0; i<mtd->numeraseregions;i++){ | ||
551 | printk("%d: offset=0x%x,size=0x%x,blocks=%d\n", | ||
552 | i,mtd->eraseregions[i].offset, | ||
553 | mtd->eraseregions[i].erasesize, | ||
554 | mtd->eraseregions[i].numblocks); | ||
555 | } | ||
556 | #endif | ||
557 | 548 | ||
558 | __module_get(THIS_MODULE); | 549 | __module_get(THIS_MODULE); |
559 | register_reboot_notifier(&mtd->reboot_notifier); | 550 | register_reboot_notifier(&mtd->reboot_notifier); |
@@ -1025,9 +1016,6 @@ static inline int do_read_secsi_onechip(struct map_info *map, struct flchip *chi | |||
1025 | mutex_lock(&chip->mutex); | 1016 | mutex_lock(&chip->mutex); |
1026 | 1017 | ||
1027 | if (chip->state != FL_READY){ | 1018 | if (chip->state != FL_READY){ |
1028 | #if 0 | ||
1029 | printk(KERN_DEBUG "Waiting for chip to read, status = %d\n", chip->state); | ||
1030 | #endif | ||
1031 | set_current_state(TASK_UNINTERRUPTIBLE); | 1019 | set_current_state(TASK_UNINTERRUPTIBLE); |
1032 | add_wait_queue(&chip->wq, &wait); | 1020 | add_wait_queue(&chip->wq, &wait); |
1033 | 1021 | ||
@@ -1035,10 +1023,6 @@ static inline int do_read_secsi_onechip(struct map_info *map, struct flchip *chi | |||
1035 | 1023 | ||
1036 | schedule(); | 1024 | schedule(); |
1037 | remove_wait_queue(&chip->wq, &wait); | 1025 | remove_wait_queue(&chip->wq, &wait); |
1038 | #if 0 | ||
1039 | if(signal_pending(current)) | ||
1040 | return -EINTR; | ||
1041 | #endif | ||
1042 | timeo = jiffies + HZ; | 1026 | timeo = jiffies + HZ; |
1043 | 1027 | ||
1044 | goto retry; | 1028 | goto retry; |
@@ -1246,9 +1230,6 @@ static int cfi_amdstd_write_words(struct mtd_info *mtd, loff_t to, size_t len, | |||
1246 | mutex_lock(&cfi->chips[chipnum].mutex); | 1230 | mutex_lock(&cfi->chips[chipnum].mutex); |
1247 | 1231 | ||
1248 | if (cfi->chips[chipnum].state != FL_READY) { | 1232 | if (cfi->chips[chipnum].state != FL_READY) { |
1249 | #if 0 | ||
1250 | printk(KERN_DEBUG "Waiting for chip to write, status = %d\n", cfi->chips[chipnum].state); | ||
1251 | #endif | ||
1252 | set_current_state(TASK_UNINTERRUPTIBLE); | 1233 | set_current_state(TASK_UNINTERRUPTIBLE); |
1253 | add_wait_queue(&cfi->chips[chipnum].wq, &wait); | 1234 | add_wait_queue(&cfi->chips[chipnum].wq, &wait); |
1254 | 1235 | ||
@@ -1256,10 +1237,6 @@ static int cfi_amdstd_write_words(struct mtd_info *mtd, loff_t to, size_t len, | |||
1256 | 1237 | ||
1257 | schedule(); | 1238 | schedule(); |
1258 | remove_wait_queue(&cfi->chips[chipnum].wq, &wait); | 1239 | remove_wait_queue(&cfi->chips[chipnum].wq, &wait); |
1259 | #if 0 | ||
1260 | if(signal_pending(current)) | ||
1261 | return -EINTR; | ||
1262 | #endif | ||
1263 | goto retry; | 1240 | goto retry; |
1264 | } | 1241 | } |
1265 | 1242 | ||
@@ -1324,9 +1301,6 @@ static int cfi_amdstd_write_words(struct mtd_info *mtd, loff_t to, size_t len, | |||
1324 | mutex_lock(&cfi->chips[chipnum].mutex); | 1301 | mutex_lock(&cfi->chips[chipnum].mutex); |
1325 | 1302 | ||
1326 | if (cfi->chips[chipnum].state != FL_READY) { | 1303 | if (cfi->chips[chipnum].state != FL_READY) { |
1327 | #if 0 | ||
1328 | printk(KERN_DEBUG "Waiting for chip to write, status = %d\n", cfi->chips[chipnum].state); | ||
1329 | #endif | ||
1330 | set_current_state(TASK_UNINTERRUPTIBLE); | 1304 | set_current_state(TASK_UNINTERRUPTIBLE); |
1331 | add_wait_queue(&cfi->chips[chipnum].wq, &wait); | 1305 | add_wait_queue(&cfi->chips[chipnum].wq, &wait); |
1332 | 1306 | ||
@@ -1334,10 +1308,6 @@ static int cfi_amdstd_write_words(struct mtd_info *mtd, loff_t to, size_t len, | |||
1334 | 1308 | ||
1335 | schedule(); | 1309 | schedule(); |
1336 | remove_wait_queue(&cfi->chips[chipnum].wq, &wait); | 1310 | remove_wait_queue(&cfi->chips[chipnum].wq, &wait); |
1337 | #if 0 | ||
1338 | if(signal_pending(current)) | ||
1339 | return -EINTR; | ||
1340 | #endif | ||
1341 | goto retry1; | 1311 | goto retry1; |
1342 | } | 1312 | } |
1343 | 1313 | ||
@@ -1396,7 +1366,6 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, | |||
1396 | 1366 | ||
1397 | cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); | 1367 | cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); |
1398 | cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); | 1368 | cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); |
1399 | //cfi_send_gen_cmd(0xA0, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); | ||
1400 | 1369 | ||
1401 | /* Write Buffer Load */ | 1370 | /* Write Buffer Load */ |
1402 | map_write(map, CMD(0x25), cmd_adr); | 1371 | map_write(map, CMD(0x25), cmd_adr); |