diff options
author | Brian Norris <computersforpeace@gmail.com> | 2011-07-19 13:06:09 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-09-11 08:02:16 -0400 |
commit | 289c05222172b51401dbbb017115655f241d94ab (patch) | |
tree | 1fd2c801102a8c4a085f75a08c766d3250491962 | |
parent | d037021953922ebdbc34b98b8c4648017b1c6e89 (diff) |
mtd: replace DEBUG() with pr_debug()
Start moving away from the MTD_DEBUG_LEVEL messages. The dynamic
debugging feature is a generic kernel feature that provides more
flexibility.
(See Documentation/dynamic-debug-howto.txt)
Also fix some punctuation, indentation, and capitalization that went
along with the affected lines.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
26 files changed, 216 insertions, 249 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index 23175edd5634..2302cc00b4a9 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c | |||
@@ -145,8 +145,7 @@ static void fixup_amd_bootblock(struct mtd_info *mtd) | |||
145 | if (((major << 8) | minor) < 0x3131) { | 145 | if (((major << 8) | minor) < 0x3131) { |
146 | /* CFI version 1.0 => don't trust bootloc */ | 146 | /* CFI version 1.0 => don't trust bootloc */ |
147 | 147 | ||
148 | DEBUG(MTD_DEBUG_LEVEL1, | 148 | pr_debug("%s: JEDEC Vendor ID is 0x%02X Device ID is 0x%02X\n", |
149 | "%s: JEDEC Vendor ID is 0x%02X Device ID is 0x%02X\n", | ||
150 | map->name, cfi->mfr, cfi->id); | 149 | map->name, cfi->mfr, cfi->id); |
151 | 150 | ||
152 | /* AFAICS all 29LV400 with a bottom boot block have a device ID | 151 | /* AFAICS all 29LV400 with a bottom boot block have a device ID |
@@ -166,8 +165,7 @@ static void fixup_amd_bootblock(struct mtd_info *mtd) | |||
166 | * the 8-bit device ID. | 165 | * the 8-bit device ID. |
167 | */ | 166 | */ |
168 | (cfi->mfr == CFI_MFR_MACRONIX)) { | 167 | (cfi->mfr == CFI_MFR_MACRONIX)) { |
169 | DEBUG(MTD_DEBUG_LEVEL1, | 168 | pr_debug("%s: Macronix MX29LV400C with bottom boot block" |
170 | "%s: Macronix MX29LV400C with bottom boot block" | ||
171 | " detected\n", map->name); | 169 | " detected\n", map->name); |
172 | extp->TopBottom = 2; /* bottom boot */ | 170 | extp->TopBottom = 2; /* bottom boot */ |
173 | } else | 171 | } else |
@@ -178,8 +176,7 @@ static void fixup_amd_bootblock(struct mtd_info *mtd) | |||
178 | extp->TopBottom = 2; /* bottom boot */ | 176 | extp->TopBottom = 2; /* bottom boot */ |
179 | } | 177 | } |
180 | 178 | ||
181 | DEBUG(MTD_DEBUG_LEVEL1, | 179 | pr_debug("%s: AMD CFI PRI V%c.%c has no boot block field;" |
182 | "%s: AMD CFI PRI V%c.%c has no boot block field;" | ||
183 | " deduced %s from Device ID\n", map->name, major, minor, | 180 | " deduced %s from Device ID\n", map->name, major, minor, |
184 | extp->TopBottom == 2 ? "bottom" : "top"); | 181 | extp->TopBottom == 2 ? "bottom" : "top"); |
185 | } | 182 | } |
@@ -191,7 +188,7 @@ static void fixup_use_write_buffers(struct mtd_info *mtd) | |||
191 | struct map_info *map = mtd->priv; | 188 | struct map_info *map = mtd->priv; |
192 | struct cfi_private *cfi = map->fldrv_priv; | 189 | struct cfi_private *cfi = map->fldrv_priv; |
193 | if (cfi->cfiq->BufWriteTimeoutTyp) { | 190 | if (cfi->cfiq->BufWriteTimeoutTyp) { |
194 | DEBUG(MTD_DEBUG_LEVEL1, "Using buffer write method\n" ); | 191 | pr_debug("Using buffer write method\n" ); |
195 | mtd->write = cfi_amdstd_write_buffers; | 192 | mtd->write = cfi_amdstd_write_buffers; |
196 | } | 193 | } |
197 | } | 194 | } |
@@ -443,7 +440,7 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) | |||
443 | mtd->writesize = 1; | 440 | mtd->writesize = 1; |
444 | mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; | 441 | mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; |
445 | 442 | ||
446 | DEBUG(MTD_DEBUG_LEVEL3, "MTD %s(): write buffer size %d\n", | 443 | pr_debug("MTD %s(): write buffer size %d\n", |
447 | __func__, mtd->writebufsize); | 444 | __func__, mtd->writebufsize); |
448 | 445 | ||
449 | mtd->reboot_notifier.notifier_call = cfi_amdstd_reboot; | 446 | mtd->reboot_notifier.notifier_call = cfi_amdstd_reboot; |
@@ -1163,7 +1160,7 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip, | |||
1163 | return ret; | 1160 | return ret; |
1164 | } | 1161 | } |
1165 | 1162 | ||
1166 | DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): WRITE 0x%.8lx(0x%.8lx)\n", | 1163 | pr_debug("MTD %s(): WRITE 0x%.8lx(0x%.8lx)\n", |
1167 | __func__, adr, datum.x[0] ); | 1164 | __func__, adr, datum.x[0] ); |
1168 | 1165 | ||
1169 | /* | 1166 | /* |
@@ -1174,7 +1171,7 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip, | |||
1174 | */ | 1171 | */ |
1175 | oldd = map_read(map, adr); | 1172 | oldd = map_read(map, adr); |
1176 | if (map_word_equal(map, oldd, datum)) { | 1173 | if (map_word_equal(map, oldd, datum)) { |
1177 | DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): NOP\n", | 1174 | pr_debug("MTD %s(): NOP\n", |
1178 | __func__); | 1175 | __func__); |
1179 | goto op_done; | 1176 | goto op_done; |
1180 | } | 1177 | } |
@@ -1400,7 +1397,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, | |||
1400 | 1397 | ||
1401 | datum = map_word_load(map, buf); | 1398 | datum = map_word_load(map, buf); |
1402 | 1399 | ||
1403 | DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): WRITE 0x%.8lx(0x%.8lx)\n", | 1400 | pr_debug("MTD %s(): WRITE 0x%.8lx(0x%.8lx)\n", |
1404 | __func__, adr, datum.x[0] ); | 1401 | __func__, adr, datum.x[0] ); |
1405 | 1402 | ||
1406 | XIP_INVAL_CACHED_RANGE(map, adr, len); | 1403 | XIP_INVAL_CACHED_RANGE(map, adr, len); |
@@ -1587,7 +1584,7 @@ static int __xipram do_erase_chip(struct map_info *map, struct flchip *chip) | |||
1587 | return ret; | 1584 | return ret; |
1588 | } | 1585 | } |
1589 | 1586 | ||
1590 | DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): ERASE 0x%.8lx\n", | 1587 | pr_debug("MTD %s(): ERASE 0x%.8lx\n", |
1591 | __func__, chip->start ); | 1588 | __func__, chip->start ); |
1592 | 1589 | ||
1593 | XIP_INVAL_CACHED_RANGE(map, adr, map->size); | 1590 | XIP_INVAL_CACHED_RANGE(map, adr, map->size); |
@@ -1675,7 +1672,7 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip, | |||
1675 | return ret; | 1672 | return ret; |
1676 | } | 1673 | } |
1677 | 1674 | ||
1678 | DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): ERASE 0x%.8lx\n", | 1675 | pr_debug("MTD %s(): ERASE 0x%.8lx\n", |
1679 | __func__, adr ); | 1676 | __func__, adr ); |
1680 | 1677 | ||
1681 | XIP_INVAL_CACHED_RANGE(map, adr, len); | 1678 | XIP_INVAL_CACHED_RANGE(map, adr, len); |
@@ -1801,7 +1798,7 @@ static int do_atmel_lock(struct map_info *map, struct flchip *chip, | |||
1801 | goto out_unlock; | 1798 | goto out_unlock; |
1802 | chip->state = FL_LOCKING; | 1799 | chip->state = FL_LOCKING; |
1803 | 1800 | ||
1804 | DEBUG(MTD_DEBUG_LEVEL3, "MTD %s(): LOCK 0x%08lx len %d\n", | 1801 | pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", |
1805 | __func__, adr, len); | 1802 | __func__, adr, len); |
1806 | 1803 | ||
1807 | cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, | 1804 | cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, |
@@ -1837,7 +1834,7 @@ static int do_atmel_unlock(struct map_info *map, struct flchip *chip, | |||
1837 | goto out_unlock; | 1834 | goto out_unlock; |
1838 | chip->state = FL_UNLOCKING; | 1835 | chip->state = FL_UNLOCKING; |
1839 | 1836 | ||
1840 | DEBUG(MTD_DEBUG_LEVEL3, "MTD %s(): LOCK 0x%08lx len %d\n", | 1837 | pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", |
1841 | __func__, adr, len); | 1838 | __func__, adr, len); |
1842 | 1839 | ||
1843 | cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, | 1840 | cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, |
diff --git a/drivers/mtd/chips/fwh_lock.h b/drivers/mtd/chips/fwh_lock.h index 5e3cc80128aa..89c6595454a5 100644 --- a/drivers/mtd/chips/fwh_lock.h +++ b/drivers/mtd/chips/fwh_lock.h | |||
@@ -34,8 +34,7 @@ static int fwh_xxlock_oneblock(struct map_info *map, struct flchip *chip, | |||
34 | 34 | ||
35 | /* Refuse the operation if the we cannot look behind the chip */ | 35 | /* Refuse the operation if the we cannot look behind the chip */ |
36 | if (chip->start < 0x400000) { | 36 | if (chip->start < 0x400000) { |
37 | DEBUG( MTD_DEBUG_LEVEL3, | 37 | pr_debug( "MTD %s(): chip->start: %lx wanted >= 0x400000\n", |
38 | "MTD %s(): chip->start: %lx wanted >= 0x400000\n", | ||
39 | __func__, chip->start ); | 38 | __func__, chip->start ); |
40 | return -EIO; | 39 | return -EIO; |
41 | } | 40 | } |
diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c index d40c410a3241..c443f527a53a 100644 --- a/drivers/mtd/chips/jedec_probe.c +++ b/drivers/mtd/chips/jedec_probe.c | |||
@@ -1917,8 +1917,7 @@ static void jedec_reset(u32 base, struct map_info *map, struct cfi_private *cfi) | |||
1917 | * as they will ignore the writes and don't care what address | 1917 | * as they will ignore the writes and don't care what address |
1918 | * the F0 is written to */ | 1918 | * the F0 is written to */ |
1919 | if (cfi->addr_unlock1) { | 1919 | if (cfi->addr_unlock1) { |
1920 | DEBUG( MTD_DEBUG_LEVEL3, | 1920 | pr_debug( "reset unlock called %x %x \n", |
1921 | "reset unlock called %x %x \n", | ||
1922 | cfi->addr_unlock1,cfi->addr_unlock2); | 1921 | cfi->addr_unlock1,cfi->addr_unlock2); |
1923 | cfi_send_gen_cmd(0xaa, cfi->addr_unlock1, base, map, cfi, cfi->device_type, NULL); | 1922 | cfi_send_gen_cmd(0xaa, cfi->addr_unlock1, base, map, cfi, cfi->device_type, NULL); |
1924 | cfi_send_gen_cmd(0x55, cfi->addr_unlock2, base, map, cfi, cfi->device_type, NULL); | 1923 | cfi_send_gen_cmd(0x55, cfi->addr_unlock2, base, map, cfi, cfi->device_type, NULL); |
@@ -1941,7 +1940,7 @@ static int cfi_jedec_setup(struct map_info *map, struct cfi_private *cfi, int in | |||
1941 | uint8_t uaddr; | 1940 | uint8_t uaddr; |
1942 | 1941 | ||
1943 | if (!(jedec_table[index].devtypes & cfi->device_type)) { | 1942 | if (!(jedec_table[index].devtypes & cfi->device_type)) { |
1944 | DEBUG(MTD_DEBUG_LEVEL1, "Rejecting potential %s with incompatible %d-bit device type\n", | 1943 | pr_debug("Rejecting potential %s with incompatible %d-bit device type\n", |
1945 | jedec_table[index].name, 4 * (1<<cfi->device_type)); | 1944 | jedec_table[index].name, 4 * (1<<cfi->device_type)); |
1946 | return 0; | 1945 | return 0; |
1947 | } | 1946 | } |
@@ -2021,7 +2020,7 @@ static inline int jedec_match( uint32_t base, | |||
2021 | * there aren't. | 2020 | * there aren't. |
2022 | */ | 2021 | */ |
2023 | if (finfo->dev_id > 0xff) { | 2022 | if (finfo->dev_id > 0xff) { |
2024 | DEBUG( MTD_DEBUG_LEVEL3, "%s(): ID is not 8bit\n", | 2023 | pr_debug("%s(): ID is not 8bit\n", |
2025 | __func__); | 2024 | __func__); |
2026 | goto match_done; | 2025 | goto match_done; |
2027 | } | 2026 | } |
@@ -2045,12 +2044,10 @@ static inline int jedec_match( uint32_t base, | |||
2045 | } | 2044 | } |
2046 | 2045 | ||
2047 | /* the part size must fit in the memory window */ | 2046 | /* the part size must fit in the memory window */ |
2048 | DEBUG( MTD_DEBUG_LEVEL3, | 2047 | pr_debug("MTD %s(): Check fit 0x%.8x + 0x%.8x = 0x%.8x\n", |
2049 | "MTD %s(): Check fit 0x%.8x + 0x%.8x = 0x%.8x\n", | ||
2050 | __func__, base, 1 << finfo->dev_size, base + (1 << finfo->dev_size) ); | 2048 | __func__, base, 1 << finfo->dev_size, base + (1 << finfo->dev_size) ); |
2051 | if ( base + cfi_interleave(cfi) * ( 1 << finfo->dev_size ) > map->size ) { | 2049 | if ( base + cfi_interleave(cfi) * ( 1 << finfo->dev_size ) > map->size ) { |
2052 | DEBUG( MTD_DEBUG_LEVEL3, | 2050 | pr_debug("MTD %s(): 0x%.4x 0x%.4x %dKiB doesn't fit\n", |
2053 | "MTD %s(): 0x%.4x 0x%.4x %dKiB doesn't fit\n", | ||
2054 | __func__, finfo->mfr_id, finfo->dev_id, | 2051 | __func__, finfo->mfr_id, finfo->dev_id, |
2055 | 1 << finfo->dev_size ); | 2052 | 1 << finfo->dev_size ); |
2056 | goto match_done; | 2053 | goto match_done; |
@@ -2061,13 +2058,12 @@ static inline int jedec_match( uint32_t base, | |||
2061 | 2058 | ||
2062 | uaddr = finfo->uaddr; | 2059 | uaddr = finfo->uaddr; |
2063 | 2060 | ||
2064 | DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): check unlock addrs 0x%.4x 0x%.4x\n", | 2061 | pr_debug("MTD %s(): check unlock addrs 0x%.4x 0x%.4x\n", |
2065 | __func__, cfi->addr_unlock1, cfi->addr_unlock2 ); | 2062 | __func__, cfi->addr_unlock1, cfi->addr_unlock2 ); |
2066 | if ( MTD_UADDR_UNNECESSARY != uaddr && MTD_UADDR_DONT_CARE != uaddr | 2063 | if ( MTD_UADDR_UNNECESSARY != uaddr && MTD_UADDR_DONT_CARE != uaddr |
2067 | && ( unlock_addrs[uaddr].addr1 / cfi->device_type != cfi->addr_unlock1 || | 2064 | && ( unlock_addrs[uaddr].addr1 / cfi->device_type != cfi->addr_unlock1 || |
2068 | unlock_addrs[uaddr].addr2 / cfi->device_type != cfi->addr_unlock2 ) ) { | 2065 | unlock_addrs[uaddr].addr2 / cfi->device_type != cfi->addr_unlock2 ) ) { |
2069 | DEBUG( MTD_DEBUG_LEVEL3, | 2066 | pr_debug("MTD %s(): 0x%.4x 0x%.4x did not match\n", |
2070 | "MTD %s(): 0x%.4x 0x%.4x did not match\n", | ||
2071 | __func__, | 2067 | __func__, |
2072 | unlock_addrs[uaddr].addr1, | 2068 | unlock_addrs[uaddr].addr1, |
2073 | unlock_addrs[uaddr].addr2); | 2069 | unlock_addrs[uaddr].addr2); |
@@ -2083,15 +2079,13 @@ static inline int jedec_match( uint32_t base, | |||
2083 | * FIXME - write a driver that takes all of the chip info as | 2079 | * FIXME - write a driver that takes all of the chip info as |
2084 | * module parameters, doesn't probe but forces a load. | 2080 | * module parameters, doesn't probe but forces a load. |
2085 | */ | 2081 | */ |
2086 | DEBUG( MTD_DEBUG_LEVEL3, | 2082 | pr_debug("MTD %s(): check ID's disappear when not in ID mode\n", |
2087 | "MTD %s(): check ID's disappear when not in ID mode\n", | ||
2088 | __func__ ); | 2083 | __func__ ); |
2089 | jedec_reset( base, map, cfi ); | 2084 | jedec_reset( base, map, cfi ); |
2090 | mfr = jedec_read_mfr( map, base, cfi ); | 2085 | mfr = jedec_read_mfr( map, base, cfi ); |
2091 | id = jedec_read_id( map, base, cfi ); | 2086 | id = jedec_read_id( map, base, cfi ); |
2092 | if ( mfr == cfi->mfr && id == cfi->id ) { | 2087 | if ( mfr == cfi->mfr && id == cfi->id ) { |
2093 | DEBUG( MTD_DEBUG_LEVEL3, | 2088 | pr_debug("MTD %s(): ID 0x%.2x:0x%.2x did not change after reset:\n" |
2094 | "MTD %s(): ID 0x%.2x:0x%.2x did not change after reset:\n" | ||
2095 | "You might need to manually specify JEDEC parameters.\n", | 2089 | "You might need to manually specify JEDEC parameters.\n", |
2096 | __func__, cfi->mfr, cfi->id ); | 2090 | __func__, cfi->mfr, cfi->id ); |
2097 | goto match_done; | 2091 | goto match_done; |
@@ -2104,7 +2098,7 @@ static inline int jedec_match( uint32_t base, | |||
2104 | * Put the device back in ID mode - only need to do this if we | 2098 | * Put the device back in ID mode - only need to do this if we |
2105 | * were truly frobbing a real device. | 2099 | * were truly frobbing a real device. |
2106 | */ | 2100 | */ |
2107 | DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): return to ID mode\n", __func__ ); | 2101 | pr_debug("MTD %s(): return to ID mode\n", __func__ ); |
2108 | if (cfi->addr_unlock1) { | 2102 | if (cfi->addr_unlock1) { |
2109 | cfi_send_gen_cmd(0xaa, cfi->addr_unlock1, base, map, cfi, cfi->device_type, NULL); | 2103 | cfi_send_gen_cmd(0xaa, cfi->addr_unlock1, base, map, cfi, cfi->device_type, NULL); |
2110 | cfi_send_gen_cmd(0x55, cfi->addr_unlock2, base, map, cfi, cfi->device_type, NULL); | 2104 | cfi_send_gen_cmd(0x55, cfi->addr_unlock2, base, map, cfi, cfi->device_type, NULL); |
@@ -2167,13 +2161,11 @@ static int jedec_probe_chip(struct map_info *map, __u32 base, | |||
2167 | 2161 | ||
2168 | cfi->mfr = jedec_read_mfr(map, base, cfi); | 2162 | cfi->mfr = jedec_read_mfr(map, base, cfi); |
2169 | cfi->id = jedec_read_id(map, base, cfi); | 2163 | cfi->id = jedec_read_id(map, base, cfi); |
2170 | DEBUG(MTD_DEBUG_LEVEL3, | 2164 | pr_debug("Search for id:(%02x %02x) interleave(%d) type(%d)\n", |
2171 | "Search for id:(%02x %02x) interleave(%d) type(%d)\n", | ||
2172 | cfi->mfr, cfi->id, cfi_interleave(cfi), cfi->device_type); | 2165 | cfi->mfr, cfi->id, cfi_interleave(cfi), cfi->device_type); |
2173 | for (i = 0; i < ARRAY_SIZE(jedec_table); i++) { | 2166 | for (i = 0; i < ARRAY_SIZE(jedec_table); i++) { |
2174 | if ( jedec_match( base, map, cfi, &jedec_table[i] ) ) { | 2167 | if ( jedec_match( base, map, cfi, &jedec_table[i] ) ) { |
2175 | DEBUG( MTD_DEBUG_LEVEL3, | 2168 | pr_debug("MTD %s(): matched device 0x%x,0x%x unlock_addrs: 0x%.4x 0x%.4x\n", |
2176 | "MTD %s(): matched device 0x%x,0x%x unlock_addrs: 0x%.4x 0x%.4x\n", | ||
2177 | __func__, cfi->mfr, cfi->id, | 2169 | __func__, cfi->mfr, cfi->id, |
2178 | cfi->addr_unlock1, cfi->addr_unlock2 ); | 2170 | cfi->addr_unlock1, cfi->addr_unlock2 ); |
2179 | if (!cfi_jedec_setup(map, cfi, i)) | 2171 | if (!cfi_jedec_setup(map, cfi, i)) |
diff --git a/drivers/mtd/devices/doc2000.c b/drivers/mtd/devices/doc2000.c index ed15447c392e..8c9703309496 100644 --- a/drivers/mtd/devices/doc2000.c +++ b/drivers/mtd/devices/doc2000.c | |||
@@ -82,8 +82,7 @@ static int _DoC_WaitReady(struct DiskOnChip *doc) | |||
82 | void __iomem *docptr = doc->virtadr; | 82 | void __iomem *docptr = doc->virtadr; |
83 | unsigned long timeo = jiffies + (HZ * 10); | 83 | unsigned long timeo = jiffies + (HZ * 10); |
84 | 84 | ||
85 | DEBUG(MTD_DEBUG_LEVEL3, | 85 | pr_debug("_DoC_WaitReady called for out-of-line wait\n"); |
86 | "_DoC_WaitReady called for out-of-line wait\n"); | ||
87 | 86 | ||
88 | /* Out-of-line routine to wait for chip response */ | 87 | /* Out-of-line routine to wait for chip response */ |
89 | while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B)) { | 88 | while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B)) { |
@@ -92,7 +91,7 @@ static int _DoC_WaitReady(struct DiskOnChip *doc) | |||
92 | DoC_Delay(doc, 2); | 91 | DoC_Delay(doc, 2); |
93 | 92 | ||
94 | if (time_after(jiffies, timeo)) { | 93 | if (time_after(jiffies, timeo)) { |
95 | DEBUG(MTD_DEBUG_LEVEL2, "_DoC_WaitReady timed out.\n"); | 94 | pr_debug("_DoC_WaitReady timed out.\n"); |
96 | return -EIO; | 95 | return -EIO; |
97 | } | 96 | } |
98 | udelay(1); | 97 | udelay(1); |
@@ -323,8 +322,7 @@ static int DoC_IdentChip(struct DiskOnChip *doc, int floor, int chip) | |||
323 | 322 | ||
324 | /* Reset the chip */ | 323 | /* Reset the chip */ |
325 | if (DoC_Command(doc, NAND_CMD_RESET, CDSN_CTRL_WP)) { | 324 | if (DoC_Command(doc, NAND_CMD_RESET, CDSN_CTRL_WP)) { |
326 | DEBUG(MTD_DEBUG_LEVEL2, | 325 | pr_debug("DoC_Command (reset) for %d,%d returned true\n", |
327 | "DoC_Command (reset) for %d,%d returned true\n", | ||
328 | floor, chip); | 326 | floor, chip); |
329 | return 0; | 327 | return 0; |
330 | } | 328 | } |
@@ -332,8 +330,7 @@ static int DoC_IdentChip(struct DiskOnChip *doc, int floor, int chip) | |||
332 | 330 | ||
333 | /* Read the NAND chip ID: 1. Send ReadID command */ | 331 | /* Read the NAND chip ID: 1. Send ReadID command */ |
334 | if (DoC_Command(doc, NAND_CMD_READID, CDSN_CTRL_WP)) { | 332 | if (DoC_Command(doc, NAND_CMD_READID, CDSN_CTRL_WP)) { |
335 | DEBUG(MTD_DEBUG_LEVEL2, | 333 | pr_debug("DoC_Command (ReadID) for %d,%d returned true\n", |
336 | "DoC_Command (ReadID) for %d,%d returned true\n", | ||
337 | floor, chip); | 334 | floor, chip); |
338 | return 0; | 335 | return 0; |
339 | } | 336 | } |
diff --git a/drivers/mtd/devices/doc2001.c b/drivers/mtd/devices/doc2001.c index c6ea8604a3c3..3d2b459cea92 100644 --- a/drivers/mtd/devices/doc2001.c +++ b/drivers/mtd/devices/doc2001.c | |||
@@ -55,15 +55,14 @@ static int _DoC_WaitReady(void __iomem * docptr) | |||
55 | { | 55 | { |
56 | unsigned short c = 0xffff; | 56 | unsigned short c = 0xffff; |
57 | 57 | ||
58 | DEBUG(MTD_DEBUG_LEVEL3, | 58 | pr_debug("_DoC_WaitReady called for out-of-line wait\n"); |
59 | "_DoC_WaitReady called for out-of-line wait\n"); | ||
60 | 59 | ||
61 | /* Out-of-line routine to wait for chip response */ | 60 | /* Out-of-line routine to wait for chip response */ |
62 | while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B) && --c) | 61 | while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B) && --c) |
63 | ; | 62 | ; |
64 | 63 | ||
65 | if (c == 0) | 64 | if (c == 0) |
66 | DEBUG(MTD_DEBUG_LEVEL2, "_DoC_WaitReady timed out.\n"); | 65 | pr_debug("_DoC_WaitReady timed out.\n"); |
67 | 66 | ||
68 | return (c == 0); | 67 | return (c == 0); |
69 | } | 68 | } |
diff --git a/drivers/mtd/devices/doc2001plus.c b/drivers/mtd/devices/doc2001plus.c index fe82fbfa155e..d28c9d99979f 100644 --- a/drivers/mtd/devices/doc2001plus.c +++ b/drivers/mtd/devices/doc2001plus.c | |||
@@ -61,15 +61,14 @@ static int _DoC_WaitReady(void __iomem * docptr) | |||
61 | { | 61 | { |
62 | unsigned int c = 0xffff; | 62 | unsigned int c = 0xffff; |
63 | 63 | ||
64 | DEBUG(MTD_DEBUG_LEVEL3, | 64 | pr_debug("_DoC_WaitReady called for out-of-line wait\n"); |
65 | "_DoC_WaitReady called for out-of-line wait\n"); | ||
66 | 65 | ||
67 | /* Out-of-line routine to wait for chip response */ | 66 | /* Out-of-line routine to wait for chip response */ |
68 | while (((ReadDOC(docptr, Mplus_FlashControl) & CDSN_CTRL_FR_B_MASK) != CDSN_CTRL_FR_B_MASK) && --c) | 67 | while (((ReadDOC(docptr, Mplus_FlashControl) & CDSN_CTRL_FR_B_MASK) != CDSN_CTRL_FR_B_MASK) && --c) |
69 | ; | 68 | ; |
70 | 69 | ||
71 | if (c == 0) | 70 | if (c == 0) |
72 | DEBUG(MTD_DEBUG_LEVEL2, "_DoC_WaitReady timed out.\n"); | 71 | pr_debug("_DoC_WaitReady timed out.\n"); |
73 | 72 | ||
74 | return (c == 0); | 73 | return (c == 0); |
75 | } | 74 | } |
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 66a3555f07d9..6417bd6b36ff 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c | |||
@@ -208,7 +208,7 @@ static int wait_till_ready(struct m25p *flash) | |||
208 | */ | 208 | */ |
209 | static int erase_chip(struct m25p *flash) | 209 | static int erase_chip(struct m25p *flash) |
210 | { | 210 | { |
211 | DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %lldKiB\n", | 211 | pr_debug("%s: %s %lldKiB\n", |
212 | dev_name(&flash->spi->dev), __func__, | 212 | dev_name(&flash->spi->dev), __func__, |
213 | (long long)(flash->mtd.size >> 10)); | 213 | (long long)(flash->mtd.size >> 10)); |
214 | 214 | ||
@@ -249,7 +249,7 @@ static int m25p_cmdsz(struct m25p *flash) | |||
249 | */ | 249 | */ |
250 | static int erase_sector(struct m25p *flash, u32 offset) | 250 | static int erase_sector(struct m25p *flash, u32 offset) |
251 | { | 251 | { |
252 | DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB at 0x%08x\n", | 252 | pr_debug("%s: %s %dKiB at 0x%08x\n", |
253 | dev_name(&flash->spi->dev), __func__, | 253 | dev_name(&flash->spi->dev), __func__, |
254 | flash->mtd.erasesize / 1024, offset); | 254 | flash->mtd.erasesize / 1024, offset); |
255 | 255 | ||
@@ -285,7 +285,7 @@ static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
285 | u32 addr,len; | 285 | u32 addr,len; |
286 | uint32_t rem; | 286 | uint32_t rem; |
287 | 287 | ||
288 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%llx, len %lld\n", | 288 | pr_debug("%s: %s %s 0x%llx, len %lld\n", |
289 | dev_name(&flash->spi->dev), __func__, "at", | 289 | dev_name(&flash->spi->dev), __func__, "at", |
290 | (long long)instr->addr, (long long)instr->len); | 290 | (long long)instr->addr, (long long)instr->len); |
291 | 291 | ||
@@ -347,7 +347,7 @@ static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
347 | struct spi_transfer t[2]; | 347 | struct spi_transfer t[2]; |
348 | struct spi_message m; | 348 | struct spi_message m; |
349 | 349 | ||
350 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", | 350 | pr_debug("%s: %s %s 0x%08x, len %zd\n", |
351 | dev_name(&flash->spi->dev), __func__, "from", | 351 | dev_name(&flash->spi->dev), __func__, "from", |
352 | (u32)from, len); | 352 | (u32)from, len); |
353 | 353 | ||
@@ -416,7 +416,7 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
416 | struct spi_transfer t[2]; | 416 | struct spi_transfer t[2]; |
417 | struct spi_message m; | 417 | struct spi_message m; |
418 | 418 | ||
419 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", | 419 | pr_debug("%s: %s %s 0x%08x, len %zd\n", |
420 | dev_name(&flash->spi->dev), __func__, "to", | 420 | dev_name(&flash->spi->dev), __func__, "to", |
421 | (u32)to, len); | 421 | (u32)to, len); |
422 | 422 | ||
@@ -509,7 +509,7 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
509 | size_t actual; | 509 | size_t actual; |
510 | int cmd_sz, ret; | 510 | int cmd_sz, ret; |
511 | 511 | ||
512 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", | 512 | pr_debug("%s: %s %s 0x%08x, len %zd\n", |
513 | dev_name(&flash->spi->dev), __func__, "to", | 513 | dev_name(&flash->spi->dev), __func__, "to", |
514 | (u32)to, len); | 514 | (u32)to, len); |
515 | 515 | ||
@@ -787,7 +787,7 @@ static const struct spi_device_id *__devinit jedec_probe(struct spi_device *spi) | |||
787 | */ | 787 | */ |
788 | tmp = spi_write_then_read(spi, &code, 1, id, 5); | 788 | tmp = spi_write_then_read(spi, &code, 1, id, 5); |
789 | if (tmp < 0) { | 789 | if (tmp < 0) { |
790 | DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n", | 790 | pr_debug("%s: error %d reading JEDEC ID\n", |
791 | dev_name(&spi->dev), tmp); | 791 | dev_name(&spi->dev), tmp); |
792 | return ERR_PTR(tmp); | 792 | return ERR_PTR(tmp); |
793 | } | 793 | } |
@@ -944,8 +944,7 @@ static int __devinit m25p_probe(struct spi_device *spi) | |||
944 | dev_info(&spi->dev, "%s (%lld Kbytes)\n", id->name, | 944 | dev_info(&spi->dev, "%s (%lld Kbytes)\n", id->name, |
945 | (long long)flash->mtd.size >> 10); | 945 | (long long)flash->mtd.size >> 10); |
946 | 946 | ||
947 | DEBUG(MTD_DEBUG_LEVEL2, | 947 | pr_debug("mtd .name = %s, .size = 0x%llx (%lldMiB) " |
948 | "mtd .name = %s, .size = 0x%llx (%lldMiB) " | ||
949 | ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n", | 948 | ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n", |
950 | flash->mtd.name, | 949 | flash->mtd.name, |
951 | (long long)flash->mtd.size, (long long)(flash->mtd.size >> 20), | 950 | (long long)flash->mtd.size, (long long)(flash->mtd.size >> 20), |
@@ -954,8 +953,7 @@ static int __devinit m25p_probe(struct spi_device *spi) | |||
954 | 953 | ||
955 | if (flash->mtd.numeraseregions) | 954 | if (flash->mtd.numeraseregions) |
956 | for (i = 0; i < flash->mtd.numeraseregions; i++) | 955 | for (i = 0; i < flash->mtd.numeraseregions; i++) |
957 | DEBUG(MTD_DEBUG_LEVEL2, | 956 | pr_debug("mtd.eraseregions[%d] = { .offset = 0x%llx, " |
958 | "mtd.eraseregions[%d] = { .offset = 0x%llx, " | ||
959 | ".erasesize = 0x%.8x (%uKiB), " | 957 | ".erasesize = 0x%.8x (%uKiB), " |
960 | ".numblocks = %d }\n", | 958 | ".numblocks = %d }\n", |
961 | i, (long long)flash->mtd.eraseregions[i].offset, | 959 | i, (long long)flash->mtd.eraseregions[i].offset, |
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index c86fa573c303..f409aef58ed2 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c | |||
@@ -133,7 +133,7 @@ static int dataflash_waitready(struct spi_device *spi) | |||
133 | for (;;) { | 133 | for (;;) { |
134 | status = dataflash_status(spi); | 134 | status = dataflash_status(spi); |
135 | if (status < 0) { | 135 | if (status < 0) { |
136 | DEBUG(MTD_DEBUG_LEVEL1, "%s: status %d?\n", | 136 | pr_debug("%s: status %d?\n", |
137 | dev_name(&spi->dev), status); | 137 | dev_name(&spi->dev), status); |
138 | status = 0; | 138 | status = 0; |
139 | } | 139 | } |
@@ -160,7 +160,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
160 | uint8_t *command; | 160 | uint8_t *command; |
161 | uint32_t rem; | 161 | uint32_t rem; |
162 | 162 | ||
163 | DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%llx len 0x%llx\n", | 163 | pr_debug("%s: erase addr=0x%llx len 0x%llx\n", |
164 | dev_name(&spi->dev), (long long)instr->addr, | 164 | dev_name(&spi->dev), (long long)instr->addr, |
165 | (long long)instr->len); | 165 | (long long)instr->len); |
166 | 166 | ||
@@ -198,7 +198,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
198 | command[2] = (uint8_t)(pageaddr >> 8); | 198 | command[2] = (uint8_t)(pageaddr >> 8); |
199 | command[3] = 0; | 199 | command[3] = 0; |
200 | 200 | ||
201 | DEBUG(MTD_DEBUG_LEVEL3, "ERASE %s: (%x) %x %x %x [%i]\n", | 201 | pr_debug("ERASE %s: (%x) %x %x %x [%i]\n", |
202 | do_block ? "block" : "page", | 202 | do_block ? "block" : "page", |
203 | command[0], command[1], command[2], command[3], | 203 | command[0], command[1], command[2], command[3], |
204 | pageaddr); | 204 | pageaddr); |
@@ -249,7 +249,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
249 | uint8_t *command; | 249 | uint8_t *command; |
250 | int status; | 250 | int status; |
251 | 251 | ||
252 | DEBUG(MTD_DEBUG_LEVEL2, "%s: read 0x%x..0x%x\n", | 252 | pr_debug("%s: read 0x%x..0x%x\n", |
253 | dev_name(&priv->spi->dev), (unsigned)from, (unsigned)(from + len)); | 253 | dev_name(&priv->spi->dev), (unsigned)from, (unsigned)(from + len)); |
254 | 254 | ||
255 | *retlen = 0; | 255 | *retlen = 0; |
@@ -266,7 +266,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
266 | 266 | ||
267 | command = priv->command; | 267 | command = priv->command; |
268 | 268 | ||
269 | DEBUG(MTD_DEBUG_LEVEL3, "READ: (%x) %x %x %x\n", | 269 | pr_debug("READ: (%x) %x %x %x\n", |
270 | command[0], command[1], command[2], command[3]); | 270 | command[0], command[1], command[2], command[3]); |
271 | 271 | ||
272 | spi_message_init(&msg); | 272 | spi_message_init(&msg); |
@@ -298,7 +298,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
298 | *retlen = msg.actual_length - 8; | 298 | *retlen = msg.actual_length - 8; |
299 | status = 0; | 299 | status = 0; |
300 | } else | 300 | } else |
301 | DEBUG(MTD_DEBUG_LEVEL1, "%s: read %x..%x --> %d\n", | 301 | pr_debug("%s: read %x..%x --> %d\n", |
302 | dev_name(&priv->spi->dev), | 302 | dev_name(&priv->spi->dev), |
303 | (unsigned)from, (unsigned)(from + len), | 303 | (unsigned)from, (unsigned)(from + len), |
304 | status); | 304 | status); |
@@ -325,7 +325,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
325 | int status = -EINVAL; | 325 | int status = -EINVAL; |
326 | uint8_t *command; | 326 | uint8_t *command; |
327 | 327 | ||
328 | DEBUG(MTD_DEBUG_LEVEL2, "%s: write 0x%x..0x%x\n", | 328 | pr_debug("%s: write 0x%x..0x%x\n", |
329 | dev_name(&spi->dev), (unsigned)to, (unsigned)(to + len)); | 329 | dev_name(&spi->dev), (unsigned)to, (unsigned)(to + len)); |
330 | 330 | ||
331 | *retlen = 0; | 331 | *retlen = 0; |
@@ -351,7 +351,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
351 | 351 | ||
352 | mutex_lock(&priv->lock); | 352 | mutex_lock(&priv->lock); |
353 | while (remaining > 0) { | 353 | while (remaining > 0) { |
354 | DEBUG(MTD_DEBUG_LEVEL3, "write @ %i:%i len=%i\n", | 354 | pr_debug("write @ %i:%i len=%i\n", |
355 | pageaddr, offset, writelen); | 355 | pageaddr, offset, writelen); |
356 | 356 | ||
357 | /* REVISIT: | 357 | /* REVISIT: |
@@ -379,12 +379,12 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
379 | command[2] = (addr & 0x0000FF00) >> 8; | 379 | command[2] = (addr & 0x0000FF00) >> 8; |
380 | command[3] = 0; | 380 | command[3] = 0; |
381 | 381 | ||
382 | DEBUG(MTD_DEBUG_LEVEL3, "TRANSFER: (%x) %x %x %x\n", | 382 | pr_debug("TRANSFER: (%x) %x %x %x\n", |
383 | command[0], command[1], command[2], command[3]); | 383 | command[0], command[1], command[2], command[3]); |
384 | 384 | ||
385 | status = spi_sync(spi, &msg); | 385 | status = spi_sync(spi, &msg); |
386 | if (status < 0) | 386 | if (status < 0) |
387 | DEBUG(MTD_DEBUG_LEVEL1, "%s: xfer %u -> %d \n", | 387 | pr_debug("%s: xfer %u -> %d \n", |
388 | dev_name(&spi->dev), addr, status); | 388 | dev_name(&spi->dev), addr, status); |
389 | 389 | ||
390 | (void) dataflash_waitready(priv->spi); | 390 | (void) dataflash_waitready(priv->spi); |
@@ -397,7 +397,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
397 | command[2] = (addr & 0x0000FF00) >> 8; | 397 | command[2] = (addr & 0x0000FF00) >> 8; |
398 | command[3] = (addr & 0x000000FF); | 398 | command[3] = (addr & 0x000000FF); |
399 | 399 | ||
400 | DEBUG(MTD_DEBUG_LEVEL3, "PROGRAM: (%x) %x %x %x\n", | 400 | pr_debug("PROGRAM: (%x) %x %x %x\n", |
401 | command[0], command[1], command[2], command[3]); | 401 | command[0], command[1], command[2], command[3]); |
402 | 402 | ||
403 | x[1].tx_buf = writebuf; | 403 | x[1].tx_buf = writebuf; |
@@ -406,7 +406,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
406 | status = spi_sync(spi, &msg); | 406 | status = spi_sync(spi, &msg); |
407 | spi_transfer_del(x + 1); | 407 | spi_transfer_del(x + 1); |
408 | if (status < 0) | 408 | if (status < 0) |
409 | DEBUG(MTD_DEBUG_LEVEL1, "%s: pgm %u/%u -> %d \n", | 409 | pr_debug("%s: pgm %u/%u -> %d \n", |
410 | dev_name(&spi->dev), addr, writelen, status); | 410 | dev_name(&spi->dev), addr, writelen, status); |
411 | 411 | ||
412 | (void) dataflash_waitready(priv->spi); | 412 | (void) dataflash_waitready(priv->spi); |
@@ -421,12 +421,12 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
421 | command[2] = (addr & 0x0000FF00) >> 8; | 421 | command[2] = (addr & 0x0000FF00) >> 8; |
422 | command[3] = 0; | 422 | command[3] = 0; |
423 | 423 | ||
424 | DEBUG(MTD_DEBUG_LEVEL3, "COMPARE: (%x) %x %x %x\n", | 424 | pr_debug("COMPARE: (%x) %x %x %x\n", |
425 | command[0], command[1], command[2], command[3]); | 425 | command[0], command[1], command[2], command[3]); |
426 | 426 | ||
427 | status = spi_sync(spi, &msg); | 427 | status = spi_sync(spi, &msg); |
428 | if (status < 0) | 428 | if (status < 0) |
429 | DEBUG(MTD_DEBUG_LEVEL1, "%s: compare %u -> %d \n", | 429 | pr_debug("%s: compare %u -> %d \n", |
430 | dev_name(&spi->dev), addr, status); | 430 | dev_name(&spi->dev), addr, status); |
431 | 431 | ||
432 | status = dataflash_waitready(priv->spi); | 432 | status = dataflash_waitready(priv->spi); |
@@ -780,7 +780,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi) | |||
780 | */ | 780 | */ |
781 | tmp = spi_write_then_read(spi, &code, 1, id, 3); | 781 | tmp = spi_write_then_read(spi, &code, 1, id, 3); |
782 | if (tmp < 0) { | 782 | if (tmp < 0) { |
783 | DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n", | 783 | pr_debug("%s: error %d reading JEDEC ID\n", |
784 | dev_name(&spi->dev), tmp); | 784 | dev_name(&spi->dev), tmp); |
785 | return ERR_PTR(tmp); | 785 | return ERR_PTR(tmp); |
786 | } | 786 | } |
@@ -797,7 +797,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi) | |||
797 | tmp < ARRAY_SIZE(dataflash_data); | 797 | tmp < ARRAY_SIZE(dataflash_data); |
798 | tmp++, info++) { | 798 | tmp++, info++) { |
799 | if (info->jedec_id == jedec) { | 799 | if (info->jedec_id == jedec) { |
800 | DEBUG(MTD_DEBUG_LEVEL1, "%s: OTP, sector protect%s\n", | 800 | pr_debug("%s: OTP, sector protect%s\n", |
801 | dev_name(&spi->dev), | 801 | dev_name(&spi->dev), |
802 | (info->flags & SUP_POW2PS) | 802 | (info->flags & SUP_POW2PS) |
803 | ? ", binary pagesize" : "" | 803 | ? ", binary pagesize" : "" |
@@ -805,8 +805,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi) | |||
805 | if (info->flags & SUP_POW2PS) { | 805 | if (info->flags & SUP_POW2PS) { |
806 | status = dataflash_status(spi); | 806 | status = dataflash_status(spi); |
807 | if (status < 0) { | 807 | if (status < 0) { |
808 | DEBUG(MTD_DEBUG_LEVEL1, | 808 | pr_debug("%s: status error %d\n", |
809 | "%s: status error %d\n", | ||
810 | dev_name(&spi->dev), status); | 809 | dev_name(&spi->dev), status); |
811 | return ERR_PTR(status); | 810 | return ERR_PTR(status); |
812 | } | 811 | } |
@@ -871,7 +870,7 @@ static int __devinit dataflash_probe(struct spi_device *spi) | |||
871 | */ | 870 | */ |
872 | status = dataflash_status(spi); | 871 | status = dataflash_status(spi); |
873 | if (status <= 0 || status == 0xff) { | 872 | if (status <= 0 || status == 0xff) { |
874 | DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n", | 873 | pr_debug("%s: status error %d\n", |
875 | dev_name(&spi->dev), status); | 874 | dev_name(&spi->dev), status); |
876 | if (status == 0 || status == 0xff) | 875 | if (status == 0 || status == 0xff) |
877 | status = -ENODEV; | 876 | status = -ENODEV; |
@@ -907,13 +906,13 @@ static int __devinit dataflash_probe(struct spi_device *spi) | |||
907 | break; | 906 | break; |
908 | /* obsolete AT45DB1282 not (yet?) supported */ | 907 | /* obsolete AT45DB1282 not (yet?) supported */ |
909 | default: | 908 | default: |
910 | DEBUG(MTD_DEBUG_LEVEL1, "%s: unsupported device (%x)\n", | 909 | pr_debug("%s: unsupported device (%x)\n", |
911 | dev_name(&spi->dev), status & 0x3c); | 910 | dev_name(&spi->dev), status & 0x3c); |
912 | status = -ENODEV; | 911 | status = -ENODEV; |
913 | } | 912 | } |
914 | 913 | ||
915 | if (status < 0) | 914 | if (status < 0) |
916 | DEBUG(MTD_DEBUG_LEVEL1, "%s: add_dataflash --> %d\n", | 915 | pr_debug("%s: add_dataflash --> %d\n", |
917 | dev_name(&spi->dev), status); | 916 | dev_name(&spi->dev), status); |
918 | 917 | ||
919 | return status; | 918 | return status; |
@@ -924,7 +923,7 @@ static int __devexit dataflash_remove(struct spi_device *spi) | |||
924 | struct dataflash *flash = dev_get_drvdata(&spi->dev); | 923 | struct dataflash *flash = dev_get_drvdata(&spi->dev); |
925 | int status; | 924 | int status; |
926 | 925 | ||
927 | DEBUG(MTD_DEBUG_LEVEL1, "%s: remove\n", dev_name(&spi->dev)); | 926 | pr_debug("%s: remove\n", dev_name(&spi->dev)); |
928 | 927 | ||
929 | status = mtd_device_unregister(&flash->mtd); | 928 | status = mtd_device_unregister(&flash->mtd); |
930 | if (status == 0) { | 929 | if (status == 0) { |
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c index 44a8b408ed7b..d38ef3bffe8d 100644 --- a/drivers/mtd/devices/sst25l.c +++ b/drivers/mtd/devices/sst25l.c | |||
@@ -410,8 +410,7 @@ static int __devinit sst25l_probe(struct spi_device *spi) | |||
410 | dev_info(&spi->dev, "%s (%lld KiB)\n", flash_info->name, | 410 | dev_info(&spi->dev, "%s (%lld KiB)\n", flash_info->name, |
411 | (long long)flash->mtd.size >> 10); | 411 | (long long)flash->mtd.size >> 10); |
412 | 412 | ||
413 | DEBUG(MTD_DEBUG_LEVEL2, | 413 | pr_debug("mtd .name = %s, .size = 0x%llx (%lldMiB) " |
414 | "mtd .name = %s, .size = 0x%llx (%lldMiB) " | ||
415 | ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n", | 414 | ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n", |
416 | flash->mtd.name, | 415 | flash->mtd.name, |
417 | (long long)flash->mtd.size, (long long)(flash->mtd.size >> 20), | 416 | (long long)flash->mtd.size, (long long)(flash->mtd.size >> 20), |
diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c index 037b399df3f1..95d77680ad15 100644 --- a/drivers/mtd/ftl.c +++ b/drivers/mtd/ftl.c | |||
@@ -339,7 +339,7 @@ static int erase_xfer(partition_t *part, | |||
339 | struct erase_info *erase; | 339 | struct erase_info *erase; |
340 | 340 | ||
341 | xfer = &part->XferInfo[xfernum]; | 341 | xfer = &part->XferInfo[xfernum]; |
342 | DEBUG(1, "ftl_cs: erasing xfer unit at 0x%x\n", xfer->Offset); | 342 | pr_debug("ftl_cs: erasing xfer unit at 0x%x\n", xfer->Offset); |
343 | xfer->state = XFER_ERASING; | 343 | xfer->state = XFER_ERASING; |
344 | 344 | ||
345 | /* Is there a free erase slot? Always in MTD. */ | 345 | /* Is there a free erase slot? Always in MTD. */ |
@@ -415,7 +415,7 @@ static int prepare_xfer(partition_t *part, int i) | |||
415 | xfer = &part->XferInfo[i]; | 415 | xfer = &part->XferInfo[i]; |
416 | xfer->state = XFER_FAILED; | 416 | xfer->state = XFER_FAILED; |
417 | 417 | ||
418 | DEBUG(1, "ftl_cs: preparing xfer unit at 0x%x\n", xfer->Offset); | 418 | pr_debug("ftl_cs: preparing xfer unit at 0x%x\n", xfer->Offset); |
419 | 419 | ||
420 | /* Write the transfer unit header */ | 420 | /* Write the transfer unit header */ |
421 | header = part->header; | 421 | header = part->header; |
@@ -476,7 +476,7 @@ static int copy_erase_unit(partition_t *part, uint16_t srcunit, | |||
476 | 476 | ||
477 | eun = &part->EUNInfo[srcunit]; | 477 | eun = &part->EUNInfo[srcunit]; |
478 | xfer = &part->XferInfo[xferunit]; | 478 | xfer = &part->XferInfo[xferunit]; |
479 | DEBUG(2, "ftl_cs: copying block 0x%x to 0x%x\n", | 479 | pr_debug("ftl_cs: copying block 0x%x to 0x%x\n", |
480 | eun->Offset, xfer->Offset); | 480 | eun->Offset, xfer->Offset); |
481 | 481 | ||
482 | 482 | ||
@@ -609,8 +609,8 @@ static int reclaim_block(partition_t *part) | |||
609 | uint32_t best; | 609 | uint32_t best; |
610 | int queued, ret; | 610 | int queued, ret; |
611 | 611 | ||
612 | DEBUG(0, "ftl_cs: reclaiming space...\n"); | 612 | pr_debug("ftl_cs: reclaiming space...\n"); |
613 | DEBUG(3, "NumTransferUnits == %x\n", part->header.NumTransferUnits); | 613 | pr_debug("NumTransferUnits == %x\n", part->header.NumTransferUnits); |
614 | /* Pick the least erased transfer unit */ | 614 | /* Pick the least erased transfer unit */ |
615 | best = 0xffffffff; xfer = 0xffff; | 615 | best = 0xffffffff; xfer = 0xffff; |
616 | do { | 616 | do { |
@@ -618,22 +618,22 @@ static int reclaim_block(partition_t *part) | |||
618 | for (i = 0; i < part->header.NumTransferUnits; i++) { | 618 | for (i = 0; i < part->header.NumTransferUnits; i++) { |
619 | int n=0; | 619 | int n=0; |
620 | if (part->XferInfo[i].state == XFER_UNKNOWN) { | 620 | if (part->XferInfo[i].state == XFER_UNKNOWN) { |
621 | DEBUG(3,"XferInfo[%d].state == XFER_UNKNOWN\n",i); | 621 | pr_debug("XferInfo[%d].state == XFER_UNKNOWN\n",i); |
622 | n=1; | 622 | n=1; |
623 | erase_xfer(part, i); | 623 | erase_xfer(part, i); |
624 | } | 624 | } |
625 | if (part->XferInfo[i].state == XFER_ERASING) { | 625 | if (part->XferInfo[i].state == XFER_ERASING) { |
626 | DEBUG(3,"XferInfo[%d].state == XFER_ERASING\n",i); | 626 | pr_debug("XferInfo[%d].state == XFER_ERASING\n",i); |
627 | n=1; | 627 | n=1; |
628 | queued = 1; | 628 | queued = 1; |
629 | } | 629 | } |
630 | else if (part->XferInfo[i].state == XFER_ERASED) { | 630 | else if (part->XferInfo[i].state == XFER_ERASED) { |
631 | DEBUG(3,"XferInfo[%d].state == XFER_ERASED\n",i); | 631 | pr_debug("XferInfo[%d].state == XFER_ERASED\n",i); |
632 | n=1; | 632 | n=1; |
633 | prepare_xfer(part, i); | 633 | prepare_xfer(part, i); |
634 | } | 634 | } |
635 | if (part->XferInfo[i].state == XFER_PREPARED) { | 635 | if (part->XferInfo[i].state == XFER_PREPARED) { |
636 | DEBUG(3,"XferInfo[%d].state == XFER_PREPARED\n",i); | 636 | pr_debug("XferInfo[%d].state == XFER_PREPARED\n",i); |
637 | n=1; | 637 | n=1; |
638 | if (part->XferInfo[i].EraseCount <= best) { | 638 | if (part->XferInfo[i].EraseCount <= best) { |
639 | best = part->XferInfo[i].EraseCount; | 639 | best = part->XferInfo[i].EraseCount; |
@@ -641,12 +641,12 @@ static int reclaim_block(partition_t *part) | |||
641 | } | 641 | } |
642 | } | 642 | } |
643 | if (!n) | 643 | if (!n) |
644 | DEBUG(3,"XferInfo[%d].state == %x\n",i, part->XferInfo[i].state); | 644 | pr_debug("XferInfo[%d].state == %x\n",i, part->XferInfo[i].state); |
645 | 645 | ||
646 | } | 646 | } |
647 | if (xfer == 0xffff) { | 647 | if (xfer == 0xffff) { |
648 | if (queued) { | 648 | if (queued) { |
649 | DEBUG(1, "ftl_cs: waiting for transfer " | 649 | pr_debug("ftl_cs: waiting for transfer " |
650 | "unit to be prepared...\n"); | 650 | "unit to be prepared...\n"); |
651 | if (part->mbd.mtd->sync) | 651 | if (part->mbd.mtd->sync) |
652 | part->mbd.mtd->sync(part->mbd.mtd); | 652 | part->mbd.mtd->sync(part->mbd.mtd); |
@@ -656,7 +656,7 @@ static int reclaim_block(partition_t *part) | |||
656 | printk(KERN_NOTICE "ftl_cs: reclaim failed: no " | 656 | printk(KERN_NOTICE "ftl_cs: reclaim failed: no " |
657 | "suitable transfer units!\n"); | 657 | "suitable transfer units!\n"); |
658 | else | 658 | else |
659 | DEBUG(1, "ftl_cs: reclaim failed: no " | 659 | pr_debug("ftl_cs: reclaim failed: no " |
660 | "suitable transfer units!\n"); | 660 | "suitable transfer units!\n"); |
661 | 661 | ||
662 | return -EIO; | 662 | return -EIO; |
@@ -666,7 +666,7 @@ static int reclaim_block(partition_t *part) | |||
666 | 666 | ||
667 | eun = 0; | 667 | eun = 0; |
668 | if ((jiffies % shuffle_freq) == 0) { | 668 | if ((jiffies % shuffle_freq) == 0) { |
669 | DEBUG(1, "ftl_cs: recycling freshest block...\n"); | 669 | pr_debug("ftl_cs: recycling freshest block...\n"); |
670 | best = 0xffffffff; | 670 | best = 0xffffffff; |
671 | for (i = 0; i < part->DataUnits; i++) | 671 | for (i = 0; i < part->DataUnits; i++) |
672 | if (part->EUNInfo[i].EraseCount <= best) { | 672 | if (part->EUNInfo[i].EraseCount <= best) { |
@@ -686,7 +686,7 @@ static int reclaim_block(partition_t *part) | |||
686 | printk(KERN_NOTICE "ftl_cs: reclaim failed: " | 686 | printk(KERN_NOTICE "ftl_cs: reclaim failed: " |
687 | "no free blocks!\n"); | 687 | "no free blocks!\n"); |
688 | else | 688 | else |
689 | DEBUG(1,"ftl_cs: reclaim failed: " | 689 | pr_debug("ftl_cs: reclaim failed: " |
690 | "no free blocks!\n"); | 690 | "no free blocks!\n"); |
691 | 691 | ||
692 | return -EIO; | 692 | return -EIO; |
@@ -771,7 +771,7 @@ static uint32_t find_free(partition_t *part) | |||
771 | printk(KERN_NOTICE "ftl_cs: bad free list!\n"); | 771 | printk(KERN_NOTICE "ftl_cs: bad free list!\n"); |
772 | return 0; | 772 | return 0; |
773 | } | 773 | } |
774 | DEBUG(2, "ftl_cs: found free block at %d in %d\n", blk, eun); | 774 | pr_debug("ftl_cs: found free block at %d in %d\n", blk, eun); |
775 | return blk; | 775 | return blk; |
776 | 776 | ||
777 | } /* find_free */ | 777 | } /* find_free */ |
@@ -791,7 +791,7 @@ static int ftl_read(partition_t *part, caddr_t buffer, | |||
791 | int ret; | 791 | int ret; |
792 | size_t offset, retlen; | 792 | size_t offset, retlen; |
793 | 793 | ||
794 | DEBUG(2, "ftl_cs: ftl_read(0x%p, 0x%lx, %ld)\n", | 794 | pr_debug("ftl_cs: ftl_read(0x%p, 0x%lx, %ld)\n", |
795 | part, sector, nblocks); | 795 | part, sector, nblocks); |
796 | if (!(part->state & FTL_FORMATTED)) { | 796 | if (!(part->state & FTL_FORMATTED)) { |
797 | printk(KERN_NOTICE "ftl_cs: bad partition\n"); | 797 | printk(KERN_NOTICE "ftl_cs: bad partition\n"); |
@@ -840,7 +840,7 @@ static int set_bam_entry(partition_t *part, uint32_t log_addr, | |||
840 | int ret; | 840 | int ret; |
841 | size_t retlen, offset; | 841 | size_t retlen, offset; |
842 | 842 | ||
843 | DEBUG(2, "ftl_cs: set_bam_entry(0x%p, 0x%x, 0x%x)\n", | 843 | pr_debug("ftl_cs: set_bam_entry(0x%p, 0x%x, 0x%x)\n", |
844 | part, log_addr, virt_addr); | 844 | part, log_addr, virt_addr); |
845 | bsize = 1 << part->header.EraseUnitSize; | 845 | bsize = 1 << part->header.EraseUnitSize; |
846 | eun = log_addr / bsize; | 846 | eun = log_addr / bsize; |
@@ -905,7 +905,7 @@ static int ftl_write(partition_t *part, caddr_t buffer, | |||
905 | int ret; | 905 | int ret; |
906 | size_t retlen, offset; | 906 | size_t retlen, offset; |
907 | 907 | ||
908 | DEBUG(2, "ftl_cs: ftl_write(0x%p, %ld, %ld)\n", | 908 | pr_debug("ftl_cs: ftl_write(0x%p, %ld, %ld)\n", |
909 | part, sector, nblocks); | 909 | part, sector, nblocks); |
910 | if (!(part->state & FTL_FORMATTED)) { | 910 | if (!(part->state & FTL_FORMATTED)) { |
911 | printk(KERN_NOTICE "ftl_cs: bad partition\n"); | 911 | printk(KERN_NOTICE "ftl_cs: bad partition\n"); |
@@ -1011,7 +1011,7 @@ static int ftl_discardsect(struct mtd_blktrans_dev *dev, | |||
1011 | partition_t *part = (void *)dev; | 1011 | partition_t *part = (void *)dev; |
1012 | uint32_t bsize = 1 << part->header.EraseUnitSize; | 1012 | uint32_t bsize = 1 << part->header.EraseUnitSize; |
1013 | 1013 | ||
1014 | DEBUG(1, "FTL erase sector %ld for %d sectors\n", | 1014 | pr_debug("FTL erase sector %ld for %d sectors\n", |
1015 | sector, nr_sects); | 1015 | sector, nr_sects); |
1016 | 1016 | ||
1017 | while (nr_sects) { | 1017 | while (nr_sects) { |
diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c index c9a31e6faab2..232e11b1526c 100644 --- a/drivers/mtd/inftlcore.c +++ b/drivers/mtd/inftlcore.c | |||
@@ -63,7 +63,7 @@ static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) | |||
63 | return; | 63 | return; |
64 | } | 64 | } |
65 | 65 | ||
66 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: add_mtd for %s\n", mtd->name); | 66 | pr_debug("INFTL: add_mtd for %s\n", mtd->name); |
67 | 67 | ||
68 | inftl = kzalloc(sizeof(*inftl), GFP_KERNEL); | 68 | inftl = kzalloc(sizeof(*inftl), GFP_KERNEL); |
69 | 69 | ||
@@ -131,7 +131,7 @@ static void inftl_remove_dev(struct mtd_blktrans_dev *dev) | |||
131 | { | 131 | { |
132 | struct INFTLrecord *inftl = (void *)dev; | 132 | struct INFTLrecord *inftl = (void *)dev; |
133 | 133 | ||
134 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: remove_dev (i=%d)\n", dev->devnum); | 134 | pr_debug("INFTL: remove_dev (i=%d)\n", dev->devnum); |
135 | 135 | ||
136 | del_mtd_blktrans_dev(dev); | 136 | del_mtd_blktrans_dev(dev); |
137 | 137 | ||
@@ -213,7 +213,7 @@ static u16 INFTL_findfreeblock(struct INFTLrecord *inftl, int desperate) | |||
213 | u16 pot = inftl->LastFreeEUN; | 213 | u16 pot = inftl->LastFreeEUN; |
214 | int silly = inftl->nb_blocks; | 214 | int silly = inftl->nb_blocks; |
215 | 215 | ||
216 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_findfreeblock(inftl=%p," | 216 | pr_debug("INFTL: INFTL_findfreeblock(inftl=%p," |
217 | "desperate=%d)\n", inftl, desperate); | 217 | "desperate=%d)\n", inftl, desperate); |
218 | 218 | ||
219 | /* | 219 | /* |
@@ -221,7 +221,7 @@ static u16 INFTL_findfreeblock(struct INFTLrecord *inftl, int desperate) | |||
221 | * blocks completely. | 221 | * blocks completely. |
222 | */ | 222 | */ |
223 | if (!desperate && inftl->numfreeEUNs < 2) { | 223 | if (!desperate && inftl->numfreeEUNs < 2) { |
224 | DEBUG(MTD_DEBUG_LEVEL1, "INFTL: there are too few free " | 224 | pr_debug("INFTL: there are too few free " |
225 | "EUNs (%d)\n", inftl->numfreeEUNs); | 225 | "EUNs (%d)\n", inftl->numfreeEUNs); |
226 | return BLOCK_NIL; | 226 | return BLOCK_NIL; |
227 | } | 227 | } |
@@ -257,7 +257,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned | |||
257 | struct inftl_oob oob; | 257 | struct inftl_oob oob; |
258 | size_t retlen; | 258 | size_t retlen; |
259 | 259 | ||
260 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_foldchain(inftl=%p,thisVUC=%d," | 260 | pr_debug("INFTL: INFTL_foldchain(inftl=%p,thisVUC=%d," |
261 | "pending=%d)\n", inftl, thisVUC, pendingblock); | 261 | "pending=%d)\n", inftl, thisVUC, pendingblock); |
262 | 262 | ||
263 | memset(BlockMap, 0xff, sizeof(BlockMap)); | 263 | memset(BlockMap, 0xff, sizeof(BlockMap)); |
@@ -321,7 +321,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned | |||
321 | * Chain, and the Erase Unit into which we are supposed to be copying. | 321 | * Chain, and the Erase Unit into which we are supposed to be copying. |
322 | * Go for it. | 322 | * Go for it. |
323 | */ | 323 | */ |
324 | DEBUG(MTD_DEBUG_LEVEL1, "INFTL: folding chain %d into unit %d\n", | 324 | pr_debug("INFTL: folding chain %d into unit %d\n", |
325 | thisVUC, targetEUN); | 325 | thisVUC, targetEUN); |
326 | 326 | ||
327 | for (block = 0; block < inftl->EraseSize/SECTORSIZE ; block++) { | 327 | for (block = 0; block < inftl->EraseSize/SECTORSIZE ; block++) { |
@@ -353,7 +353,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned | |||
353 | (block * SECTORSIZE), SECTORSIZE, | 353 | (block * SECTORSIZE), SECTORSIZE, |
354 | &retlen, movebuf); | 354 | &retlen, movebuf); |
355 | if (ret != -EIO) | 355 | if (ret != -EIO) |
356 | DEBUG(MTD_DEBUG_LEVEL1, "INFTL: error went " | 356 | pr_debug("INFTL: error went " |
357 | "away on retry?\n"); | 357 | "away on retry?\n"); |
358 | } | 358 | } |
359 | memset(&oob, 0xff, sizeof(struct inftl_oob)); | 359 | memset(&oob, 0xff, sizeof(struct inftl_oob)); |
@@ -370,7 +370,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned | |||
370 | * is important, by doing oldest first if we crash/reboot then it | 370 | * is important, by doing oldest first if we crash/reboot then it |
371 | * it is relatively simple to clean up the mess). | 371 | * it is relatively simple to clean up the mess). |
372 | */ | 372 | */ |
373 | DEBUG(MTD_DEBUG_LEVEL1, "INFTL: want to erase virtual chain %d\n", | 373 | pr_debug("INFTL: want to erase virtual chain %d\n", |
374 | thisVUC); | 374 | thisVUC); |
375 | 375 | ||
376 | for (;;) { | 376 | for (;;) { |
@@ -419,7 +419,7 @@ static u16 INFTL_makefreeblock(struct INFTLrecord *inftl, unsigned pendingblock) | |||
419 | u16 ChainLength = 0, thislen; | 419 | u16 ChainLength = 0, thislen; |
420 | u16 chain, EUN; | 420 | u16 chain, EUN; |
421 | 421 | ||
422 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_makefreeblock(inftl=%p," | 422 | pr_debug("INFTL: INFTL_makefreeblock(inftl=%p," |
423 | "pending=%d)\n", inftl, pendingblock); | 423 | "pending=%d)\n", inftl, pendingblock); |
424 | 424 | ||
425 | for (chain = 0; chain < inftl->nb_blocks; chain++) { | 425 | for (chain = 0; chain < inftl->nb_blocks; chain++) { |
@@ -482,7 +482,7 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block) | |||
482 | size_t retlen; | 482 | size_t retlen; |
483 | int silly, silly2 = 3; | 483 | int silly, silly2 = 3; |
484 | 484 | ||
485 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_findwriteunit(inftl=%p," | 485 | pr_debug("INFTL: INFTL_findwriteunit(inftl=%p," |
486 | "block=%d)\n", inftl, block); | 486 | "block=%d)\n", inftl, block); |
487 | 487 | ||
488 | do { | 488 | do { |
@@ -499,7 +499,7 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block) | |||
499 | blockofs, 8, &retlen, (char *)&bci); | 499 | blockofs, 8, &retlen, (char *)&bci); |
500 | 500 | ||
501 | status = bci.Status | bci.Status1; | 501 | status = bci.Status | bci.Status1; |
502 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: status of block %d in " | 502 | pr_debug("INFTL: status of block %d in " |
503 | "EUN %d is %x\n", block , writeEUN, status); | 503 | "EUN %d is %x\n", block , writeEUN, status); |
504 | 504 | ||
505 | switch(status) { | 505 | switch(status) { |
@@ -553,7 +553,7 @@ hitused: | |||
553 | * Hopefully we free something, lets try again. | 553 | * Hopefully we free something, lets try again. |
554 | * This time we are desperate... | 554 | * This time we are desperate... |
555 | */ | 555 | */ |
556 | DEBUG(MTD_DEBUG_LEVEL1, "INFTL: using desperate==1 " | 556 | pr_debug("INFTL: using desperate==1 " |
557 | "to find free EUN to accommodate write to " | 557 | "to find free EUN to accommodate write to " |
558 | "VUC %d\n", thisVUC); | 558 | "VUC %d\n", thisVUC); |
559 | writeEUN = INFTL_findfreeblock(inftl, 1); | 559 | writeEUN = INFTL_findfreeblock(inftl, 1); |
@@ -645,7 +645,7 @@ static void INFTL_trydeletechain(struct INFTLrecord *inftl, unsigned thisVUC) | |||
645 | struct inftl_bci bci; | 645 | struct inftl_bci bci; |
646 | size_t retlen; | 646 | size_t retlen; |
647 | 647 | ||
648 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_trydeletechain(inftl=%p," | 648 | pr_debug("INFTL: INFTL_trydeletechain(inftl=%p," |
649 | "thisVUC=%d)\n", inftl, thisVUC); | 649 | "thisVUC=%d)\n", inftl, thisVUC); |
650 | 650 | ||
651 | memset(BlockUsed, 0, sizeof(BlockUsed)); | 651 | memset(BlockUsed, 0, sizeof(BlockUsed)); |
@@ -709,7 +709,7 @@ static void INFTL_trydeletechain(struct INFTLrecord *inftl, unsigned thisVUC) | |||
709 | * For each block in the chain free it and make it available | 709 | * For each block in the chain free it and make it available |
710 | * for future use. Erase from the oldest unit first. | 710 | * for future use. Erase from the oldest unit first. |
711 | */ | 711 | */ |
712 | DEBUG(MTD_DEBUG_LEVEL1, "INFTL: deleting empty VUC %d\n", thisVUC); | 712 | pr_debug("INFTL: deleting empty VUC %d\n", thisVUC); |
713 | 713 | ||
714 | for (;;) { | 714 | for (;;) { |
715 | u16 *prevEUN = &inftl->VUtable[thisVUC]; | 715 | u16 *prevEUN = &inftl->VUtable[thisVUC]; |
@@ -717,7 +717,7 @@ static void INFTL_trydeletechain(struct INFTLrecord *inftl, unsigned thisVUC) | |||
717 | 717 | ||
718 | /* If the chain is all gone already, we're done */ | 718 | /* If the chain is all gone already, we're done */ |
719 | if (thisEUN == BLOCK_NIL) { | 719 | if (thisEUN == BLOCK_NIL) { |
720 | DEBUG(MTD_DEBUG_LEVEL2, "INFTL: Empty VUC %d for deletion was already absent\n", thisEUN); | 720 | pr_debug("INFTL: Empty VUC %d for deletion was already absent\n", thisEUN); |
721 | return; | 721 | return; |
722 | } | 722 | } |
723 | 723 | ||
@@ -729,7 +729,7 @@ static void INFTL_trydeletechain(struct INFTLrecord *inftl, unsigned thisVUC) | |||
729 | thisEUN = *prevEUN; | 729 | thisEUN = *prevEUN; |
730 | } | 730 | } |
731 | 731 | ||
732 | DEBUG(MTD_DEBUG_LEVEL3, "Deleting EUN %d from VUC %d\n", | 732 | pr_debug("Deleting EUN %d from VUC %d\n", |
733 | thisEUN, thisVUC); | 733 | thisEUN, thisVUC); |
734 | 734 | ||
735 | if (INFTL_formatblock(inftl, thisEUN) < 0) { | 735 | if (INFTL_formatblock(inftl, thisEUN) < 0) { |
@@ -765,7 +765,7 @@ static int INFTL_deleteblock(struct INFTLrecord *inftl, unsigned block) | |||
765 | size_t retlen; | 765 | size_t retlen; |
766 | struct inftl_bci bci; | 766 | struct inftl_bci bci; |
767 | 767 | ||
768 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_deleteblock(inftl=%p," | 768 | pr_debug("INFTL: INFTL_deleteblock(inftl=%p," |
769 | "block=%d)\n", inftl, block); | 769 | "block=%d)\n", inftl, block); |
770 | 770 | ||
771 | while (thisEUN < inftl->nb_blocks) { | 771 | while (thisEUN < inftl->nb_blocks) { |
@@ -824,7 +824,7 @@ static int inftl_writeblock(struct mtd_blktrans_dev *mbd, unsigned long block, | |||
824 | struct inftl_oob oob; | 824 | struct inftl_oob oob; |
825 | char *p, *pend; | 825 | char *p, *pend; |
826 | 826 | ||
827 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: inftl_writeblock(inftl=%p,block=%ld," | 827 | pr_debug("INFTL: inftl_writeblock(inftl=%p,block=%ld," |
828 | "buffer=%p)\n", inftl, block, buffer); | 828 | "buffer=%p)\n", inftl, block, buffer); |
829 | 829 | ||
830 | /* Is block all zero? */ | 830 | /* Is block all zero? */ |
@@ -874,7 +874,7 @@ static int inftl_readblock(struct mtd_blktrans_dev *mbd, unsigned long block, | |||
874 | struct inftl_bci bci; | 874 | struct inftl_bci bci; |
875 | size_t retlen; | 875 | size_t retlen; |
876 | 876 | ||
877 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: inftl_readblock(inftl=%p,block=%ld," | 877 | pr_debug("INFTL: inftl_readblock(inftl=%p,block=%ld," |
878 | "buffer=%p)\n", inftl, block, buffer); | 878 | "buffer=%p)\n", inftl, block, buffer); |
879 | 879 | ||
880 | while (thisEUN < inftl->nb_blocks) { | 880 | while (thisEUN < inftl->nb_blocks) { |
diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c index 104052e774b0..d969c2d5d62b 100644 --- a/drivers/mtd/inftlmount.c +++ b/drivers/mtd/inftlmount.c | |||
@@ -53,7 +53,7 @@ static int find_boot_record(struct INFTLrecord *inftl) | |||
53 | struct INFTLPartition *ip; | 53 | struct INFTLPartition *ip; |
54 | size_t retlen; | 54 | size_t retlen; |
55 | 55 | ||
56 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: find_boot_record(inftl=%p)\n", inftl); | 56 | pr_debug("INFTL: find_boot_record(inftl=%p)\n", inftl); |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * Assume logical EraseSize == physical erasesize for starting the | 59 | * Assume logical EraseSize == physical erasesize for starting the |
@@ -385,7 +385,7 @@ int INFTL_formatblock(struct INFTLrecord *inftl, int block) | |||
385 | struct mtd_info *mtd = inftl->mbd.mtd; | 385 | struct mtd_info *mtd = inftl->mbd.mtd; |
386 | int physblock; | 386 | int physblock; |
387 | 387 | ||
388 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_formatblock(inftl=%p," | 388 | pr_debug("INFTL: INFTL_formatblock(inftl=%p," |
389 | "block=%d)\n", inftl, block); | 389 | "block=%d)\n", inftl, block); |
390 | 390 | ||
391 | memset(instr, 0, sizeof(struct erase_info)); | 391 | memset(instr, 0, sizeof(struct erase_info)); |
@@ -555,7 +555,7 @@ int INFTL_mount(struct INFTLrecord *s) | |||
555 | int i; | 555 | int i; |
556 | u8 *ANACtable, ANAC; | 556 | u8 *ANACtable, ANAC; |
557 | 557 | ||
558 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_mount(inftl=%p)\n", s); | 558 | pr_debug("INFTL: INFTL_mount(inftl=%p)\n", s); |
559 | 559 | ||
560 | /* Search for INFTL MediaHeader and Spare INFTL Media Header */ | 560 | /* Search for INFTL MediaHeader and Spare INFTL Media Header */ |
561 | if (find_boot_record(s) < 0) { | 561 | if (find_boot_record(s) < 0) { |
@@ -585,7 +585,7 @@ int INFTL_mount(struct INFTLrecord *s) | |||
585 | * NOTEXPLORED state. Then at the end we will try to format it and | 585 | * NOTEXPLORED state. Then at the end we will try to format it and |
586 | * mark it as free. | 586 | * mark it as free. |
587 | */ | 587 | */ |
588 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: pass 1, explore each unit\n"); | 588 | pr_debug("INFTL: pass 1, explore each unit\n"); |
589 | for (first_block = s->firstEUN; first_block <= s->lastEUN; first_block++) { | 589 | for (first_block = s->firstEUN; first_block <= s->lastEUN; first_block++) { |
590 | if (s->PUtable[first_block] != BLOCK_NOTEXPLORED) | 590 | if (s->PUtable[first_block] != BLOCK_NOTEXPLORED) |
591 | continue; | 591 | continue; |
@@ -727,7 +727,7 @@ int INFTL_mount(struct INFTLrecord *s) | |||
727 | * possible because we don't update the previous pointers when | 727 | * possible because we don't update the previous pointers when |
728 | * we fold chains. No big deal, just fix them up in PUtable. | 728 | * we fold chains. No big deal, just fix them up in PUtable. |
729 | */ | 729 | */ |
730 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: pass 2, validate virtual chains\n"); | 730 | pr_debug("INFTL: pass 2, validate virtual chains\n"); |
731 | for (logical_block = 0; logical_block < s->numvunits; logical_block++) { | 731 | for (logical_block = 0; logical_block < s->numvunits; logical_block++) { |
732 | block = s->VUtable[logical_block]; | 732 | block = s->VUtable[logical_block]; |
733 | last_block = BLOCK_NIL; | 733 | last_block = BLOCK_NIL; |
@@ -785,7 +785,7 @@ int INFTL_mount(struct INFTLrecord *s) | |||
785 | s->numfreeEUNs = 0; | 785 | s->numfreeEUNs = 0; |
786 | s->LastFreeEUN = BLOCK_NIL; | 786 | s->LastFreeEUN = BLOCK_NIL; |
787 | 787 | ||
788 | DEBUG(MTD_DEBUG_LEVEL3, "INFTL: pass 3, format unused blocks\n"); | 788 | pr_debug("INFTL: pass 3, format unused blocks\n"); |
789 | for (block = s->firstEUN; block <= s->lastEUN; block++) { | 789 | for (block = s->firstEUN; block <= s->lastEUN; block++) { |
790 | if (s->PUtable[block] == BLOCK_NOTEXPLORED) { | 790 | if (s->PUtable[block] == BLOCK_NOTEXPLORED) { |
791 | printk("INFTL: unreferenced block %d, formatting it\n", | 791 | printk("INFTL: unreferenced block %d, formatting it\n", |
diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c index 1976b6c0508d..7c1dc908a174 100644 --- a/drivers/mtd/mtdblock.c +++ b/drivers/mtd/mtdblock.c | |||
@@ -119,7 +119,7 @@ static int write_cached_data (struct mtdblk_dev *mtdblk) | |||
119 | if (mtdblk->cache_state != STATE_DIRTY) | 119 | if (mtdblk->cache_state != STATE_DIRTY) |
120 | return 0; | 120 | return 0; |
121 | 121 | ||
122 | DEBUG(MTD_DEBUG_LEVEL2, "mtdblock: writing cached data for \"%s\" " | 122 | pr_debug("mtdblock: writing cached data for \"%s\" " |
123 | "at 0x%lx, size 0x%x\n", mtd->name, | 123 | "at 0x%lx, size 0x%x\n", mtd->name, |
124 | mtdblk->cache_offset, mtdblk->cache_size); | 124 | mtdblk->cache_offset, mtdblk->cache_size); |
125 | 125 | ||
@@ -148,7 +148,7 @@ static int do_cached_write (struct mtdblk_dev *mtdblk, unsigned long pos, | |||
148 | size_t retlen; | 148 | size_t retlen; |
149 | int ret; | 149 | int ret; |
150 | 150 | ||
151 | DEBUG(MTD_DEBUG_LEVEL2, "mtdblock: write on \"%s\" at 0x%lx, size 0x%x\n", | 151 | pr_debug("mtdblock: write on \"%s\" at 0x%lx, size 0x%x\n", |
152 | mtd->name, pos, len); | 152 | mtd->name, pos, len); |
153 | 153 | ||
154 | if (!sect_size) | 154 | if (!sect_size) |
@@ -218,7 +218,7 @@ static int do_cached_read (struct mtdblk_dev *mtdblk, unsigned long pos, | |||
218 | size_t retlen; | 218 | size_t retlen; |
219 | int ret; | 219 | int ret; |
220 | 220 | ||
221 | DEBUG(MTD_DEBUG_LEVEL2, "mtdblock: read on \"%s\" at 0x%lx, size 0x%x\n", | 221 | pr_debug("mtdblock: read on \"%s\" at 0x%lx, size 0x%x\n", |
222 | mtd->name, pos, len); | 222 | mtd->name, pos, len); |
223 | 223 | ||
224 | if (!sect_size) | 224 | if (!sect_size) |
@@ -283,7 +283,7 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd) | |||
283 | { | 283 | { |
284 | struct mtdblk_dev *mtdblk = container_of(mbd, struct mtdblk_dev, mbd); | 284 | struct mtdblk_dev *mtdblk = container_of(mbd, struct mtdblk_dev, mbd); |
285 | 285 | ||
286 | DEBUG(MTD_DEBUG_LEVEL1,"mtdblock_open\n"); | 286 | pr_debug("mtdblock_open\n"); |
287 | 287 | ||
288 | mutex_lock(&mtdblks_lock); | 288 | mutex_lock(&mtdblks_lock); |
289 | if (mtdblk->count) { | 289 | if (mtdblk->count) { |
@@ -303,7 +303,7 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd) | |||
303 | 303 | ||
304 | mutex_unlock(&mtdblks_lock); | 304 | mutex_unlock(&mtdblks_lock); |
305 | 305 | ||
306 | DEBUG(MTD_DEBUG_LEVEL1, "ok\n"); | 306 | pr_debug("ok\n"); |
307 | 307 | ||
308 | return 0; | 308 | return 0; |
309 | } | 309 | } |
@@ -312,7 +312,7 @@ static int mtdblock_release(struct mtd_blktrans_dev *mbd) | |||
312 | { | 312 | { |
313 | struct mtdblk_dev *mtdblk = container_of(mbd, struct mtdblk_dev, mbd); | 313 | struct mtdblk_dev *mtdblk = container_of(mbd, struct mtdblk_dev, mbd); |
314 | 314 | ||
315 | DEBUG(MTD_DEBUG_LEVEL1, "mtdblock_release\n"); | 315 | pr_debug("mtdblock_release\n"); |
316 | 316 | ||
317 | mutex_lock(&mtdblks_lock); | 317 | mutex_lock(&mtdblks_lock); |
318 | 318 | ||
@@ -329,7 +329,7 @@ static int mtdblock_release(struct mtd_blktrans_dev *mbd) | |||
329 | 329 | ||
330 | mutex_unlock(&mtdblks_lock); | 330 | mutex_unlock(&mtdblks_lock); |
331 | 331 | ||
332 | DEBUG(MTD_DEBUG_LEVEL1, "ok\n"); | 332 | pr_debug("ok\n"); |
333 | 333 | ||
334 | return 0; | 334 | return 0; |
335 | } | 335 | } |
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index e197192331f9..22526e98b85b 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -86,7 +86,7 @@ static int mtd_open(struct inode *inode, struct file *file) | |||
86 | struct mtd_file_info *mfi; | 86 | struct mtd_file_info *mfi; |
87 | struct inode *mtd_ino; | 87 | struct inode *mtd_ino; |
88 | 88 | ||
89 | DEBUG(MTD_DEBUG_LEVEL0, "MTD_open\n"); | 89 | pr_debug("MTD_open\n"); |
90 | 90 | ||
91 | /* You can't open the RO devices RW */ | 91 | /* You can't open the RO devices RW */ |
92 | if ((file->f_mode & FMODE_WRITE) && (minor & 1)) | 92 | if ((file->f_mode & FMODE_WRITE) && (minor & 1)) |
@@ -151,7 +151,7 @@ static int mtd_close(struct inode *inode, struct file *file) | |||
151 | struct mtd_file_info *mfi = file->private_data; | 151 | struct mtd_file_info *mfi = file->private_data; |
152 | struct mtd_info *mtd = mfi->mtd; | 152 | struct mtd_info *mtd = mfi->mtd; |
153 | 153 | ||
154 | DEBUG(MTD_DEBUG_LEVEL0, "MTD_close\n"); | 154 | pr_debug("MTD_close\n"); |
155 | 155 | ||
156 | /* Only sync if opened RW */ | 156 | /* Only sync if opened RW */ |
157 | if ((file->f_mode & FMODE_WRITE) && mtd->sync) | 157 | if ((file->f_mode & FMODE_WRITE) && mtd->sync) |
@@ -195,7 +195,7 @@ static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t | |||
195 | size_t size = count; | 195 | size_t size = count; |
196 | char *kbuf; | 196 | char *kbuf; |
197 | 197 | ||
198 | DEBUG(MTD_DEBUG_LEVEL0,"MTD_read\n"); | 198 | pr_debug("MTD_read\n"); |
199 | 199 | ||
200 | if (*ppos + count > mtd->size) | 200 | if (*ppos + count > mtd->size) |
201 | count = mtd->size - *ppos; | 201 | count = mtd->size - *ppos; |
@@ -278,7 +278,7 @@ static ssize_t mtd_write(struct file *file, const char __user *buf, size_t count | |||
278 | int ret=0; | 278 | int ret=0; |
279 | int len; | 279 | int len; |
280 | 280 | ||
281 | DEBUG(MTD_DEBUG_LEVEL0,"MTD_write\n"); | 281 | pr_debug("MTD_write\n"); |
282 | 282 | ||
283 | if (*ppos == mtd->size) | 283 | if (*ppos == mtd->size) |
284 | return -ENOSPC; | 284 | return -ENOSPC; |
@@ -570,7 +570,7 @@ static int mtd_ioctl(struct file *file, u_int cmd, u_long arg) | |||
570 | u_long size; | 570 | u_long size; |
571 | struct mtd_info_user info; | 571 | struct mtd_info_user info; |
572 | 572 | ||
573 | DEBUG(MTD_DEBUG_LEVEL0, "MTD_ioctl\n"); | 573 | pr_debug("MTD_ioctl\n"); |
574 | 574 | ||
575 | size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT; | 575 | size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT; |
576 | if (cmd & IOC_IN) { | 576 | if (cmd & IOC_IN) { |
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index f9cc2d2cb5cb..887aed02aa2e 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c | |||
@@ -362,7 +362,7 @@ int add_mtd_device(struct mtd_info *mtd) | |||
362 | MTD_DEVT(i) + 1, | 362 | MTD_DEVT(i) + 1, |
363 | NULL, "mtd%dro", i); | 363 | NULL, "mtd%dro", i); |
364 | 364 | ||
365 | DEBUG(0, "mtd: Giving out device %d to %s\n", i, mtd->name); | 365 | pr_debug("mtd: Giving out device %d to %s\n", i, mtd->name); |
366 | /* No need to get a refcount on the module containing | 366 | /* No need to get a refcount on the module containing |
367 | the notifier, since we hold the mtd_table_mutex */ | 367 | the notifier, since we hold the mtd_table_mutex */ |
368 | list_for_each_entry(not, &mtd_notifiers, list) | 368 | list_for_each_entry(not, &mtd_notifiers, list) |
diff --git a/drivers/mtd/mtdsuper.c b/drivers/mtd/mtdsuper.c index 16b02a1fc100..80fe5dcac111 100644 --- a/drivers/mtd/mtdsuper.c +++ b/drivers/mtd/mtdsuper.c | |||
@@ -26,12 +26,12 @@ static int get_sb_mtd_compare(struct super_block *sb, void *_mtd) | |||
26 | struct mtd_info *mtd = _mtd; | 26 | struct mtd_info *mtd = _mtd; |
27 | 27 | ||
28 | if (sb->s_mtd == mtd) { | 28 | if (sb->s_mtd == mtd) { |
29 | DEBUG(2, "MTDSB: Match on device %d (\"%s\")\n", | 29 | pr_debug("MTDSB: Match on device %d (\"%s\")\n", |
30 | mtd->index, mtd->name); | 30 | mtd->index, mtd->name); |
31 | return 1; | 31 | return 1; |
32 | } | 32 | } |
33 | 33 | ||
34 | DEBUG(2, "MTDSB: No match, device %d (\"%s\"), device %d (\"%s\")\n", | 34 | pr_debug("MTDSB: No match, device %d (\"%s\"), device %d (\"%s\")\n", |
35 | sb->s_mtd->index, sb->s_mtd->name, mtd->index, mtd->name); | 35 | sb->s_mtd->index, sb->s_mtd->name, mtd->index, mtd->name); |
36 | return 0; | 36 | return 0; |
37 | } | 37 | } |
@@ -70,7 +70,7 @@ static struct dentry *mount_mtd_aux(struct file_system_type *fs_type, int flags, | |||
70 | goto already_mounted; | 70 | goto already_mounted; |
71 | 71 | ||
72 | /* fresh new superblock */ | 72 | /* fresh new superblock */ |
73 | DEBUG(1, "MTDSB: New superblock for device %d (\"%s\")\n", | 73 | pr_debug("MTDSB: New superblock for device %d (\"%s\")\n", |
74 | mtd->index, mtd->name); | 74 | mtd->index, mtd->name); |
75 | 75 | ||
76 | sb->s_flags = flags; | 76 | sb->s_flags = flags; |
@@ -87,7 +87,7 @@ static struct dentry *mount_mtd_aux(struct file_system_type *fs_type, int flags, | |||
87 | 87 | ||
88 | /* new mountpoint for an already mounted superblock */ | 88 | /* new mountpoint for an already mounted superblock */ |
89 | already_mounted: | 89 | already_mounted: |
90 | DEBUG(1, "MTDSB: Device %d (\"%s\") is already mounted\n", | 90 | pr_debug("MTDSB: Device %d (\"%s\") is already mounted\n", |
91 | mtd->index, mtd->name); | 91 | mtd->index, mtd->name); |
92 | put_mtd_device(mtd); | 92 | put_mtd_device(mtd); |
93 | return dget(sb->s_root); | 93 | return dget(sb->s_root); |
@@ -108,7 +108,7 @@ static struct dentry *mount_mtd_nr(struct file_system_type *fs_type, int flags, | |||
108 | 108 | ||
109 | mtd = get_mtd_device(NULL, mtdnr); | 109 | mtd = get_mtd_device(NULL, mtdnr); |
110 | if (IS_ERR(mtd)) { | 110 | if (IS_ERR(mtd)) { |
111 | DEBUG(0, "MTDSB: Device #%u doesn't appear to exist\n", mtdnr); | 111 | pr_debug("MTDSB: Device #%u doesn't appear to exist\n", mtdnr); |
112 | return ERR_CAST(mtd); | 112 | return ERR_CAST(mtd); |
113 | } | 113 | } |
114 | 114 | ||
@@ -131,7 +131,7 @@ struct dentry *mount_mtd(struct file_system_type *fs_type, int flags, | |||
131 | if (!dev_name) | 131 | if (!dev_name) |
132 | return ERR_PTR(-EINVAL); | 132 | return ERR_PTR(-EINVAL); |
133 | 133 | ||
134 | DEBUG(2, "MTDSB: dev_name \"%s\"\n", dev_name); | 134 | pr_debug("MTDSB: dev_name \"%s\"\n", dev_name); |
135 | 135 | ||
136 | /* the preferred way of mounting in future; especially when | 136 | /* the preferred way of mounting in future; especially when |
137 | * CONFIG_BLOCK=n - we specify the underlying MTD device by number or | 137 | * CONFIG_BLOCK=n - we specify the underlying MTD device by number or |
@@ -142,7 +142,7 @@ struct dentry *mount_mtd(struct file_system_type *fs_type, int flags, | |||
142 | struct mtd_info *mtd; | 142 | struct mtd_info *mtd; |
143 | 143 | ||
144 | /* mount by MTD device name */ | 144 | /* mount by MTD device name */ |
145 | DEBUG(1, "MTDSB: mtd:%%s, name \"%s\"\n", | 145 | pr_debug("MTDSB: mtd:%%s, name \"%s\"\n", |
146 | dev_name + 4); | 146 | dev_name + 4); |
147 | 147 | ||
148 | mtd = get_mtd_device_nm(dev_name + 4); | 148 | mtd = get_mtd_device_nm(dev_name + 4); |
@@ -163,7 +163,7 @@ struct dentry *mount_mtd(struct file_system_type *fs_type, int flags, | |||
163 | mtdnr = simple_strtoul(dev_name + 3, &endptr, 0); | 163 | mtdnr = simple_strtoul(dev_name + 3, &endptr, 0); |
164 | if (!*endptr) { | 164 | if (!*endptr) { |
165 | /* It was a valid number */ | 165 | /* It was a valid number */ |
166 | DEBUG(1, "MTDSB: mtd%%d, mtdnr %d\n", | 166 | pr_debug("MTDSB: mtd%%d, mtdnr %d\n", |
167 | mtdnr); | 167 | mtdnr); |
168 | return mount_mtd_nr(fs_type, flags, | 168 | return mount_mtd_nr(fs_type, flags, |
169 | dev_name, data, | 169 | dev_name, data, |
@@ -179,10 +179,10 @@ struct dentry *mount_mtd(struct file_system_type *fs_type, int flags, | |||
179 | bdev = lookup_bdev(dev_name); | 179 | bdev = lookup_bdev(dev_name); |
180 | if (IS_ERR(bdev)) { | 180 | if (IS_ERR(bdev)) { |
181 | ret = PTR_ERR(bdev); | 181 | ret = PTR_ERR(bdev); |
182 | DEBUG(1, "MTDSB: lookup_bdev() returned %d\n", ret); | 182 | pr_debug("MTDSB: lookup_bdev() returned %d\n", ret); |
183 | return ERR_PTR(ret); | 183 | return ERR_PTR(ret); |
184 | } | 184 | } |
185 | DEBUG(1, "MTDSB: lookup_bdev() returned 0\n"); | 185 | pr_debug("MTDSB: lookup_bdev() returned 0\n"); |
186 | 186 | ||
187 | ret = -EINVAL; | 187 | ret = -EINVAL; |
188 | 188 | ||
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 4c2bb4a4bf0b..2fbfb71c237b 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c | |||
@@ -349,7 +349,7 @@ static void wait_op_done(struct mxc_nand_host *host, int useirq) | |||
349 | udelay(1); | 349 | udelay(1); |
350 | } | 350 | } |
351 | if (max_retries < 0) | 351 | if (max_retries < 0) |
352 | DEBUG(MTD_DEBUG_LEVEL0, "%s: INT not set\n", | 352 | pr_debug("%s: INT not set\n", |
353 | __func__); | 353 | __func__); |
354 | } | 354 | } |
355 | } | 355 | } |
@@ -370,7 +370,7 @@ static void send_cmd_v3(struct mxc_nand_host *host, uint16_t cmd, int useirq) | |||
370 | * waits for completion. */ | 370 | * waits for completion. */ |
371 | static void send_cmd_v1_v2(struct mxc_nand_host *host, uint16_t cmd, int useirq) | 371 | static void send_cmd_v1_v2(struct mxc_nand_host *host, uint16_t cmd, int useirq) |
372 | { | 372 | { |
373 | DEBUG(MTD_DEBUG_LEVEL3, "send_cmd(host, 0x%x, %d)\n", cmd, useirq); | 373 | pr_debug("send_cmd(host, 0x%x, %d)\n", cmd, useirq); |
374 | 374 | ||
375 | writew(cmd, NFC_V1_V2_FLASH_CMD); | 375 | writew(cmd, NFC_V1_V2_FLASH_CMD); |
376 | writew(NFC_CMD, NFC_V1_V2_CONFIG2); | 376 | writew(NFC_CMD, NFC_V1_V2_CONFIG2); |
@@ -386,7 +386,7 @@ static void send_cmd_v1_v2(struct mxc_nand_host *host, uint16_t cmd, int useirq) | |||
386 | udelay(1); | 386 | udelay(1); |
387 | } | 387 | } |
388 | if (max_retries < 0) | 388 | if (max_retries < 0) |
389 | DEBUG(MTD_DEBUG_LEVEL0, "%s: RESET failed\n", | 389 | pr_debug("%s: RESET failed\n", |
390 | __func__); | 390 | __func__); |
391 | } else { | 391 | } else { |
392 | /* Wait for operation to complete */ | 392 | /* Wait for operation to complete */ |
@@ -410,7 +410,7 @@ static void send_addr_v3(struct mxc_nand_host *host, uint16_t addr, int islast) | |||
410 | * a NAND command. */ | 410 | * a NAND command. */ |
411 | static void send_addr_v1_v2(struct mxc_nand_host *host, uint16_t addr, int islast) | 411 | static void send_addr_v1_v2(struct mxc_nand_host *host, uint16_t addr, int islast) |
412 | { | 412 | { |
413 | DEBUG(MTD_DEBUG_LEVEL3, "send_addr(host, 0x%x %d)\n", addr, islast); | 413 | pr_debug("send_addr(host, 0x%x %d)\n", addr, islast); |
414 | 414 | ||
415 | writew(addr, NFC_V1_V2_FLASH_ADDR); | 415 | writew(addr, NFC_V1_V2_FLASH_ADDR); |
416 | writew(NFC_ADDR, NFC_V1_V2_CONFIG2); | 416 | writew(NFC_ADDR, NFC_V1_V2_CONFIG2); |
@@ -560,8 +560,7 @@ static int mxc_nand_correct_data_v1(struct mtd_info *mtd, u_char *dat, | |||
560 | uint16_t ecc_status = readw(NFC_V1_V2_ECC_STATUS_RESULT); | 560 | uint16_t ecc_status = readw(NFC_V1_V2_ECC_STATUS_RESULT); |
561 | 561 | ||
562 | if (((ecc_status & 0x3) == 2) || ((ecc_status >> 2) == 2)) { | 562 | if (((ecc_status & 0x3) == 2) || ((ecc_status >> 2) == 2)) { |
563 | DEBUG(MTD_DEBUG_LEVEL0, | 563 | pr_debug("MXC_NAND: HWECC uncorrectable 2-bit ECC error\n"); |
564 | "MXC_NAND: HWECC uncorrectable 2-bit ECC error\n"); | ||
565 | return -1; | 564 | return -1; |
566 | } | 565 | } |
567 | 566 | ||
@@ -931,8 +930,7 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, | |||
931 | struct nand_chip *nand_chip = mtd->priv; | 930 | struct nand_chip *nand_chip = mtd->priv; |
932 | struct mxc_nand_host *host = nand_chip->priv; | 931 | struct mxc_nand_host *host = nand_chip->priv; |
933 | 932 | ||
934 | DEBUG(MTD_DEBUG_LEVEL3, | 933 | pr_debug("mxc_nand_command (cmd = 0x%x, col = 0x%x, page = 0x%x)\n", |
935 | "mxc_nand_command (cmd = 0x%x, col = 0x%x, page = 0x%x)\n", | ||
936 | command, column, page_addr); | 934 | command, column, page_addr); |
937 | 935 | ||
938 | /* Reset command state information */ | 936 | /* Reset command state information */ |
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 6a5271256245..7f2691f94322 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -113,21 +113,19 @@ static int check_offs_len(struct mtd_info *mtd, | |||
113 | 113 | ||
114 | /* Start address must align on block boundary */ | 114 | /* Start address must align on block boundary */ |
115 | if (ofs & ((1 << chip->phys_erase_shift) - 1)) { | 115 | if (ofs & ((1 << chip->phys_erase_shift) - 1)) { |
116 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Unaligned address\n", __func__); | 116 | pr_debug("%s: unaligned address\n", __func__); |
117 | ret = -EINVAL; | 117 | ret = -EINVAL; |
118 | } | 118 | } |
119 | 119 | ||
120 | /* Length must align on block boundary */ | 120 | /* Length must align on block boundary */ |
121 | if (len & ((1 << chip->phys_erase_shift) - 1)) { | 121 | if (len & ((1 << chip->phys_erase_shift) - 1)) { |
122 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Length not block aligned\n", | 122 | pr_debug("%s: length not block aligned\n", __func__); |
123 | __func__); | ||
124 | ret = -EINVAL; | 123 | ret = -EINVAL; |
125 | } | 124 | } |
126 | 125 | ||
127 | /* Do not allow past end of device */ | 126 | /* Do not allow past end of device */ |
128 | if (ofs + len > mtd->size) { | 127 | if (ofs + len > mtd->size) { |
129 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Past end of device\n", | 128 | pr_debug("%s: past end of device\n", __func__); |
130 | __func__); | ||
131 | ret = -EINVAL; | 129 | ret = -EINVAL; |
132 | } | 130 | } |
133 | 131 | ||
@@ -913,7 +911,7 @@ static int __nand_unlock(struct mtd_info *mtd, loff_t ofs, | |||
913 | status = chip->waitfunc(mtd, chip); | 911 | status = chip->waitfunc(mtd, chip); |
914 | /* See if device thinks it succeeded */ | 912 | /* See if device thinks it succeeded */ |
915 | if (status & 0x01) { | 913 | if (status & 0x01) { |
916 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Error status = 0x%08x\n", | 914 | pr_debug("%s: error status = 0x%08x\n", |
917 | __func__, status); | 915 | __func__, status); |
918 | ret = -EIO; | 916 | ret = -EIO; |
919 | } | 917 | } |
@@ -935,7 +933,7 @@ int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) | |||
935 | int chipnr; | 933 | int chipnr; |
936 | struct nand_chip *chip = mtd->priv; | 934 | struct nand_chip *chip = mtd->priv; |
937 | 935 | ||
938 | DEBUG(MTD_DEBUG_LEVEL3, "%s: start = 0x%012llx, len = %llu\n", | 936 | pr_debug("%s: start = 0x%012llx, len = %llu\n", |
939 | __func__, (unsigned long long)ofs, len); | 937 | __func__, (unsigned long long)ofs, len); |
940 | 938 | ||
941 | if (check_offs_len(mtd, ofs, len)) | 939 | if (check_offs_len(mtd, ofs, len)) |
@@ -954,7 +952,7 @@ int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) | |||
954 | 952 | ||
955 | /* Check, if it is write protected */ | 953 | /* Check, if it is write protected */ |
956 | if (nand_check_wp(mtd)) { | 954 | if (nand_check_wp(mtd)) { |
957 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Device is write protected!!!\n", | 955 | pr_debug("%s: device is write protected!\n", |
958 | __func__); | 956 | __func__); |
959 | ret = -EIO; | 957 | ret = -EIO; |
960 | goto out; | 958 | goto out; |
@@ -988,7 +986,7 @@ int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) | |||
988 | int chipnr, status, page; | 986 | int chipnr, status, page; |
989 | struct nand_chip *chip = mtd->priv; | 987 | struct nand_chip *chip = mtd->priv; |
990 | 988 | ||
991 | DEBUG(MTD_DEBUG_LEVEL3, "%s: start = 0x%012llx, len = %llu\n", | 989 | pr_debug("%s: start = 0x%012llx, len = %llu\n", |
992 | __func__, (unsigned long long)ofs, len); | 990 | __func__, (unsigned long long)ofs, len); |
993 | 991 | ||
994 | if (check_offs_len(mtd, ofs, len)) | 992 | if (check_offs_len(mtd, ofs, len)) |
@@ -1003,7 +1001,7 @@ int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) | |||
1003 | 1001 | ||
1004 | /* Check, if it is write protected */ | 1002 | /* Check, if it is write protected */ |
1005 | if (nand_check_wp(mtd)) { | 1003 | if (nand_check_wp(mtd)) { |
1006 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Device is write protected!!!\n", | 1004 | pr_debug("%s: device is write protected!\n", |
1007 | __func__); | 1005 | __func__); |
1008 | status = MTD_ERASE_FAILED; | 1006 | status = MTD_ERASE_FAILED; |
1009 | ret = -EIO; | 1007 | ret = -EIO; |
@@ -1018,7 +1016,7 @@ int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) | |||
1018 | status = chip->waitfunc(mtd, chip); | 1016 | status = chip->waitfunc(mtd, chip); |
1019 | /* See if device thinks it succeeded */ | 1017 | /* See if device thinks it succeeded */ |
1020 | if (status & 0x01) { | 1018 | if (status & 0x01) { |
1021 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Error status = 0x%08x\n", | 1019 | pr_debug("%s: error status = 0x%08x\n", |
1022 | __func__, status); | 1020 | __func__, status); |
1023 | ret = -EIO; | 1021 | ret = -EIO; |
1024 | goto out; | 1022 | goto out; |
@@ -1756,7 +1754,7 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from, | |||
1756 | int len; | 1754 | int len; |
1757 | uint8_t *buf = ops->oobbuf; | 1755 | uint8_t *buf = ops->oobbuf; |
1758 | 1756 | ||
1759 | DEBUG(MTD_DEBUG_LEVEL3, "%s: from = 0x%08Lx, len = %i\n", | 1757 | pr_debug("%s: from = 0x%08Lx, len = %i\n", |
1760 | __func__, (unsigned long long)from, readlen); | 1758 | __func__, (unsigned long long)from, readlen); |
1761 | 1759 | ||
1762 | stats = mtd->ecc_stats; | 1760 | stats = mtd->ecc_stats; |
@@ -1767,8 +1765,8 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from, | |||
1767 | len = mtd->oobsize; | 1765 | len = mtd->oobsize; |
1768 | 1766 | ||
1769 | if (unlikely(ops->ooboffs >= len)) { | 1767 | if (unlikely(ops->ooboffs >= len)) { |
1770 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Attempt to start read " | 1768 | pr_debug("%s: attempt to start read outside oob\n", |
1771 | "outside oob\n", __func__); | 1769 | __func__); |
1772 | return -EINVAL; | 1770 | return -EINVAL; |
1773 | } | 1771 | } |
1774 | 1772 | ||
@@ -1776,8 +1774,8 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from, | |||
1776 | if (unlikely(from >= mtd->size || | 1774 | if (unlikely(from >= mtd->size || |
1777 | ops->ooboffs + readlen > ((mtd->size >> chip->page_shift) - | 1775 | ops->ooboffs + readlen > ((mtd->size >> chip->page_shift) - |
1778 | (from >> chip->page_shift)) * len)) { | 1776 | (from >> chip->page_shift)) * len)) { |
1779 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Attempt read beyond end " | 1777 | pr_debug("%s: attempt to read beyond end of device\n", |
1780 | "of device\n", __func__); | 1778 | __func__); |
1781 | return -EINVAL; | 1779 | return -EINVAL; |
1782 | } | 1780 | } |
1783 | 1781 | ||
@@ -1856,8 +1854,8 @@ static int nand_read_oob(struct mtd_info *mtd, loff_t from, | |||
1856 | 1854 | ||
1857 | /* Do not allow reads past end of device */ | 1855 | /* Do not allow reads past end of device */ |
1858 | if (ops->datbuf && (from + ops->len) > mtd->size) { | 1856 | if (ops->datbuf && (from + ops->len) > mtd->size) { |
1859 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Attempt read " | 1857 | pr_debug("%s: attempt to read beyond end of device\n", |
1860 | "beyond end of device\n", __func__); | 1858 | __func__); |
1861 | return -EINVAL; | 1859 | return -EINVAL; |
1862 | } | 1860 | } |
1863 | 1861 | ||
@@ -2352,7 +2350,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to, | |||
2352 | int chipnr, page, status, len; | 2350 | int chipnr, page, status, len; |
2353 | struct nand_chip *chip = mtd->priv; | 2351 | struct nand_chip *chip = mtd->priv; |
2354 | 2352 | ||
2355 | DEBUG(MTD_DEBUG_LEVEL3, "%s: to = 0x%08x, len = %i\n", | 2353 | pr_debug("%s: to = 0x%08x, len = %i\n", |
2356 | __func__, (unsigned int)to, (int)ops->ooblen); | 2354 | __func__, (unsigned int)to, (int)ops->ooblen); |
2357 | 2355 | ||
2358 | if (ops->mode == MTD_OOB_AUTO) | 2356 | if (ops->mode == MTD_OOB_AUTO) |
@@ -2362,14 +2360,14 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to, | |||
2362 | 2360 | ||
2363 | /* Do not allow write past end of page */ | 2361 | /* Do not allow write past end of page */ |
2364 | if ((ops->ooboffs + ops->ooblen) > len) { | 2362 | if ((ops->ooboffs + ops->ooblen) > len) { |
2365 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Attempt to write " | 2363 | pr_debug("%s: attempt to write past end of page\n", |
2366 | "past end of page\n", __func__); | 2364 | __func__); |
2367 | return -EINVAL; | 2365 | return -EINVAL; |
2368 | } | 2366 | } |
2369 | 2367 | ||
2370 | if (unlikely(ops->ooboffs >= len)) { | 2368 | if (unlikely(ops->ooboffs >= len)) { |
2371 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Attempt to start " | 2369 | pr_debug("%s: attempt to start write outside oob\n", |
2372 | "write outside oob\n", __func__); | 2370 | __func__); |
2373 | return -EINVAL; | 2371 | return -EINVAL; |
2374 | } | 2372 | } |
2375 | 2373 | ||
@@ -2378,8 +2376,8 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to, | |||
2378 | ops->ooboffs + ops->ooblen > | 2376 | ops->ooboffs + ops->ooblen > |
2379 | ((mtd->size >> chip->page_shift) - | 2377 | ((mtd->size >> chip->page_shift) - |
2380 | (to >> chip->page_shift)) * len)) { | 2378 | (to >> chip->page_shift)) * len)) { |
2381 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Attempt write beyond " | 2379 | pr_debug("%s: attempt to write beyond end of device\n", |
2382 | "end of device\n", __func__); | 2380 | __func__); |
2383 | return -EINVAL; | 2381 | return -EINVAL; |
2384 | } | 2382 | } |
2385 | 2383 | ||
@@ -2432,8 +2430,8 @@ static int nand_write_oob(struct mtd_info *mtd, loff_t to, | |||
2432 | 2430 | ||
2433 | /* Do not allow writes past end of device */ | 2431 | /* Do not allow writes past end of device */ |
2434 | if (ops->datbuf && (to + ops->len) > mtd->size) { | 2432 | if (ops->datbuf && (to + ops->len) > mtd->size) { |
2435 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Attempt write beyond " | 2433 | pr_debug("%s: attempt to write beyond end of device\n", |
2436 | "end of device\n", __func__); | 2434 | __func__); |
2437 | return -EINVAL; | 2435 | return -EINVAL; |
2438 | } | 2436 | } |
2439 | 2437 | ||
@@ -2522,9 +2520,9 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, | |||
2522 | unsigned int bbt_masked_page = 0xffffffff; | 2520 | unsigned int bbt_masked_page = 0xffffffff; |
2523 | loff_t len; | 2521 | loff_t len; |
2524 | 2522 | ||
2525 | DEBUG(MTD_DEBUG_LEVEL3, "%s: start = 0x%012llx, len = %llu\n", | 2523 | pr_debug("%s: start = 0x%012llx, len = %llu\n", |
2526 | __func__, (unsigned long long)instr->addr, | 2524 | __func__, (unsigned long long)instr->addr, |
2527 | (unsigned long long)instr->len); | 2525 | (unsigned long long)instr->len); |
2528 | 2526 | ||
2529 | if (check_offs_len(mtd, instr->addr, instr->len)) | 2527 | if (check_offs_len(mtd, instr->addr, instr->len)) |
2530 | return -EINVAL; | 2528 | return -EINVAL; |
@@ -2546,8 +2544,8 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, | |||
2546 | 2544 | ||
2547 | /* Check, if it is write protected */ | 2545 | /* Check, if it is write protected */ |
2548 | if (nand_check_wp(mtd)) { | 2546 | if (nand_check_wp(mtd)) { |
2549 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Device is write protected!!!\n", | 2547 | pr_debug("%s: device is write protected!\n", |
2550 | __func__); | 2548 | __func__); |
2551 | instr->state = MTD_ERASE_FAILED; | 2549 | instr->state = MTD_ERASE_FAILED; |
2552 | goto erase_exit; | 2550 | goto erase_exit; |
2553 | } | 2551 | } |
@@ -2598,8 +2596,8 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, | |||
2598 | 2596 | ||
2599 | /* See if block erase succeeded */ | 2597 | /* See if block erase succeeded */ |
2600 | if (status & NAND_STATUS_FAIL) { | 2598 | if (status & NAND_STATUS_FAIL) { |
2601 | DEBUG(MTD_DEBUG_LEVEL0, "%s: Failed erase, " | 2599 | pr_debug("%s: failed erase, page 0x%08x\n", |
2602 | "page 0x%08x\n", __func__, page); | 2600 | __func__, page); |
2603 | instr->state = MTD_ERASE_FAILED; | 2601 | instr->state = MTD_ERASE_FAILED; |
2604 | instr->fail_addr = | 2602 | instr->fail_addr = |
2605 | ((loff_t)page << chip->page_shift); | 2603 | ((loff_t)page << chip->page_shift); |
@@ -2659,9 +2657,9 @@ erase_exit: | |||
2659 | if (!rewrite_bbt[chipnr]) | 2657 | if (!rewrite_bbt[chipnr]) |
2660 | continue; | 2658 | continue; |
2661 | /* Update the BBT for chip */ | 2659 | /* Update the BBT for chip */ |
2662 | DEBUG(MTD_DEBUG_LEVEL0, "%s: nand_update_bbt " | 2660 | pr_debug("%s: nand_update_bbt (%d:0x%0llx 0x%0x)\n", |
2663 | "(%d:0x%0llx 0x%0x)\n", __func__, chipnr, | 2661 | __func__, chipnr, rewrite_bbt[chipnr], |
2664 | rewrite_bbt[chipnr], chip->bbt_td->pages[chipnr]); | 2662 | chip->bbt_td->pages[chipnr]); |
2665 | nand_update_bbt(mtd, rewrite_bbt[chipnr]); | 2663 | nand_update_bbt(mtd, rewrite_bbt[chipnr]); |
2666 | } | 2664 | } |
2667 | 2665 | ||
@@ -2679,7 +2677,7 @@ static void nand_sync(struct mtd_info *mtd) | |||
2679 | { | 2677 | { |
2680 | struct nand_chip *chip = mtd->priv; | 2678 | struct nand_chip *chip = mtd->priv; |
2681 | 2679 | ||
2682 | DEBUG(MTD_DEBUG_LEVEL3, "%s: called\n", __func__); | 2680 | pr_debug("%s: called\n", __func__); |
2683 | 2681 | ||
2684 | /* Grab the lock and see if the device is available */ | 2682 | /* Grab the lock and see if the device is available */ |
2685 | nand_get_device(chip, mtd, FL_SYNCING); | 2683 | nand_get_device(chip, mtd, FL_SYNCING); |
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index dba332327d4f..6aa8125772b8 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c | |||
@@ -1383,8 +1383,9 @@ int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt) | |||
1383 | block = (int)(offs >> (this->bbt_erase_shift - 1)); | 1383 | block = (int)(offs >> (this->bbt_erase_shift - 1)); |
1384 | res = (this->bbt[block >> 3] >> (block & 0x06)) & 0x03; | 1384 | res = (this->bbt[block >> 3] >> (block & 0x06)) & 0x03; |
1385 | 1385 | ||
1386 | DEBUG(MTD_DEBUG_LEVEL2, "nand_isbad_bbt(): bbt info for offs 0x%08x: (block %d) 0x%02x\n", | 1386 | pr_debug("nand_isbad_bbt(): bbt info for offs 0x%08x: " |
1387 | (unsigned int)offs, block >> 1, res); | 1387 | "(block %d) 0x%02x\n", |
1388 | (unsigned int)offs, block >> 1, res); | ||
1388 | 1389 | ||
1389 | switch ((int)res) { | 1390 | switch ((int)res) { |
1390 | case 0x00: | 1391 | case 0x00: |
diff --git a/drivers/mtd/nand/nand_bch.c b/drivers/mtd/nand/nand_bch.c index 0f931e757116..16cca9b99052 100644 --- a/drivers/mtd/nand/nand_bch.c +++ b/drivers/mtd/nand/nand_bch.c | |||
@@ -93,7 +93,7 @@ int nand_bch_correct_data(struct mtd_info *mtd, unsigned char *buf, | |||
93 | buf[errloc[i] >> 3] ^= (1 << (errloc[i] & 7)); | 93 | buf[errloc[i] >> 3] ^= (1 << (errloc[i] & 7)); |
94 | /* else error in ecc, no action needed */ | 94 | /* else error in ecc, no action needed */ |
95 | 95 | ||
96 | DEBUG(MTD_DEBUG_LEVEL0, "%s: corrected bitflip %u\n", | 96 | pr_debug("%s: corrected bitflip %u\n", |
97 | __func__, errloc[i]); | 97 | __func__, errloc[i]); |
98 | } | 98 | } |
99 | } else if (count < 0) { | 99 | } else if (count < 0) { |
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index c5e33fdcbc86..81e6bc0c9048 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c | |||
@@ -741,12 +741,12 @@ static int omap_compare_ecc(u8 *ecc_data1, /* read from NAND memory */ | |||
741 | 741 | ||
742 | case 1: | 742 | case 1: |
743 | /* Uncorrectable error */ | 743 | /* Uncorrectable error */ |
744 | DEBUG(MTD_DEBUG_LEVEL0, "ECC UNCORRECTED_ERROR 1\n"); | 744 | pr_debug("ECC UNCORRECTED_ERROR 1\n"); |
745 | return -1; | 745 | return -1; |
746 | 746 | ||
747 | case 11: | 747 | case 11: |
748 | /* UN-Correctable error */ | 748 | /* UN-Correctable error */ |
749 | DEBUG(MTD_DEBUG_LEVEL0, "ECC UNCORRECTED_ERROR B\n"); | 749 | pr_debug("ECC UNCORRECTED_ERROR B\n"); |
750 | return -1; | 750 | return -1; |
751 | 751 | ||
752 | case 12: | 752 | case 12: |
@@ -763,7 +763,7 @@ static int omap_compare_ecc(u8 *ecc_data1, /* read from NAND memory */ | |||
763 | 763 | ||
764 | find_bit = (ecc_bit[5] << 2) + (ecc_bit[3] << 1) + ecc_bit[1]; | 764 | find_bit = (ecc_bit[5] << 2) + (ecc_bit[3] << 1) + ecc_bit[1]; |
765 | 765 | ||
766 | DEBUG(MTD_DEBUG_LEVEL0, "Correcting single bit ECC error at " | 766 | pr_debug("Correcting single bit ECC error at " |
767 | "offset: %d, bit: %d\n", find_byte, find_bit); | 767 | "offset: %d, bit: %d\n", find_byte, find_bit); |
768 | 768 | ||
769 | page_data[find_byte] ^= (1 << find_bit); | 769 | page_data[find_byte] ^= (1 << find_bit); |
@@ -776,7 +776,7 @@ static int omap_compare_ecc(u8 *ecc_data1, /* read from NAND memory */ | |||
776 | ecc_data2[2] == 0) | 776 | ecc_data2[2] == 0) |
777 | return 0; | 777 | return 0; |
778 | } | 778 | } |
779 | DEBUG(MTD_DEBUG_LEVEL0, "UNCORRECTED_ERROR default\n"); | 779 | pr_debug("UNCORRECTED_ERROR default\n"); |
780 | return -1; | 780 | return -1; |
781 | } | 781 | } |
782 | } | 782 | } |
diff --git a/drivers/mtd/nand/rtc_from4.c b/drivers/mtd/nand/rtc_from4.c index 33fe922b972c..f309addc2fa0 100644 --- a/drivers/mtd/nand/rtc_from4.c +++ b/drivers/mtd/nand/rtc_from4.c | |||
@@ -380,7 +380,7 @@ static int rtc_from4_correct_data(struct mtd_info *mtd, const u_char *buf, u_cha | |||
380 | /* Let the library code do its magic. */ | 380 | /* Let the library code do its magic. */ |
381 | res = decode_rs8(rs_decoder, (uint8_t *) buf, par, 512, syn, 0, NULL, 0xff, NULL); | 381 | res = decode_rs8(rs_decoder, (uint8_t *) buf, par, 512, syn, 0, NULL, 0xff, NULL); |
382 | if (res > 0) { | 382 | if (res > 0) { |
383 | DEBUG(MTD_DEBUG_LEVEL0, "rtc_from4_correct_data: " "ECC corrected %d errors on read\n", res); | 383 | pr_debug("rtc_from4_correct_data: " "ECC corrected %d errors on read\n", res); |
384 | } | 384 | } |
385 | return res; | 385 | return res; |
386 | } | 386 | } |
diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c index f3b3239746c8..93d6fc68b892 100644 --- a/drivers/mtd/nftlcore.c +++ b/drivers/mtd/nftlcore.c | |||
@@ -63,7 +63,7 @@ static void nftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) | |||
63 | return; | 63 | return; |
64 | } | 64 | } |
65 | 65 | ||
66 | DEBUG(MTD_DEBUG_LEVEL1, "NFTL: add_mtd for %s\n", mtd->name); | 66 | pr_debug("NFTL: add_mtd for %s\n", mtd->name); |
67 | 67 | ||
68 | nftl = kzalloc(sizeof(struct NFTLrecord), GFP_KERNEL); | 68 | nftl = kzalloc(sizeof(struct NFTLrecord), GFP_KERNEL); |
69 | 69 | ||
@@ -130,7 +130,7 @@ static void nftl_remove_dev(struct mtd_blktrans_dev *dev) | |||
130 | { | 130 | { |
131 | struct NFTLrecord *nftl = (void *)dev; | 131 | struct NFTLrecord *nftl = (void *)dev; |
132 | 132 | ||
133 | DEBUG(MTD_DEBUG_LEVEL1, "NFTL: remove_dev (i=%d)\n", dev->devnum); | 133 | pr_debug("NFTL: remove_dev (i=%d)\n", dev->devnum); |
134 | 134 | ||
135 | del_mtd_blktrans_dev(dev); | 135 | del_mtd_blktrans_dev(dev); |
136 | kfree(nftl->ReplUnitTable); | 136 | kfree(nftl->ReplUnitTable); |
@@ -218,7 +218,7 @@ static u16 NFTL_findfreeblock(struct NFTLrecord *nftl, int desperate ) | |||
218 | 218 | ||
219 | /* Normally, we force a fold to happen before we run out of free blocks completely */ | 219 | /* Normally, we force a fold to happen before we run out of free blocks completely */ |
220 | if (!desperate && nftl->numfreeEUNs < 2) { | 220 | if (!desperate && nftl->numfreeEUNs < 2) { |
221 | DEBUG(MTD_DEBUG_LEVEL1, "NFTL_findfreeblock: there are too few free EUNs\n"); | 221 | pr_debug("NFTL_findfreeblock: there are too few free EUNs\n"); |
222 | return BLOCK_NIL; | 222 | return BLOCK_NIL; |
223 | } | 223 | } |
224 | 224 | ||
@@ -289,8 +289,7 @@ static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned p | |||
289 | if (block == 2) { | 289 | if (block == 2) { |
290 | foldmark = oob.u.c.FoldMark | oob.u.c.FoldMark1; | 290 | foldmark = oob.u.c.FoldMark | oob.u.c.FoldMark1; |
291 | if (foldmark == FOLD_MARK_IN_PROGRESS) { | 291 | if (foldmark == FOLD_MARK_IN_PROGRESS) { |
292 | DEBUG(MTD_DEBUG_LEVEL1, | 292 | pr_debug("Write Inhibited on EUN %d\n", thisEUN); |
293 | "Write Inhibited on EUN %d\n", thisEUN); | ||
294 | inplace = 0; | 293 | inplace = 0; |
295 | } else { | 294 | } else { |
296 | /* There's no other reason not to do inplace, | 295 | /* There's no other reason not to do inplace, |
@@ -355,7 +354,7 @@ static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned p | |||
355 | if (BlockLastState[block] != SECTOR_FREE && | 354 | if (BlockLastState[block] != SECTOR_FREE && |
356 | BlockMap[block] != BLOCK_NIL && | 355 | BlockMap[block] != BLOCK_NIL && |
357 | BlockMap[block] != targetEUN) { | 356 | BlockMap[block] != targetEUN) { |
358 | DEBUG(MTD_DEBUG_LEVEL1, "Setting inplace to 0. VUC %d, " | 357 | pr_debug("Setting inplace to 0. VUC %d, " |
359 | "block %d was %x lastEUN, " | 358 | "block %d was %x lastEUN, " |
360 | "and is in EUN %d (%s) %d\n", | 359 | "and is in EUN %d (%s) %d\n", |
361 | thisVUC, block, BlockLastState[block], | 360 | thisVUC, block, BlockLastState[block], |
@@ -371,14 +370,14 @@ static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned p | |||
371 | pendingblock < ((thisVUC + 1)* (nftl->EraseSize / 512)) && | 370 | pendingblock < ((thisVUC + 1)* (nftl->EraseSize / 512)) && |
372 | BlockLastState[pendingblock - (thisVUC * (nftl->EraseSize / 512))] != | 371 | BlockLastState[pendingblock - (thisVUC * (nftl->EraseSize / 512))] != |
373 | SECTOR_FREE) { | 372 | SECTOR_FREE) { |
374 | DEBUG(MTD_DEBUG_LEVEL1, "Pending write not free in EUN %d. " | 373 | pr_debug("Pending write not free in EUN %d. " |
375 | "Folding out of place.\n", targetEUN); | 374 | "Folding out of place.\n", targetEUN); |
376 | inplace = 0; | 375 | inplace = 0; |
377 | } | 376 | } |
378 | } | 377 | } |
379 | 378 | ||
380 | if (!inplace) { | 379 | if (!inplace) { |
381 | DEBUG(MTD_DEBUG_LEVEL1, "Cannot fold Virtual Unit Chain %d in place. " | 380 | pr_debug("Cannot fold Virtual Unit Chain %d in place. " |
382 | "Trying out-of-place\n", thisVUC); | 381 | "Trying out-of-place\n", thisVUC); |
383 | /* We need to find a targetEUN to fold into. */ | 382 | /* We need to find a targetEUN to fold into. */ |
384 | targetEUN = NFTL_findfreeblock(nftl, 1); | 383 | targetEUN = NFTL_findfreeblock(nftl, 1); |
@@ -408,7 +407,7 @@ static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned p | |||
408 | and the Erase Unit into which we are supposed to be copying. | 407 | and the Erase Unit into which we are supposed to be copying. |
409 | Go for it. | 408 | Go for it. |
410 | */ | 409 | */ |
411 | DEBUG(MTD_DEBUG_LEVEL1,"Folding chain %d into unit %d\n", thisVUC, targetEUN); | 410 | pr_debug("Folding chain %d into unit %d\n", thisVUC, targetEUN); |
412 | for (block = 0; block < nftl->EraseSize / 512 ; block++) { | 411 | for (block = 0; block < nftl->EraseSize / 512 ; block++) { |
413 | unsigned char movebuf[512]; | 412 | unsigned char movebuf[512]; |
414 | int ret; | 413 | int ret; |
@@ -455,7 +454,7 @@ static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned p | |||
455 | has duplicate chains, we need to free one of the chains because it's not necessary any more. | 454 | has duplicate chains, we need to free one of the chains because it's not necessary any more. |
456 | */ | 455 | */ |
457 | thisEUN = nftl->EUNtable[thisVUC]; | 456 | thisEUN = nftl->EUNtable[thisVUC]; |
458 | DEBUG(MTD_DEBUG_LEVEL1,"Want to erase\n"); | 457 | pr_debug("Want to erase\n"); |
459 | 458 | ||
460 | /* For each block in the old chain (except the targetEUN of course), | 459 | /* For each block in the old chain (except the targetEUN of course), |
461 | free it and make it available for future use */ | 460 | free it and make it available for future use */ |
@@ -568,7 +567,7 @@ static inline u16 NFTL_findwriteunit(struct NFTLrecord *nftl, unsigned block) | |||
568 | (writeEUN * nftl->EraseSize) + blockofs, | 567 | (writeEUN * nftl->EraseSize) + blockofs, |
569 | 8, &retlen, (char *)&bci); | 568 | 8, &retlen, (char *)&bci); |
570 | 569 | ||
571 | DEBUG(MTD_DEBUG_LEVEL2, "Status of block %d in EUN %d is %x\n", | 570 | pr_debug("Status of block %d in EUN %d is %x\n", |
572 | block , writeEUN, le16_to_cpu(bci.Status)); | 571 | block , writeEUN, le16_to_cpu(bci.Status)); |
573 | 572 | ||
574 | status = bci.Status | bci.Status1; | 573 | status = bci.Status | bci.Status1; |
@@ -621,7 +620,7 @@ static inline u16 NFTL_findwriteunit(struct NFTLrecord *nftl, unsigned block) | |||
621 | but they are reserved for when we're | 620 | but they are reserved for when we're |
622 | desperate. Well, now we're desperate. | 621 | desperate. Well, now we're desperate. |
623 | */ | 622 | */ |
624 | DEBUG(MTD_DEBUG_LEVEL1, "Using desperate==1 to find free EUN to accommodate write to VUC %d\n", thisVUC); | 623 | pr_debug("Using desperate==1 to find free EUN to accommodate write to VUC %d\n", thisVUC); |
625 | writeEUN = NFTL_findfreeblock(nftl, 1); | 624 | writeEUN = NFTL_findfreeblock(nftl, 1); |
626 | } | 625 | } |
627 | if (writeEUN == BLOCK_NIL) { | 626 | if (writeEUN == BLOCK_NIL) { |
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 30c652c071e8..b07b05259c92 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c | |||
@@ -1122,7 +1122,7 @@ static int onenand_mlc_read_ops_nolock(struct mtd_info *mtd, loff_t from, | |||
1122 | int ret = 0; | 1122 | int ret = 0; |
1123 | int writesize = this->writesize; | 1123 | int writesize = this->writesize; |
1124 | 1124 | ||
1125 | DEBUG(MTD_DEBUG_LEVEL3, "%s: from = 0x%08x, len = %i\n", | 1125 | pr_debug("%s: from = 0x%08x, len = %i\n", |
1126 | __func__, (unsigned int) from, (int) len); | 1126 | __func__, (unsigned int) from, (int) len); |
1127 | 1127 | ||
1128 | if (ops->mode == MTD_OOB_AUTO) | 1128 | if (ops->mode == MTD_OOB_AUTO) |
@@ -1226,7 +1226,7 @@ static int onenand_read_ops_nolock(struct mtd_info *mtd, loff_t from, | |||
1226 | int ret = 0, boundary = 0; | 1226 | int ret = 0, boundary = 0; |
1227 | int writesize = this->writesize; | 1227 | int writesize = this->writesize; |
1228 | 1228 | ||
1229 | DEBUG(MTD_DEBUG_LEVEL3, "%s: from = 0x%08x, len = %i\n", | 1229 | pr_debug("%s: from = 0x%08x, len = %i\n", |
1230 | __func__, (unsigned int) from, (int) len); | 1230 | __func__, (unsigned int) from, (int) len); |
1231 | 1231 | ||
1232 | if (ops->mode == MTD_OOB_AUTO) | 1232 | if (ops->mode == MTD_OOB_AUTO) |
@@ -1357,7 +1357,7 @@ static int onenand_read_oob_nolock(struct mtd_info *mtd, loff_t from, | |||
1357 | 1357 | ||
1358 | from += ops->ooboffs; | 1358 | from += ops->ooboffs; |
1359 | 1359 | ||
1360 | DEBUG(MTD_DEBUG_LEVEL3, "%s: from = 0x%08x, len = %i\n", | 1360 | pr_debug("%s: from = 0x%08x, len = %i\n", |
1361 | __func__, (unsigned int) from, (int) len); | 1361 | __func__, (unsigned int) from, (int) len); |
1362 | 1362 | ||
1363 | /* Initialize return length value */ | 1363 | /* Initialize return length value */ |
@@ -1576,7 +1576,7 @@ int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from, | |||
1576 | size_t len = ops->ooblen; | 1576 | size_t len = ops->ooblen; |
1577 | u_char *buf = ops->oobbuf; | 1577 | u_char *buf = ops->oobbuf; |
1578 | 1578 | ||
1579 | DEBUG(MTD_DEBUG_LEVEL3, "%s: from = 0x%08x, len = %zi\n", | 1579 | pr_debug("%s: from = 0x%08x, len = %zi\n", |
1580 | __func__, (unsigned int) from, len); | 1580 | __func__, (unsigned int) from, len); |
1581 | 1581 | ||
1582 | /* Initialize return value */ | 1582 | /* Initialize return value */ |
@@ -1750,7 +1750,7 @@ static int onenand_panic_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
1750 | /* Wait for any existing operation to clear */ | 1750 | /* Wait for any existing operation to clear */ |
1751 | onenand_panic_wait(mtd); | 1751 | onenand_panic_wait(mtd); |
1752 | 1752 | ||
1753 | DEBUG(MTD_DEBUG_LEVEL3, "%s: to = 0x%08x, len = %i\n", | 1753 | pr_debug("%s: to = 0x%08x, len = %i\n", |
1754 | __func__, (unsigned int) to, (int) len); | 1754 | __func__, (unsigned int) to, (int) len); |
1755 | 1755 | ||
1756 | /* Initialize retlen, in case of early exit */ | 1756 | /* Initialize retlen, in case of early exit */ |
@@ -1883,7 +1883,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to, | |||
1883 | u_char *oobbuf; | 1883 | u_char *oobbuf; |
1884 | int ret = 0, cmd; | 1884 | int ret = 0, cmd; |
1885 | 1885 | ||
1886 | DEBUG(MTD_DEBUG_LEVEL3, "%s: to = 0x%08x, len = %i\n", | 1886 | pr_debug("%s: to = 0x%08x, len = %i\n", |
1887 | __func__, (unsigned int) to, (int) len); | 1887 | __func__, (unsigned int) to, (int) len); |
1888 | 1888 | ||
1889 | /* Initialize retlen, in case of early exit */ | 1889 | /* Initialize retlen, in case of early exit */ |
@@ -2078,7 +2078,7 @@ static int onenand_write_oob_nolock(struct mtd_info *mtd, loff_t to, | |||
2078 | 2078 | ||
2079 | to += ops->ooboffs; | 2079 | to += ops->ooboffs; |
2080 | 2080 | ||
2081 | DEBUG(MTD_DEBUG_LEVEL3, "%s: to = 0x%08x, len = %i\n", | 2081 | pr_debug("%s: to = 0x%08x, len = %i\n", |
2082 | __func__, (unsigned int) to, (int) len); | 2082 | __func__, (unsigned int) to, (int) len); |
2083 | 2083 | ||
2084 | /* Initialize retlen, in case of early exit */ | 2084 | /* Initialize retlen, in case of early exit */ |
@@ -2489,7 +2489,7 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
2489 | struct mtd_erase_region_info *region = NULL; | 2489 | struct mtd_erase_region_info *region = NULL; |
2490 | loff_t region_offset = 0; | 2490 | loff_t region_offset = 0; |
2491 | 2491 | ||
2492 | DEBUG(MTD_DEBUG_LEVEL3, "%s: start=0x%012llx, len=%llu\n", __func__, | 2492 | pr_debug("%s: start=0x%012llx, len=%llu\n", __func__, |
2493 | (unsigned long long) instr->addr, (unsigned long long) instr->len); | 2493 | (unsigned long long) instr->addr, (unsigned long long) instr->len); |
2494 | 2494 | ||
2495 | /* Do not allow erase past end of device */ | 2495 | /* Do not allow erase past end of device */ |
@@ -2558,7 +2558,7 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
2558 | */ | 2558 | */ |
2559 | static void onenand_sync(struct mtd_info *mtd) | 2559 | static void onenand_sync(struct mtd_info *mtd) |
2560 | { | 2560 | { |
2561 | DEBUG(MTD_DEBUG_LEVEL3, "%s: called\n", __func__); | 2561 | pr_debug("%s: called\n", __func__); |
2562 | 2562 | ||
2563 | /* Grab the lock and see if the device is available */ | 2563 | /* Grab the lock and see if the device is available */ |
2564 | onenand_get_device(mtd, FL_SYNCING); | 2564 | onenand_get_device(mtd, FL_SYNCING); |
diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c index 09a7d1fb511d..3b9a2a9573c6 100644 --- a/drivers/mtd/onenand/onenand_bbt.c +++ b/drivers/mtd/onenand/onenand_bbt.c | |||
@@ -153,7 +153,7 @@ static int onenand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt) | |||
153 | block = (int) (onenand_block(this, offs) << 1); | 153 | block = (int) (onenand_block(this, offs) << 1); |
154 | res = (bbm->bbt[block >> 3] >> (block & 0x06)) & 0x03; | 154 | res = (bbm->bbt[block >> 3] >> (block & 0x06)) & 0x03; |
155 | 155 | ||
156 | DEBUG(MTD_DEBUG_LEVEL2, "onenand_isbad_bbt: bbt info for offs 0x%08x: (block %d) 0x%02x\n", | 156 | pr_debug("onenand_isbad_bbt: bbt info for offs 0x%08x: (block %d) 0x%02x\n", |
157 | (unsigned int) offs, block >> 1, res); | 157 | (unsigned int) offs, block >> 1, res); |
158 | 158 | ||
159 | switch ((int) res) { | 159 | switch ((int) res) { |
diff --git a/drivers/mtd/ssfdc.c b/drivers/mtd/ssfdc.c index 00d1405af50b..5f917f0a9609 100644 --- a/drivers/mtd/ssfdc.c +++ b/drivers/mtd/ssfdc.c | |||
@@ -135,8 +135,7 @@ static int get_valid_cis_sector(struct mtd_info *mtd) | |||
135 | /* Found */ | 135 | /* Found */ |
136 | cis_sector = (int)(offset >> SECTOR_SHIFT); | 136 | cis_sector = (int)(offset >> SECTOR_SHIFT); |
137 | } else { | 137 | } else { |
138 | DEBUG(MTD_DEBUG_LEVEL1, | 138 | pr_debug("SSFDC_RO: CIS/IDI sector not found" |
139 | "SSFDC_RO: CIS/IDI sector not found" | ||
140 | " on %s (mtd%d)\n", mtd->name, | 139 | " on %s (mtd%d)\n", mtd->name, |
141 | mtd->index); | 140 | mtd->index); |
142 | } | 141 | } |
@@ -221,8 +220,7 @@ static int get_logical_address(uint8_t *oob_buf) | |||
221 | block_address >>= 1; | 220 | block_address >>= 1; |
222 | 221 | ||
223 | if (get_parity(block_address, 10) != parity) { | 222 | if (get_parity(block_address, 10) != parity) { |
224 | DEBUG(MTD_DEBUG_LEVEL0, | 223 | pr_debug("SSFDC_RO: logical address field%d" |
225 | "SSFDC_RO: logical address field%d" | ||
226 | "parity error(0x%04X)\n", j+1, | 224 | "parity error(0x%04X)\n", j+1, |
227 | block_address); | 225 | block_address); |
228 | } else { | 226 | } else { |
@@ -235,7 +233,7 @@ static int get_logical_address(uint8_t *oob_buf) | |||
235 | if (!ok) | 233 | if (!ok) |
236 | block_address = -2; | 234 | block_address = -2; |
237 | 235 | ||
238 | DEBUG(MTD_DEBUG_LEVEL3, "SSFDC_RO: get_logical_address() %d\n", | 236 | pr_debug("SSFDC_RO: get_logical_address() %d\n", |
239 | block_address); | 237 | block_address); |
240 | 238 | ||
241 | return block_address; | 239 | return block_address; |
@@ -249,7 +247,7 @@ static int build_logical_block_map(struct ssfdcr_record *ssfdc) | |||
249 | int ret, block_address, phys_block; | 247 | int ret, block_address, phys_block; |
250 | struct mtd_info *mtd = ssfdc->mbd.mtd; | 248 | struct mtd_info *mtd = ssfdc->mbd.mtd; |
251 | 249 | ||
252 | DEBUG(MTD_DEBUG_LEVEL1, "SSFDC_RO: build_block_map() nblks=%d (%luK)\n", | 250 | pr_debug("SSFDC_RO: build_block_map() nblks=%d (%luK)\n", |
253 | ssfdc->map_len, | 251 | ssfdc->map_len, |
254 | (unsigned long)ssfdc->map_len * ssfdc->erase_size / 1024); | 252 | (unsigned long)ssfdc->map_len * ssfdc->erase_size / 1024); |
255 | 253 | ||
@@ -262,8 +260,7 @@ static int build_logical_block_map(struct ssfdcr_record *ssfdc) | |||
262 | 260 | ||
263 | ret = read_raw_oob(mtd, offset, oob_buf); | 261 | ret = read_raw_oob(mtd, offset, oob_buf); |
264 | if (ret < 0) { | 262 | if (ret < 0) { |
265 | DEBUG(MTD_DEBUG_LEVEL0, | 263 | pr_debug("SSFDC_RO: mtd read_oob() failed at %lu\n", |
266 | "SSFDC_RO: mtd read_oob() failed at %lu\n", | ||
267 | offset); | 264 | offset); |
268 | return -1; | 265 | return -1; |
269 | } | 266 | } |
@@ -279,8 +276,7 @@ static int build_logical_block_map(struct ssfdcr_record *ssfdc) | |||
279 | ssfdc->logic_block_map[block_address] = | 276 | ssfdc->logic_block_map[block_address] = |
280 | (unsigned short)phys_block; | 277 | (unsigned short)phys_block; |
281 | 278 | ||
282 | DEBUG(MTD_DEBUG_LEVEL2, | 279 | pr_debug("SSFDC_RO: build_block_map() phys_block=%d," |
283 | "SSFDC_RO: build_block_map() phys_block=%d," | ||
284 | "logic_block_addr=%d, zone=%d\n", | 280 | "logic_block_addr=%d, zone=%d\n", |
285 | phys_block, block_address, zone_index); | 281 | phys_block, block_address, zone_index); |
286 | } | 282 | } |
@@ -316,8 +312,7 @@ static void ssfdcr_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) | |||
316 | ssfdc->erase_size = mtd->erasesize; | 312 | ssfdc->erase_size = mtd->erasesize; |
317 | ssfdc->map_len = (u32)mtd->size / mtd->erasesize; | 313 | ssfdc->map_len = (u32)mtd->size / mtd->erasesize; |
318 | 314 | ||
319 | DEBUG(MTD_DEBUG_LEVEL1, | 315 | pr_debug("SSFDC_RO: cis_block=%d,erase_size=%d,map_len=%d,n_zones=%d\n", |
320 | "SSFDC_RO: cis_block=%d,erase_size=%d,map_len=%d,n_zones=%d\n", | ||
321 | ssfdc->cis_block, ssfdc->erase_size, ssfdc->map_len, | 316 | ssfdc->cis_block, ssfdc->erase_size, ssfdc->map_len, |
322 | DIV_ROUND_UP(ssfdc->map_len, MAX_PHYS_BLK_PER_ZONE)); | 317 | DIV_ROUND_UP(ssfdc->map_len, MAX_PHYS_BLK_PER_ZONE)); |
323 | 318 | ||
@@ -328,7 +323,7 @@ static void ssfdcr_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) | |||
328 | ssfdc->cylinders = (unsigned short)(((u32)mtd->size >> SECTOR_SHIFT) / | 323 | ssfdc->cylinders = (unsigned short)(((u32)mtd->size >> SECTOR_SHIFT) / |
329 | ((long)ssfdc->sectors * (long)ssfdc->heads)); | 324 | ((long)ssfdc->sectors * (long)ssfdc->heads)); |
330 | 325 | ||
331 | DEBUG(MTD_DEBUG_LEVEL1, "SSFDC_RO: using C:%d H:%d S:%d == %ld sects\n", | 326 | pr_debug("SSFDC_RO: using C:%d H:%d S:%d == %ld sects\n", |
332 | ssfdc->cylinders, ssfdc->heads , ssfdc->sectors, | 327 | ssfdc->cylinders, ssfdc->heads , ssfdc->sectors, |
333 | (long)ssfdc->cylinders * (long)ssfdc->heads * | 328 | (long)ssfdc->cylinders * (long)ssfdc->heads * |
334 | (long)ssfdc->sectors); | 329 | (long)ssfdc->sectors); |
@@ -365,7 +360,7 @@ static void ssfdcr_remove_dev(struct mtd_blktrans_dev *dev) | |||
365 | { | 360 | { |
366 | struct ssfdcr_record *ssfdc = (struct ssfdcr_record *)dev; | 361 | struct ssfdcr_record *ssfdc = (struct ssfdcr_record *)dev; |
367 | 362 | ||
368 | DEBUG(MTD_DEBUG_LEVEL1, "SSFDC_RO: remove_dev (i=%d)\n", dev->devnum); | 363 | pr_debug("SSFDC_RO: remove_dev (i=%d)\n", dev->devnum); |
369 | 364 | ||
370 | del_mtd_blktrans_dev(dev); | 365 | del_mtd_blktrans_dev(dev); |
371 | kfree(ssfdc->logic_block_map); | 366 | kfree(ssfdc->logic_block_map); |
@@ -381,8 +376,7 @@ static int ssfdcr_readsect(struct mtd_blktrans_dev *dev, | |||
381 | offset = (int)(logic_sect_no % sectors_per_block); | 376 | offset = (int)(logic_sect_no % sectors_per_block); |
382 | block_address = (int)(logic_sect_no / sectors_per_block); | 377 | block_address = (int)(logic_sect_no / sectors_per_block); |
383 | 378 | ||
384 | DEBUG(MTD_DEBUG_LEVEL3, | 379 | pr_debug("SSFDC_RO: ssfdcr_readsect(%lu) sec_per_blk=%d, ofst=%d," |
385 | "SSFDC_RO: ssfdcr_readsect(%lu) sec_per_blk=%d, ofst=%d," | ||
386 | " block_addr=%d\n", logic_sect_no, sectors_per_block, offset, | 380 | " block_addr=%d\n", logic_sect_no, sectors_per_block, offset, |
387 | block_address); | 381 | block_address); |
388 | 382 | ||
@@ -391,8 +385,7 @@ static int ssfdcr_readsect(struct mtd_blktrans_dev *dev, | |||
391 | 385 | ||
392 | block_address = ssfdc->logic_block_map[block_address]; | 386 | block_address = ssfdc->logic_block_map[block_address]; |
393 | 387 | ||
394 | DEBUG(MTD_DEBUG_LEVEL3, | 388 | pr_debug("SSFDC_RO: ssfdcr_readsect() phys_block_addr=%d\n", |
395 | "SSFDC_RO: ssfdcr_readsect() phys_block_addr=%d\n", | ||
396 | block_address); | 389 | block_address); |
397 | 390 | ||
398 | if (block_address < 0xffff) { | 391 | if (block_address < 0xffff) { |
@@ -401,8 +394,7 @@ static int ssfdcr_readsect(struct mtd_blktrans_dev *dev, | |||
401 | sect_no = (unsigned long)block_address * sectors_per_block + | 394 | sect_no = (unsigned long)block_address * sectors_per_block + |
402 | offset; | 395 | offset; |
403 | 396 | ||
404 | DEBUG(MTD_DEBUG_LEVEL3, | 397 | pr_debug("SSFDC_RO: ssfdcr_readsect() phys_sect_no=%lu\n", |
405 | "SSFDC_RO: ssfdcr_readsect() phys_sect_no=%lu\n", | ||
406 | sect_no); | 398 | sect_no); |
407 | 399 | ||
408 | if (read_physical_sector(ssfdc->mbd.mtd, buf, sect_no) < 0) | 400 | if (read_physical_sector(ssfdc->mbd.mtd, buf, sect_no) < 0) |
@@ -418,7 +410,7 @@ static int ssfdcr_getgeo(struct mtd_blktrans_dev *dev, struct hd_geometry *geo) | |||
418 | { | 410 | { |
419 | struct ssfdcr_record *ssfdc = (struct ssfdcr_record *)dev; | 411 | struct ssfdcr_record *ssfdc = (struct ssfdcr_record *)dev; |
420 | 412 | ||
421 | DEBUG(MTD_DEBUG_LEVEL1, "SSFDC_RO: ssfdcr_getgeo() C=%d, H=%d, S=%d\n", | 413 | pr_debug("SSFDC_RO: ssfdcr_getgeo() C=%d, H=%d, S=%d\n", |
422 | ssfdc->cylinders, ssfdc->heads, ssfdc->sectors); | 414 | ssfdc->cylinders, ssfdc->heads, ssfdc->sectors); |
423 | 415 | ||
424 | geo->heads = ssfdc->heads; | 416 | geo->heads = ssfdc->heads; |