Skip to content

Commit

Permalink
block: sun4i_nand: small code update
Browse files Browse the repository at this point in the history
  • Loading branch information
turl committed Nov 7, 2012
1 parent 4a44831 commit 3211b0b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
7 changes: 1 addition & 6 deletions drivers/block/sun4i_nand/nfc/nfc_r.c
Expand Up @@ -1308,12 +1308,7 @@ __s32 NFC_ReadRetry(__u32 chip, __u32 retry_count, __u32 read_retry_type)
}

//fix 0
if(read_retry_mode == 0)
{
if(retry_count == 10)
param[1] = 0;
}
else if(read_retry_mode == 1)
if((read_retry_mode == 0)||(read_retry_mode == 1))
{
if((retry_count >=2)&&(retry_count<=6))
param[0] = 0;
Expand Down
6 changes: 3 additions & 3 deletions drivers/block/sun4i_nand/src/physic/nand_phy.c
Expand Up @@ -333,7 +333,7 @@ __s32 _read_single_page_spare(struct boot_physical_param *readop,__u8 dma_wait_m
PHY_DBG("[Read_single_page_spare] NFC_ReadRetry %d cycles, chip = %d, block = %d, page = %d, RetryCount = %d \n", k ,readop->chip,readop->block, readop->page, RetryCount[readop->chip]);
if(ret == -ERR_ECC)
PHY_DBG("ecc error!\n");
PHY_DBG("spare buf: %x, %x, %x, %x, %x, %x, %x, %x\n", sparebuf[0],sparebuf[1],sparebuf[2],sparebuf[3],sparebuf[4],sparebuf[5],sparebuf[6],sparebuf[7]);
//PHY_DBG("spare buf: %x, %x, %x, %x, %x, %x, %x, %x\n", sparebuf[0],sparebuf[1],sparebuf[2],sparebuf[3],sparebuf[4],sparebuf[5],sparebuf[6],sparebuf[7]);
}

if(ret == ECC_LIMIT)
Expand Down Expand Up @@ -567,7 +567,7 @@ __s32 _read_sectors(struct boot_physical_param *readop,__u8 dma_wait_mode)
PHY_DBG("[Read_sectors] NFC_ReadRetry %d cycles, chip = %d, block = %d, page = %d, RetryCount = %d \n", k ,readop->chip,readop->block, readop->page, RetryCount[readop->chip]);
if(ret == -ERR_ECC)
PHY_DBG("ecc error!\n");
PHY_DBG("spare buf: %x, %x, %x, %x, %x, %x, %x, %x\n", sparebuf[0],sparebuf[1],sparebuf[2],sparebuf[3],sparebuf[4],sparebuf[5],sparebuf[6],sparebuf[7]);
//PHY_DBG("spare buf: %x, %x, %x, %x, %x, %x, %x, %x\n", sparebuf[0],sparebuf[1],sparebuf[2],sparebuf[3],sparebuf[4],sparebuf[5],sparebuf[6],sparebuf[7]);
}

if(ret == ECC_LIMIT)
Expand Down Expand Up @@ -1007,7 +1007,7 @@ __s32 _read_sectors_for_spare(struct boot_physical_param *readop,__u8 dma_wait_m
PHY_DBG("[Read_sectors_for_spare] NFC_ReadRetry %d cycles, chip = %d, block = %d, page = %d, RetryCount = %d, i=%d \n", k ,readop->chip,readop->block, readop->page, RetryCount[readop->chip], i);
if(ret1 == -ERR_ECC)
PHY_DBG("ecc error!\n");
PHY_DBG("spare buf: %x, %x, %x, %x\n", sparebuf[4*i],sparebuf[4*i+1],sparebuf[4*i+2],sparebuf[4*i+3]);
//PHY_DBG("spare buf: %x, %x, %x, %x\n", sparebuf[4*i],sparebuf[4*i+1],sparebuf[4*i+2],sparebuf[4*i+3]);
}

if(ret1 == ECC_LIMIT)
Expand Down
2 changes: 1 addition & 1 deletion drivers/block/sun4i_nand/src/physic/nand_simple_r.c
Expand Up @@ -467,7 +467,7 @@ __s32 _read_single_page(struct boot_physical_param *readop,__u8 dma_wait_mode)
PHY_DBG("[Read_single_page] NFC_ReadRetry %d cycles, chip = %d, block = %d, page = %d, RetryCount = %d \n", k ,readop->chip,readop->block, readop->page, RetryCount[readop->chip]);
if(ret == -ERR_ECC)
PHY_DBG("ecc error!\n");
PHY_DBG("spare buf: %x, %x, %x, %x, %x, %x, %x, %x\n", sparebuf[0],sparebuf[1],sparebuf[2],sparebuf[3],sparebuf[4],sparebuf[5],sparebuf[6],sparebuf[7]);
//PHY_DBG("spare buf: %x, %x, %x, %x, %x, %x, %x, %x\n", sparebuf[0],sparebuf[1],sparebuf[2],sparebuf[3],sparebuf[4],sparebuf[5],sparebuf[6],sparebuf[7]);
}

if(ret == ECC_LIMIT)
Expand Down

0 comments on commit 3211b0b

Please sign in to comment.