diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2015-01-12 23:29:17 -0500 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-02-05 23:01:09 -0500 |
commit | d79ee72b8ac37f30a2218fec8c2ba9618c306302 (patch) | |
tree | 65a17f227af90e502777849c7fc9db73a6088332 | |
parent | 2ea69d217a376b4d549fc155675f948eaf7afa86 (diff) |
mtd: denali: remove unnecessary stubs
This driver uses NAND_ECC_HW_SYNDROME mode. The nand_scan_tail()
function would not complain about missing ecc->calculate,
ecc->correct, ecc->hwctl handlers.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r-- | drivers/mtd/nand/denali.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 5e397fba419b..f44c6061536a 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c | |||
@@ -1328,35 +1328,6 @@ static void denali_cmdfunc(struct mtd_info *mtd, unsigned int cmd, int col, | |||
1328 | break; | 1328 | break; |
1329 | } | 1329 | } |
1330 | } | 1330 | } |
1331 | |||
1332 | /* stubs for ECC functions not used by the NAND core */ | ||
1333 | static int denali_ecc_calculate(struct mtd_info *mtd, const uint8_t *data, | ||
1334 | uint8_t *ecc_code) | ||
1335 | { | ||
1336 | struct denali_nand_info *denali = mtd_to_denali(mtd); | ||
1337 | |||
1338 | dev_err(denali->dev, "denali_ecc_calculate called unexpectedly\n"); | ||
1339 | BUG(); | ||
1340 | return -EIO; | ||
1341 | } | ||
1342 | |||
1343 | static int denali_ecc_correct(struct mtd_info *mtd, uint8_t *data, | ||
1344 | uint8_t *read_ecc, uint8_t *calc_ecc) | ||
1345 | { | ||
1346 | struct denali_nand_info *denali = mtd_to_denali(mtd); | ||
1347 | |||
1348 | dev_err(denali->dev, "denali_ecc_correct called unexpectedly\n"); | ||
1349 | BUG(); | ||
1350 | return -EIO; | ||
1351 | } | ||
1352 | |||
1353 | static void denali_ecc_hwctl(struct mtd_info *mtd, int mode) | ||
1354 | { | ||
1355 | struct denali_nand_info *denali = mtd_to_denali(mtd); | ||
1356 | |||
1357 | dev_err(denali->dev, "denali_ecc_hwctl called unexpectedly\n"); | ||
1358 | BUG(); | ||
1359 | } | ||
1360 | /* end NAND core entry points */ | 1331 | /* end NAND core entry points */ |
1361 | 1332 | ||
1362 | /* Initialization code to bring the device up to a known good state */ | 1333 | /* Initialization code to bring the device up to a known good state */ |
@@ -1609,15 +1580,6 @@ int denali_init(struct denali_nand_info *denali) | |||
1609 | denali->totalblks = denali->mtd.size >> denali->nand.phys_erase_shift; | 1580 | denali->totalblks = denali->mtd.size >> denali->nand.phys_erase_shift; |
1610 | denali->blksperchip = denali->totalblks / denali->nand.numchips; | 1581 | denali->blksperchip = denali->totalblks / denali->nand.numchips; |
1611 | 1582 | ||
1612 | /* | ||
1613 | * These functions are required by the NAND core framework, otherwise, | ||
1614 | * the NAND core will assert. However, we don't need them, so we'll stub | ||
1615 | * them out. | ||
1616 | */ | ||
1617 | denali->nand.ecc.calculate = denali_ecc_calculate; | ||
1618 | denali->nand.ecc.correct = denali_ecc_correct; | ||
1619 | denali->nand.ecc.hwctl = denali_ecc_hwctl; | ||
1620 | |||
1621 | /* override the default read operations */ | 1583 | /* override the default read operations */ |
1622 | denali->nand.ecc.size = ECC_SECTOR_SIZE * denali->devnum; | 1584 | denali->nand.ecc.size = ECC_SECTOR_SIZE * denali->devnum; |
1623 | denali->nand.ecc.read_page = denali_read_page; | 1585 | denali->nand.ecc.read_page = denali_read_page; |