1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-01 12:28:06 +02:00

code style cleanup

This commit is contained in:
Xiangfu Liu 2010-05-24 11:24:13 +08:00
parent b65e32150d
commit ad2afb0cdd

View File

@ -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 bus = 8, row = 2, pagesize = 2048, oobsize = 64, ppb = 128;
static int bad_block_pos,bad_block_page,force_erase,ecc_pos,wp_pin; static int bad_block_pos,bad_block_page,force_erase,ecc_pos,wp_pin;
extern struct hand Hand;
static u8 oob_buf[256] = {0}; static u8 oob_buf[256] = {0};
extern struct hand Hand;
extern u16 handshake_PKT[4]; extern u16 handshake_PKT[4];
#define dprintf(x) serial_puts(x) static unsigned int EMC_CSN[4] = {
static unsigned int EMC_CSN[4]=
{
0xb8000000, 0xb8000000,
0xb4000000, 0xb4000000,
0xa8000000, 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; wp_pin = Hand.nand_wppin;
/* Initialize NAND Flash Pins */ /* Initialize NAND Flash Pins */
if (wp_pin) if (wp_pin) {
{
__gpio_as_output(wp_pin); __gpio_as_output(wp_pin);
__gpio_disable_pull(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); read_proc(tmpbuf, pagesize);
tmpbuf += pagesize; tmpbuf += pagesize;
if (option != NO_OOB) if (option != NO_OOB) {
{
read_oob(tmpbuf, oobsize, cur_page); read_oob(tmpbuf, oobsize, cur_page);
tmpbuf += oobsize; tmpbuf += oobsize;
} }
@ -319,6 +314,7 @@ u32 nand_erase_4740(int blk_num, int sblk, int force)
if (wp_pin) if (wp_pin)
__gpio_set_pin(wp_pin); __gpio_set_pin(wp_pin);
cur = sblk * ppb; cur = sblk * ppb;
for (i = 0; i < blk_num; ) { for (i = 0; i < blk_num; ) {
rowaddr = cur; rowaddr = cur;