mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-25 06:52:28 +02:00
code style cleanup jz4740_nand.c
This commit is contained in:
parent
ce96b1f2a5
commit
3dde1ac212
@ -206,7 +206,6 @@ static int jz_nand_correct_ecc_rs(struct mtd_info* mtd, uint8_t *dat,
|
|||||||
reg &= ~JZ_NAND_ECC_CTRL_ENABLE;
|
reg &= ~JZ_NAND_ECC_CTRL_ENABLE;
|
||||||
writel(reg, nand->base + JZ_REG_NAND_ECC_CTRL);
|
writel(reg, nand->base + JZ_REG_NAND_ECC_CTRL);
|
||||||
|
|
||||||
|
|
||||||
if (status & JZ_NAND_STATUS_ERROR) {
|
if (status & JZ_NAND_STATUS_ERROR) {
|
||||||
if (status & JZ_NAND_STATUS_UNCOR_ERROR) {
|
if (status & JZ_NAND_STATUS_UNCOR_ERROR) {
|
||||||
printk("uncorrectable ecc:");
|
printk("uncorrectable ecc:");
|
||||||
@ -224,7 +223,7 @@ static int jz_nand_correct_ecc_rs(struct mtd_info* mtd, uint8_t *dat,
|
|||||||
|
|
||||||
printk("error_count: %d %x\n", error_count, status);
|
printk("error_count: %d %x\n", error_count, status);
|
||||||
|
|
||||||
for(i = 0;i < error_count; ++i) {
|
for(i = 0; i < error_count; ++i) {
|
||||||
error = readl(nand->base + JZ_REG_NAND_ERR(i));
|
error = readl(nand->base + JZ_REG_NAND_ERR(i));
|
||||||
index = ((error >> 16) & 0x1ff) - 1;
|
index = ((error >> 16) & 0x1ff) - 1;
|
||||||
if (index >= 0 && index < 512) {
|
if (index >= 0 && index < 512) {
|
||||||
|
Loading…
Reference in New Issue
Block a user