From d5f2bee6f1befd4f6af58e11934b087817a2c682 Mon Sep 17 00:00:00 2001 From: Xiangfu Liu Date: Sun, 30 Aug 2009 21:35:46 +0800 Subject: [PATCH] the SDRAM_BW16 shoudl be 1 or 0. make the xburst tools work in jz4720 and jz4725 cpu. --- usbboot/src/cmd.c | 2 -- usbboot/src/ingenic_cfg.c | 4 ++-- usbboot/xburst_stage1/main.c | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/usbboot/src/cmd.c b/usbboot/src/cmd.c index 8e6ccab..e985556 100644 --- a/usbboot/src/cmd.c +++ b/usbboot/src/cmd.c @@ -450,8 +450,6 @@ int nand_program_file(struct nand_in *nand_in, transfer_size = (hand.nand_ppb * hand.nand_ps); else 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; j = flen % transfer_size; diff --git a/usbboot/src/ingenic_cfg.c b/usbboot/src/ingenic_cfg.c index 30716f2..366479a 100644 --- a/usbboot/src/ingenic_cfg.c +++ b/usbboot/src/ingenic_cfg.c @@ -197,9 +197,9 @@ int parse_configure(struct hand *hand, char * file_path) hand->fw_args.cpu_id = 0x4740; if (hand->fw_args.bus_width == 32) - hand->fw_args.bus_width = 0 ; + hand->fw_args.bus_width = 0; else - hand->fw_args.bus_width = 1 ; + hand->fw_args.bus_width = 1; hand->fw_args.bank_num = hand->fw_args.bank_num / 4; hand->fw_args.cpu_speed = hand->fw_args.cpu_speed / hand->fw_args.ext_clk; diff --git a/usbboot/xburst_stage1/main.c b/usbboot/xburst_stage1/main.c index 1d6beff..0e1b735 100644 --- a/usbboot/xburst_stage1/main.c +++ b/usbboot/xburst_stage1/main.c @@ -46,7 +46,7 @@ void test_load_args(void) fw_args->use_uart = 0; UART_BASE = UART0_BASE + fw_args->use_uart * 0x1000; CONFIG_BAUDRATE = 57600; - SDRAM_BW16 = 16; + SDRAM_BW16 = 1; SDRAM_BANK4 = 4; SDRAM_ROW = 13; SDRAM_COL = 9; @@ -72,7 +72,7 @@ void load_args(void) fw_args->use_uart = 0; UART_BASE = UART0_BASE + fw_args->use_uart * 0x1000; CONFIG_BAUDRATE = fw_args->boudrate; - SDRAM_BW16 = fw_args->bus_width == 0 ? 32 : 16; + SDRAM_BW16 = fw_args->bus_width; SDRAM_BANK4 = fw_args->bank_num * 4; SDRAM_ROW = fw_args->row_addr; SDRAM_COL = fw_args->col_addr;