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 /drivers/mtd/nand | |
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>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/mxc_nand.c | 14 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 74 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_bbt.c | 5 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_bch.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/omap2.c | 8 | ||||
-rw-r--r-- | drivers/mtd/nand/rtc_from4.c | 2 |
6 files changed, 51 insertions, 54 deletions
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 | } |