mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-22 13:41:32 +02:00
code style cleanup
This commit is contained in:
parent
b65e32150d
commit
ad2afb0cdd
@ -68,14 +68,11 @@ static volatile unsigned char *cmdport = (volatile unsigned char *)0xb8008000;
|
||||
|
||||
static int bus = 8, row = 2, pagesize = 2048, oobsize = 64, ppb = 128;
|
||||
static int bad_block_pos,bad_block_page,force_erase,ecc_pos,wp_pin;
|
||||
extern struct hand Hand;
|
||||
static u8 oob_buf[256] = {0};
|
||||
extern struct hand Hand;
|
||||
extern u16 handshake_PKT[4];
|
||||
|
||||
#define dprintf(x) serial_puts(x)
|
||||
|
||||
static unsigned int EMC_CSN[4]=
|
||||
{
|
||||
static unsigned int EMC_CSN[4] = {
|
||||
0xb8000000,
|
||||
0xb4000000,
|
||||
0xa8000000,
|
||||
@ -165,8 +162,7 @@ int nand_init_4740(int bus_width, int row_cycle, int page_size, int page_per_blo
|
||||
wp_pin = Hand.nand_wppin;
|
||||
|
||||
/* Initialize NAND Flash Pins */
|
||||
if (wp_pin)
|
||||
{
|
||||
if (wp_pin) {
|
||||
__gpio_as_output(wp_pin);
|
||||
__gpio_disable_pull(wp_pin);
|
||||
}
|
||||
@ -299,8 +295,7 @@ u32 nand_read_raw_4740(void *buf, u32 startpage, u32 pagecount, int option)
|
||||
read_proc(tmpbuf, pagesize);
|
||||
|
||||
tmpbuf += pagesize;
|
||||
if (option != NO_OOB)
|
||||
{
|
||||
if (option != NO_OOB) {
|
||||
read_oob(tmpbuf, oobsize, cur_page);
|
||||
tmpbuf += oobsize;
|
||||
}
|
||||
@ -319,11 +314,12 @@ u32 nand_erase_4740(int blk_num, int sblk, int force)
|
||||
|
||||
if (wp_pin)
|
||||
__gpio_set_pin(wp_pin);
|
||||
|
||||
cur = sblk * ppb;
|
||||
for (i = 0; i < blk_num; ) {
|
||||
rowaddr = cur;
|
||||
select_chip(cur / ppb);
|
||||
if ( !force ) {
|
||||
if (!force) {
|
||||
if (nand_check_block(cur/ppb)) {
|
||||
cur += ppb;
|
||||
blk_num += Hand.nand_plane;
|
||||
|
Loading…
Reference in New Issue
Block a user