aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips/cfi_cmdset_0001.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-25 15:25:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-25 15:25:48 -0400
commit7e97b28309edc5669ced2bb1371704e8f8d084e3 (patch)
tree9605694b00b4233a730ad86ea6d395cf59efc905 /drivers/mtd/chips/cfi_cmdset_0001.c
parent5421d059068341b3f21df1a21c2ba9175e55ebef (diff)
parent3887ed5231fb6f339f36c3a0297c996cd1a1dad9 (diff)
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (82 commits) [MTD] m25p80: Add Support for ATMEL AT25DF641 64-Megabit SPI Flash [MTD] m25p80: add FAST_READ access support to M25Pxx [MTD] [NAND] bf5xx_nand: Avoid crash if bfin_mac is installed. [MTD] [NAND] at91_nand: control NCE signal [MTD] [NAND] AT91 hardware ECC compile fix for at91sam9263 / at91sam9260 [MTD] [NAND] Hardware ECC controller on at91sam9263 / at91sam9260 [JFFS2] Introduce dbg_readinode2 log level, use it to shut read_dnode() up [JFFS2] Fix jffs2_reserve_space() when all blocks are pending erasure. [JFFS2] Add erase_checking_list to hold blocks being marked. UBI: add a message [JFFS2] Return values of jffs2_block_check_erase error paths [MTD] Clean up AR7 partition map support [MTD] [NOR] Fix Intel CFI driver for collie flash [JFFS2] Finally remove redundant ref->__totlen field. [JFFS2] Honour TEST_TOTLEN macro in debugging code. ref->__totlen is going! [JFFS2] Add paranoia debugging for superblock counts [JFFS2] Fix free space leak with in-band cleanmarkers [JFFS2] Self-sufficient #includes in jffs2_fs_i.h: include <linux/mutex.h> [MTD] [NAND] Verify probe by retrying to checking the results match [MTD] [NAND] S3C2410 Allow ECC disable to be specified by the board ...
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0001.c')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 0080452531d6..e812df607a5c 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -384,7 +384,7 @@ read_pri_intelext(struct map_info *map, __u16 adr)
384 if (extp_size > 4096) { 384 if (extp_size > 4096) {
385 printk(KERN_ERR 385 printk(KERN_ERR
386 "%s: cfi_pri_intelext is too fat\n", 386 "%s: cfi_pri_intelext is too fat\n",
387 __FUNCTION__); 387 __func__);
388 return NULL; 388 return NULL;
389 } 389 }
390 goto again; 390 goto again;
@@ -619,6 +619,9 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
619 sizeof(struct cfi_intelext_blockinfo); 619 sizeof(struct cfi_intelext_blockinfo);
620 } 620 }
621 621
622 if (!numparts)
623 numparts = 1;
624
622 /* Programming Region info */ 625 /* Programming Region info */
623 if (extp->MinorVersion >= '4') { 626 if (extp->MinorVersion >= '4') {
624 struct cfi_intelext_programming_regioninfo *prinfo; 627 struct cfi_intelext_programming_regioninfo *prinfo;
@@ -641,7 +644,7 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
641 if ((1 << partshift) < mtd->erasesize) { 644 if ((1 << partshift) < mtd->erasesize) {
642 printk( KERN_ERR 645 printk( KERN_ERR
643 "%s: bad number of hw partitions (%d)\n", 646 "%s: bad number of hw partitions (%d)\n",
644 __FUNCTION__, numparts); 647 __func__, numparts);
645 return -EINVAL; 648 return -EINVAL;
646 } 649 }
647 650
@@ -1071,10 +1074,10 @@ static int __xipram xip_wait_for_operation(
1071 chip->state = newstate; 1074 chip->state = newstate;
1072 map_write(map, CMD(0xff), adr); 1075 map_write(map, CMD(0xff), adr);
1073 (void) map_read(map, adr); 1076 (void) map_read(map, adr);
1074 asm volatile (".rep 8; nop; .endr"); 1077 xip_iprefetch();
1075 local_irq_enable(); 1078 local_irq_enable();
1076 spin_unlock(chip->mutex); 1079 spin_unlock(chip->mutex);
1077 asm volatile (".rep 8; nop; .endr"); 1080 xip_iprefetch();
1078 cond_resched(); 1081 cond_resched();
1079 1082
1080 /* 1083 /*
@@ -2013,7 +2016,7 @@ static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, size_t len)
2013 2016
2014#ifdef DEBUG_LOCK_BITS 2017#ifdef DEBUG_LOCK_BITS
2015 printk(KERN_DEBUG "%s: lock status before, ofs=0x%08llx, len=0x%08X\n", 2018 printk(KERN_DEBUG "%s: lock status before, ofs=0x%08llx, len=0x%08X\n",
2016 __FUNCTION__, ofs, len); 2019 __func__, ofs, len);
2017 cfi_varsize_frob(mtd, do_printlockstatus_oneblock, 2020 cfi_varsize_frob(mtd, do_printlockstatus_oneblock,
2018 ofs, len, NULL); 2021 ofs, len, NULL);
2019#endif 2022#endif
@@ -2023,7 +2026,7 @@ static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, size_t len)
2023 2026
2024#ifdef DEBUG_LOCK_BITS 2027#ifdef DEBUG_LOCK_BITS
2025 printk(KERN_DEBUG "%s: lock status after, ret=%d\n", 2028 printk(KERN_DEBUG "%s: lock status after, ret=%d\n",
2026 __FUNCTION__, ret); 2029 __func__, ret);
2027 cfi_varsize_frob(mtd, do_printlockstatus_oneblock, 2030 cfi_varsize_frob(mtd, do_printlockstatus_oneblock,
2028 ofs, len, NULL); 2031 ofs, len, NULL);
2029#endif 2032#endif
@@ -2037,7 +2040,7 @@ static int cfi_intelext_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
2037 2040
2038#ifdef DEBUG_LOCK_BITS 2041#ifdef DEBUG_LOCK_BITS
2039 printk(KERN_DEBUG "%s: lock status before, ofs=0x%08llx, len=0x%08X\n", 2042 printk(KERN_DEBUG "%s: lock status before, ofs=0x%08llx, len=0x%08X\n",
2040 __FUNCTION__, ofs, len); 2043 __func__, ofs, len);
2041 cfi_varsize_frob(mtd, do_printlockstatus_oneblock, 2044 cfi_varsize_frob(mtd, do_printlockstatus_oneblock,
2042 ofs, len, NULL); 2045 ofs, len, NULL);
2043#endif 2046#endif
@@ -2047,7 +2050,7 @@ static int cfi_intelext_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
2047 2050
2048#ifdef DEBUG_LOCK_BITS 2051#ifdef DEBUG_LOCK_BITS
2049 printk(KERN_DEBUG "%s: lock status after, ret=%d\n", 2052 printk(KERN_DEBUG "%s: lock status after, ret=%d\n",
2050 __FUNCTION__, ret); 2053 __func__, ret);
2051 cfi_varsize_frob(mtd, do_printlockstatus_oneblock, 2054 cfi_varsize_frob(mtd, do_printlockstatus_oneblock,
2052 ofs, len, NULL); 2055 ofs, len, NULL);
2053#endif 2056#endif