From 1675108f82802e016a9f68fe03cff074c6843f27 Mon Sep 17 00:00:00 2001 From: xiangfu Date: Mon, 27 Apr 2009 09:37:05 +0000 Subject: [PATCH] init the cpu_id --- flash-tool/main.c | 4 ++++ flash-tool/usb.c | 2 +- flash-tool/usb_boot.cfg | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/flash-tool/main.c b/flash-tool/main.c index 0c6f9a1..8c88aac 100644 --- a/flash-tool/main.c +++ b/flash-tool/main.c @@ -67,6 +67,8 @@ static int parse_configure(char * file_path) return -1; cfg_free(cfg); + fw_args.cpu_id = 0x4740; + total_size = (unsigned int)(2 << (fw_args.row_addr + fw_args.col_addr - 1)) * 2 * (fw_args.bank_num + 1) * 2 * (2 - fw_args.bus_width); @@ -147,6 +149,7 @@ int main(int argc, char **argv) goto out; /* now we upload the usb boot stage1 */ + printf("upload usb boot stage1\n"); if (load_file(&ingenic_dev, STAGE1_FILE_PATH) < 1) goto out; @@ -155,6 +158,7 @@ int main(int argc, char **argv) #if 0 /* now we upload the usb boot stage2 */ sleep(1); + printf("upload usb boot stage2\n"); if (load_file(&ingenic_dev, STAGE2_FILE_PATH) < 1) goto cleanup; diff --git a/flash-tool/usb.c b/flash-tool/usb.c index bda1832..6268881 100644 --- a/flash-tool/usb.c +++ b/flash-tool/usb.c @@ -235,7 +235,7 @@ int usb_ingenic_upload(struct ingenic_dev *ingenic_dev, int stage) return -1; } - if (stage != 1) { + if (stage == 2) { usb_get_ingenic_cpu(ingenic_dev); usb_ingenic_flush_cache(ingenic_dev); } diff --git a/flash-tool/usb_boot.cfg b/flash-tool/usb_boot.cfg index 74ec7f9..694169d 100644 --- a/flash-tool/usb_boot.cfg +++ b/flash-tool/usb_boot.cfg @@ -33,6 +33,7 @@ ROWADDR = 13 #Row address width in bits (11-13) COLADDR = 9 #Column address width in bits (8-12) ISMOBILE = 0 #Define whether SDRAM is mobile SDRAM, this only valid for Jz4750 ,1:yes 0:no ISBUSSHARE = 1 #Define whether SDRAM bus share with NAND 1:shared 0:unshared +DEBUGOPS = 0 # [NAND] # BUSWIDTH = 8 #The width of the NAND flash chip in bits (8|16|32)