1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-22 19:25:20 +02:00

update README, some code cleanup

Signed-off-by: Xiangfu Liu <xiangfu.z@gmail.com>
This commit is contained in:
Xiangfu Liu 2009-08-27 21:48:03 +08:00
parent f8f75cc9f7
commit c5621d6af8
4 changed files with 28 additions and 16 deletions

View File

@ -30,7 +30,7 @@ Build and Installation:
make install make install
*) make install will install the 'usbboot' binary to /usr/bin/usbboot *) make install will install the 'usbboot' binary to /usr/bin/usbboot
and the stage 1 and 2 bootloaders as well as usbboot.cfg configuration and the stage 1 and 2 bootloaders as well as usbboot.cfg configuration
file into /usr/share/xburst-tools file into /etc/xburst-tools
Configuration file: /usr/share/xburst-tools/usbboot.cfg Configuration file: /usr/share/xburst-tools/usbboot.cfg

View File

@ -450,6 +450,9 @@ int nand_program_file(struct nand_in *nand_in,
transfer_size = (hand.nand_ppb * hand.nand_ps); transfer_size = (hand.nand_ppb * hand.nand_ps);
else else
transfer_size = (hand.nand_ppb * (hand.nand_ps + hand.nand_os)); transfer_size = (hand.nand_ppb * (hand.nand_ps + hand.nand_os));
printf("nand_ppb: %d, nand_ps: %d, nand_os: %d\n", hand.nand_ppb,
hand.nand_ps, hand.nand_os);
m = flen / transfer_size; m = flen / transfer_size;
j = flen % transfer_size; j = flen % transfer_size;
printf(" Size to send %d, transfer_size %d\n", flen, transfer_size); printf(" Size to send %d, transfer_size %d\n", flen, transfer_size);

View File

@ -126,11 +126,13 @@ int check_dump_cfg(struct hand *hand)
total_size / 0x100000, 2 * (hand->fw_args.bank_num + 1), total_size / 0x100000, 2 * (hand->fw_args.bank_num + 1),
16 * (2 - hand->fw_args.bus_width)); 16 * (2 - hand->fw_args.bus_width));
printf("Nand page size %d, " printf("Nand page per block %d, "
"Nand page size %d, "
"ECC offset in OOB %d, " "ECC offset in OOB %d, "
"bad block offset in OOB %d, " "bad block offset in OOB %d, "
"bad block page %d, " "bad block page %d, "
"use %d plane mode\n", "use %d plane mode\n",
hand->nand_ppb,
hand->nand_ps, hand->nand_ps,
hand->nand_eccpos, hand->nand_eccpos,
hand->nand_bbpos, hand->nand_bbpos,

View File

@ -315,14 +315,21 @@ void Borad_Init()
nand_init_4740(Hand.nand_bw,Hand.nand_rc,Hand.nand_ps,Hand.nand_ppb, nand_init_4740(Hand.nand_bw,Hand.nand_rc,Hand.nand_ps,Hand.nand_ppb,
Hand.nand_bbpage,Hand.nand_bbpos,Hand.nand_force_erase,Hand.nand_eccpos); Hand.nand_bbpage,Hand.nand_bbpos,Hand.nand_force_erase,Hand.nand_eccpos);
nand_program=nand_program_4740; dprintf("\nnand_ps, nand_ppb, nand_bbpage, nand_bbpos, nand_eccpos\n");
nand_erase =nand_erase_4740; serial_put_hex(Hand.nand_ps);
nand_read =nand_read_4740; serial_put_hex(Hand.nand_ppb);
nand_read_oob=nand_read_oob_4740; serial_put_hex(Hand.nand_bbpage);
nand_read_raw=nand_read_raw_4740; serial_put_hex(Hand.nand_bbpos);
serial_put_hex(Hand.nand_eccpos);
nand_program = nand_program_4740;
nand_erase = nand_erase_4740;
nand_read = nand_read_4740;
nand_read_oob = nand_read_oob_4740;
nand_read_raw = nand_read_raw_4740;
nand_query = nand_query_4740; nand_query = nand_query_4740;
nand_enable = nand_enable_4740; nand_enable = nand_enable_4740;
nand_disable= nand_disable_4740; nand_disable = nand_disable_4740;
nand_mark_bad = nand_mark_bad_4740; nand_mark_bad = nand_mark_bad_4740;
break; break;
case 0x4750: case 0x4750:
@ -331,14 +338,14 @@ void Borad_Init()
Hand.nand_ppb, Hand.nand_bchbit, Hand.nand_eccpos, Hand.nand_ppb, Hand.nand_bchbit, Hand.nand_eccpos,
Hand.nand_bbpos, Hand.nand_bbpage, Hand.nand_force_erase); Hand.nand_bbpos, Hand.nand_bbpage, Hand.nand_force_erase);
nand_program=nand_program_4750; nand_program = nand_program_4750;
nand_erase =nand_erase_4750; nand_erase = nand_erase_4750;
nand_read =nand_read_4750; nand_read = nand_read_4750;
nand_read_oob=nand_read_oob_4750; nand_read_oob = nand_read_oob_4750;
nand_read_raw=nand_read_raw_4750; nand_read_raw = nand_read_raw_4750;
nand_query = nand_query_4750; nand_query = nand_query_4750;
nand_enable = nand_enable_4750; nand_enable = nand_enable_4750;
nand_disable= nand_disable_4750; nand_disable = nand_disable_4750;
nand_mark_bad = nand_mark_bad_4750; nand_mark_bad = nand_mark_bad_4750;
break; break;
default: default: