Loading drivers/mtd/chips/cfi_cmdset_0002.c +4 −6 Original line number Diff line number Diff line Loading @@ -440,8 +440,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) mtd->writesize = 1; mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; pr_debug("MTD %s(): write buffer size %d\n", __func__, mtd->writebufsize); pr_debug("MTD %s(): write buffer size %d\n", __func__, mtd->writebufsize); mtd->reboot_notifier.notifier_call = cfi_amdstd_reboot; Loading Loading @@ -1798,8 +1798,7 @@ static int do_atmel_lock(struct map_info *map, struct flchip *chip, goto out_unlock; chip->state = FL_LOCKING; pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", __func__, adr, len); pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", __func__, adr, len); cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); Loading Loading @@ -1834,8 +1833,7 @@ static int do_atmel_unlock(struct map_info *map, struct flchip *chip, goto out_unlock; chip->state = FL_UNLOCKING; pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", __func__, adr, len); pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", __func__, adr, len); cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); Loading drivers/mtd/devices/m25p80.c +14 −19 Original line number Diff line number Diff line Loading @@ -208,8 +208,7 @@ static int wait_till_ready(struct m25p *flash) */ static int erase_chip(struct m25p *flash) { pr_debug("%s: %s %lldKiB\n", dev_name(&flash->spi->dev), __func__, pr_debug("%s: %s %lldKiB\n", dev_name(&flash->spi->dev), __func__, (long long)(flash->mtd.size >> 10)); /* Wait until finished previous write command. */ Loading Loading @@ -249,9 +248,8 @@ static int m25p_cmdsz(struct m25p *flash) */ static int erase_sector(struct m25p *flash, u32 offset) { pr_debug("%s: %s %dKiB at 0x%08x\n", dev_name(&flash->spi->dev), __func__, flash->mtd.erasesize / 1024, offset); pr_debug("%s: %s %dKiB at 0x%08x\n", dev_name(&flash->spi->dev), __func__, flash->mtd.erasesize / 1024, offset); /* Wait until finished previous write command. */ if (wait_till_ready(flash)) Loading Loading @@ -285,9 +283,9 @@ static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr) u32 addr,len; uint32_t rem; pr_debug("%s: %s %s 0x%llx, len %lld\n", dev_name(&flash->spi->dev), __func__, "at", (long long)instr->addr, (long long)instr->len); pr_debug("%s: %s at 0x%llx, len %lld\n", dev_name(&flash->spi->dev), __func__, (long long)instr->addr, (long long)instr->len); /* sanity checks */ if (instr->addr + instr->len > flash->mtd.size) Loading Loading @@ -347,9 +345,8 @@ static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len, struct spi_transfer t[2]; struct spi_message m; pr_debug("%s: %s %s 0x%08x, len %zd\n", dev_name(&flash->spi->dev), __func__, "from", (u32)from, len); pr_debug("%s: %s from 0x%08x, len %zd\n", dev_name(&flash->spi->dev), __func__, (u32)from, len); /* sanity checks */ if (!len) Loading Loading @@ -416,9 +413,8 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len, struct spi_transfer t[2]; struct spi_message m; pr_debug("%s: %s %s 0x%08x, len %zd\n", dev_name(&flash->spi->dev), __func__, "to", (u32)to, len); pr_debug("%s: %s to 0x%08x, len %zd\n", dev_name(&flash->spi->dev), __func__, (u32)to, len); *retlen = 0; Loading Loading @@ -509,9 +505,8 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len, size_t actual; int cmd_sz, ret; pr_debug("%s: %s %s 0x%08x, len %zd\n", dev_name(&flash->spi->dev), __func__, "to", (u32)to, len); pr_debug("%s: %s to 0x%08x, len %zd\n", dev_name(&flash->spi->dev), __func__, (u32)to, len); *retlen = 0; Loading drivers/mtd/devices/mtd_dataflash.c +9 −9 Original line number Diff line number Diff line Loading @@ -249,8 +249,8 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len, uint8_t *command; int status; pr_debug("%s: read 0x%x..0x%x\n", dev_name(&priv->spi->dev), (unsigned)from, (unsigned)(from + len)); pr_debug("%s: read 0x%x..0x%x\n", dev_name(&priv->spi->dev), (unsigned)from, (unsigned)(from + len)); *retlen = 0; Loading Loading @@ -906,14 +906,14 @@ static int __devinit dataflash_probe(struct spi_device *spi) break; /* obsolete AT45DB1282 not (yet?) supported */ default: pr_debug("%s: unsupported device (%x)\n", dev_name(&spi->dev), status & 0x3c); pr_debug("%s: unsupported device (%x)\n", dev_name(&spi->dev), status & 0x3c); status = -ENODEV; } if (status < 0) pr_debug("%s: add_dataflash --> %d\n", dev_name(&spi->dev), status); pr_debug("%s: add_dataflash --> %d\n", dev_name(&spi->dev), status); return status; } Loading drivers/mtd/inftlcore.c +16 −19 Original line number Diff line number Diff line Loading @@ -213,16 +213,16 @@ static u16 INFTL_findfreeblock(struct INFTLrecord *inftl, int desperate) u16 pot = inftl->LastFreeEUN; int silly = inftl->nb_blocks; pr_debug("INFTL: INFTL_findfreeblock(inftl=%p," "desperate=%d)\n", inftl, desperate); pr_debug("INFTL: INFTL_findfreeblock(inftl=%p,desperate=%d)\n", inftl, desperate); /* * Normally, we force a fold to happen before we run out of free * blocks completely. */ if (!desperate && inftl->numfreeEUNs < 2) { pr_debug("INFTL: there are too few free " "EUNs (%d)\n", inftl->numfreeEUNs); pr_debug("INFTL: there are too few free EUNs (%d)\n", inftl->numfreeEUNs); return BLOCK_NIL; } Loading Loading @@ -257,8 +257,8 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned struct inftl_oob oob; size_t retlen; pr_debug("INFTL: INFTL_foldchain(inftl=%p,thisVUC=%d," "pending=%d)\n", inftl, thisVUC, pendingblock); pr_debug("INFTL: INFTL_foldchain(inftl=%p,thisVUC=%d,pending=%d)\n", inftl, thisVUC, pendingblock); memset(BlockMap, 0xff, sizeof(BlockMap)); memset(BlockDeleted, 0, sizeof(BlockDeleted)); Loading Loading @@ -321,8 +321,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned * Chain, and the Erase Unit into which we are supposed to be copying. * Go for it. */ pr_debug("INFTL: folding chain %d into unit %d\n", thisVUC, targetEUN); pr_debug("INFTL: folding chain %d into unit %d\n", thisVUC, targetEUN); for (block = 0; block < inftl->EraseSize/SECTORSIZE ; block++) { unsigned char movebuf[SECTORSIZE]; Loading Loading @@ -353,8 +352,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned (block * SECTORSIZE), SECTORSIZE, &retlen, movebuf); if (ret != -EIO) pr_debug("INFTL: error went " "away on retry?\n"); pr_debug("INFTL: error went away on retry?\n"); } memset(&oob, 0xff, sizeof(struct inftl_oob)); oob.b.Status = oob.b.Status1 = SECTOR_USED; Loading @@ -370,8 +368,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned * is important, by doing oldest first if we crash/reboot then it * it is relatively simple to clean up the mess). */ pr_debug("INFTL: want to erase virtual chain %d\n", thisVUC); pr_debug("INFTL: want to erase virtual chain %d\n", thisVUC); for (;;) { /* Find oldest unit in chain. */ Loading Loading @@ -482,8 +479,8 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block) size_t retlen; int silly, silly2 = 3; pr_debug("INFTL: INFTL_findwriteunit(inftl=%p," "block=%d)\n", inftl, block); pr_debug("INFTL: INFTL_findwriteunit(inftl=%p,block=%d)\n", inftl, block); do { /* Loading @@ -499,8 +496,8 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block) blockofs, 8, &retlen, (char *)&bci); status = bci.Status | bci.Status1; pr_debug("INFTL: status of block %d in " "EUN %d is %x\n", block , writeEUN, status); pr_debug("INFTL: status of block %d in EUN %d is %x\n", block , writeEUN, status); switch(status) { case SECTOR_FREE: Loading Loading @@ -553,9 +550,9 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block) * Hopefully we free something, lets try again. * This time we are desperate... */ pr_debug("INFTL: using desperate==1 " "to find free EUN to accommodate write to " "VUC %d\n", thisVUC); pr_debug("INFTL: using desperate==1 to find free EUN " "to accommodate write to VUC %d\n", thisVUC); writeEUN = INFTL_findfreeblock(inftl, 1); if (writeEUN == BLOCK_NIL) { /* Loading drivers/mtd/inftlmount.c +1 −2 Original line number Diff line number Diff line Loading @@ -385,8 +385,7 @@ int INFTL_formatblock(struct INFTLrecord *inftl, int block) struct mtd_info *mtd = inftl->mbd.mtd; int physblock; pr_debug("INFTL: INFTL_formatblock(inftl=%p," "block=%d)\n", inftl, block); pr_debug("INFTL: INFTL_formatblock(inftl=%p,block=%d)\n", inftl, block); memset(instr, 0, sizeof(struct erase_info)); Loading Loading
drivers/mtd/chips/cfi_cmdset_0002.c +4 −6 Original line number Diff line number Diff line Loading @@ -440,8 +440,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) mtd->writesize = 1; mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; pr_debug("MTD %s(): write buffer size %d\n", __func__, mtd->writebufsize); pr_debug("MTD %s(): write buffer size %d\n", __func__, mtd->writebufsize); mtd->reboot_notifier.notifier_call = cfi_amdstd_reboot; Loading Loading @@ -1798,8 +1798,7 @@ static int do_atmel_lock(struct map_info *map, struct flchip *chip, goto out_unlock; chip->state = FL_LOCKING; pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", __func__, adr, len); pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", __func__, adr, len); cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); Loading Loading @@ -1834,8 +1833,7 @@ static int do_atmel_unlock(struct map_info *map, struct flchip *chip, goto out_unlock; chip->state = FL_UNLOCKING; pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", __func__, adr, len); pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", __func__, adr, len); cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); Loading
drivers/mtd/devices/m25p80.c +14 −19 Original line number Diff line number Diff line Loading @@ -208,8 +208,7 @@ static int wait_till_ready(struct m25p *flash) */ static int erase_chip(struct m25p *flash) { pr_debug("%s: %s %lldKiB\n", dev_name(&flash->spi->dev), __func__, pr_debug("%s: %s %lldKiB\n", dev_name(&flash->spi->dev), __func__, (long long)(flash->mtd.size >> 10)); /* Wait until finished previous write command. */ Loading Loading @@ -249,9 +248,8 @@ static int m25p_cmdsz(struct m25p *flash) */ static int erase_sector(struct m25p *flash, u32 offset) { pr_debug("%s: %s %dKiB at 0x%08x\n", dev_name(&flash->spi->dev), __func__, flash->mtd.erasesize / 1024, offset); pr_debug("%s: %s %dKiB at 0x%08x\n", dev_name(&flash->spi->dev), __func__, flash->mtd.erasesize / 1024, offset); /* Wait until finished previous write command. */ if (wait_till_ready(flash)) Loading Loading @@ -285,9 +283,9 @@ static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr) u32 addr,len; uint32_t rem; pr_debug("%s: %s %s 0x%llx, len %lld\n", dev_name(&flash->spi->dev), __func__, "at", (long long)instr->addr, (long long)instr->len); pr_debug("%s: %s at 0x%llx, len %lld\n", dev_name(&flash->spi->dev), __func__, (long long)instr->addr, (long long)instr->len); /* sanity checks */ if (instr->addr + instr->len > flash->mtd.size) Loading Loading @@ -347,9 +345,8 @@ static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len, struct spi_transfer t[2]; struct spi_message m; pr_debug("%s: %s %s 0x%08x, len %zd\n", dev_name(&flash->spi->dev), __func__, "from", (u32)from, len); pr_debug("%s: %s from 0x%08x, len %zd\n", dev_name(&flash->spi->dev), __func__, (u32)from, len); /* sanity checks */ if (!len) Loading Loading @@ -416,9 +413,8 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len, struct spi_transfer t[2]; struct spi_message m; pr_debug("%s: %s %s 0x%08x, len %zd\n", dev_name(&flash->spi->dev), __func__, "to", (u32)to, len); pr_debug("%s: %s to 0x%08x, len %zd\n", dev_name(&flash->spi->dev), __func__, (u32)to, len); *retlen = 0; Loading Loading @@ -509,9 +505,8 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len, size_t actual; int cmd_sz, ret; pr_debug("%s: %s %s 0x%08x, len %zd\n", dev_name(&flash->spi->dev), __func__, "to", (u32)to, len); pr_debug("%s: %s to 0x%08x, len %zd\n", dev_name(&flash->spi->dev), __func__, (u32)to, len); *retlen = 0; Loading
drivers/mtd/devices/mtd_dataflash.c +9 −9 Original line number Diff line number Diff line Loading @@ -249,8 +249,8 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len, uint8_t *command; int status; pr_debug("%s: read 0x%x..0x%x\n", dev_name(&priv->spi->dev), (unsigned)from, (unsigned)(from + len)); pr_debug("%s: read 0x%x..0x%x\n", dev_name(&priv->spi->dev), (unsigned)from, (unsigned)(from + len)); *retlen = 0; Loading Loading @@ -906,14 +906,14 @@ static int __devinit dataflash_probe(struct spi_device *spi) break; /* obsolete AT45DB1282 not (yet?) supported */ default: pr_debug("%s: unsupported device (%x)\n", dev_name(&spi->dev), status & 0x3c); pr_debug("%s: unsupported device (%x)\n", dev_name(&spi->dev), status & 0x3c); status = -ENODEV; } if (status < 0) pr_debug("%s: add_dataflash --> %d\n", dev_name(&spi->dev), status); pr_debug("%s: add_dataflash --> %d\n", dev_name(&spi->dev), status); return status; } Loading
drivers/mtd/inftlcore.c +16 −19 Original line number Diff line number Diff line Loading @@ -213,16 +213,16 @@ static u16 INFTL_findfreeblock(struct INFTLrecord *inftl, int desperate) u16 pot = inftl->LastFreeEUN; int silly = inftl->nb_blocks; pr_debug("INFTL: INFTL_findfreeblock(inftl=%p," "desperate=%d)\n", inftl, desperate); pr_debug("INFTL: INFTL_findfreeblock(inftl=%p,desperate=%d)\n", inftl, desperate); /* * Normally, we force a fold to happen before we run out of free * blocks completely. */ if (!desperate && inftl->numfreeEUNs < 2) { pr_debug("INFTL: there are too few free " "EUNs (%d)\n", inftl->numfreeEUNs); pr_debug("INFTL: there are too few free EUNs (%d)\n", inftl->numfreeEUNs); return BLOCK_NIL; } Loading Loading @@ -257,8 +257,8 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned struct inftl_oob oob; size_t retlen; pr_debug("INFTL: INFTL_foldchain(inftl=%p,thisVUC=%d," "pending=%d)\n", inftl, thisVUC, pendingblock); pr_debug("INFTL: INFTL_foldchain(inftl=%p,thisVUC=%d,pending=%d)\n", inftl, thisVUC, pendingblock); memset(BlockMap, 0xff, sizeof(BlockMap)); memset(BlockDeleted, 0, sizeof(BlockDeleted)); Loading Loading @@ -321,8 +321,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned * Chain, and the Erase Unit into which we are supposed to be copying. * Go for it. */ pr_debug("INFTL: folding chain %d into unit %d\n", thisVUC, targetEUN); pr_debug("INFTL: folding chain %d into unit %d\n", thisVUC, targetEUN); for (block = 0; block < inftl->EraseSize/SECTORSIZE ; block++) { unsigned char movebuf[SECTORSIZE]; Loading Loading @@ -353,8 +352,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned (block * SECTORSIZE), SECTORSIZE, &retlen, movebuf); if (ret != -EIO) pr_debug("INFTL: error went " "away on retry?\n"); pr_debug("INFTL: error went away on retry?\n"); } memset(&oob, 0xff, sizeof(struct inftl_oob)); oob.b.Status = oob.b.Status1 = SECTOR_USED; Loading @@ -370,8 +368,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned * is important, by doing oldest first if we crash/reboot then it * it is relatively simple to clean up the mess). */ pr_debug("INFTL: want to erase virtual chain %d\n", thisVUC); pr_debug("INFTL: want to erase virtual chain %d\n", thisVUC); for (;;) { /* Find oldest unit in chain. */ Loading Loading @@ -482,8 +479,8 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block) size_t retlen; int silly, silly2 = 3; pr_debug("INFTL: INFTL_findwriteunit(inftl=%p," "block=%d)\n", inftl, block); pr_debug("INFTL: INFTL_findwriteunit(inftl=%p,block=%d)\n", inftl, block); do { /* Loading @@ -499,8 +496,8 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block) blockofs, 8, &retlen, (char *)&bci); status = bci.Status | bci.Status1; pr_debug("INFTL: status of block %d in " "EUN %d is %x\n", block , writeEUN, status); pr_debug("INFTL: status of block %d in EUN %d is %x\n", block , writeEUN, status); switch(status) { case SECTOR_FREE: Loading Loading @@ -553,9 +550,9 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block) * Hopefully we free something, lets try again. * This time we are desperate... */ pr_debug("INFTL: using desperate==1 " "to find free EUN to accommodate write to " "VUC %d\n", thisVUC); pr_debug("INFTL: using desperate==1 to find free EUN " "to accommodate write to VUC %d\n", thisVUC); writeEUN = INFTL_findfreeblock(inftl, 1); if (writeEUN == BLOCK_NIL) { /* Loading
drivers/mtd/inftlmount.c +1 −2 Original line number Diff line number Diff line Loading @@ -385,8 +385,7 @@ int INFTL_formatblock(struct INFTLrecord *inftl, int block) struct mtd_info *mtd = inftl->mbd.mtd; int physblock; pr_debug("INFTL: INFTL_formatblock(inftl=%p," "block=%d)\n", inftl, block); pr_debug("INFTL: INFTL_formatblock(inftl=%p,block=%d)\n", inftl, block); memset(instr, 0, sizeof(struct erase_info)); Loading