mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-29 14:02:49 +02:00
fix read BOUDRATE not correct
This commit is contained in:
parent
3a05ed7a21
commit
fe296d5f0b
@ -749,10 +749,10 @@ int debug_memory(int obj, unsigned int start, unsigned int size)
|
|||||||
usleep(100);
|
usleep(100);
|
||||||
usb_read_data_from_ingenic(&ingenic_dev, buffer, 8);
|
usb_read_data_from_ingenic(&ingenic_dev, buffer, 8);
|
||||||
if (buffer[0] != 0)
|
if (buffer[0] != 0)
|
||||||
printf("\n Test memory fail! Last error address is %x !\n",
|
printf("\n Test memory fail! Last error address is %x !",
|
||||||
buffer[0]);
|
buffer[0]);
|
||||||
else
|
else
|
||||||
printf("\n Test memory pass!\n");
|
printf("\n Test memory pass!");
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ int handle_nerase(void)
|
|||||||
printf("\n 1:start block number"
|
printf("\n 1:start block number"
|
||||||
"\n 2:block length"
|
"\n 2:block length"
|
||||||
"\n 3:device index number"
|
"\n 3:device index number"
|
||||||
"\n 4:flash chip index number\n");
|
"\n 4:flash chip index number");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ int handle_nmark(void)
|
|||||||
printf(" nerase (1) (2) (3) ");
|
printf(" nerase (1) (2) (3) ");
|
||||||
printf("\n 1:bad block number"
|
printf("\n 1:bad block number"
|
||||||
"\n 2:device index number"
|
"\n 2:device index number"
|
||||||
"\n 3:flash chip index number\n");
|
"\n 3:flash chip index number");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
init_nand_in();
|
init_nand_in();
|
||||||
@ -171,7 +171,7 @@ int handle_memtest(void)
|
|||||||
printf(" memtest (1) [2] [3] ");
|
printf(" memtest (1) [2] [3] ");
|
||||||
printf("\n 1:device index number"
|
printf("\n 1:device index number"
|
||||||
"\n 2:SDRAM start address"
|
"\n 2:SDRAM start address"
|
||||||
"\n 3:test size\n");
|
"\n 3:test size");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,7 +197,7 @@ int handle_gpio(int mode)
|
|||||||
printf("\n Usage:"
|
printf("\n Usage:"
|
||||||
" gpios (1) (2) "
|
" gpios (1) (2) "
|
||||||
"\n 1:GPIO pin number"
|
"\n 1:GPIO pin number"
|
||||||
"\n 2:device index number\n");
|
"\n 2:device index number");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,37 +141,37 @@ int parse_configure(struct hand *hand, char * file_path)
|
|||||||
hand_init_def(hand);
|
hand_init_def(hand);
|
||||||
|
|
||||||
cfg_opt_t opts[] = {
|
cfg_opt_t opts[] = {
|
||||||
CFG_INT("EXTCLK", &hand->fw_args.ext_clk, CFGF_NONE),
|
CFG_INT("BOUDRATE", 57600, CFGF_NONE),
|
||||||
CFG_INT("CPUSPEED", &hand->fw_args.cpu_speed, CFGF_NONE),
|
CFG_SIMPLE_INT("EXTCLK", &hand->fw_args.ext_clk),
|
||||||
CFG_INT("PHMDIV", &hand->fw_args.phm_div, CFGF_NONE),
|
CFG_SIMPLE_INT("CPUSPEED", &hand->fw_args.cpu_speed),
|
||||||
CFG_INT("BOUDRATE", &hand->fw_args.boudrate, CFGF_NONE),
|
CFG_SIMPLE_INT("PHMDIV", &hand->fw_args.phm_div),
|
||||||
CFG_INT("USEUART", &hand->fw_args.use_uart, CFGF_NONE),
|
CFG_SIMPLE_INT("USEUART", &hand->fw_args.use_uart),
|
||||||
|
|
||||||
CFG_INT("BUSWIDTH", &hand->fw_args.bus_width, CFGF_NONE),
|
CFG_SIMPLE_INT("BUSWIDTH", &hand->fw_args.bus_width),
|
||||||
CFG_INT("BANKS", &hand->fw_args.bank_num, CFGF_NONE),
|
CFG_SIMPLE_INT("BANKS", &hand->fw_args.bank_num),
|
||||||
CFG_INT("ROWADDR", &hand->fw_args.row_addr, CFGF_NONE),
|
CFG_SIMPLE_INT("ROWADDR", &hand->fw_args.row_addr),
|
||||||
CFG_INT("COLADDR", &hand->fw_args.col_addr, CFGF_NONE),
|
CFG_SIMPLE_INT("COLADDR", &hand->fw_args.col_addr),
|
||||||
|
|
||||||
CFG_INT("ISMOBILE", &hand->fw_args.is_mobile, CFGF_NONE),
|
CFG_SIMPLE_INT("ISMOBILE", &hand->fw_args.is_mobile),
|
||||||
CFG_INT("ISBUSSHARE", &hand->fw_args.is_busshare, CFGF_NONE),
|
CFG_SIMPLE_INT("ISBUSSHARE", &hand->fw_args.is_busshare),
|
||||||
CFG_INT("DEBUGOPS", &hand->fw_args.debug_ops, CFGF_NONE),
|
CFG_SIMPLE_INT("DEBUGOPS", &hand->fw_args.debug_ops),
|
||||||
CFG_INT("PINNUM", &hand->fw_args.pin_num, CFGF_NONE),
|
CFG_SIMPLE_INT("PINNUM", &hand->fw_args.pin_num),
|
||||||
CFG_INT("START", &hand->fw_args.start, CFGF_NONE),
|
CFG_SIMPLE_INT("START", &hand->fw_args.start),
|
||||||
CFG_INT("SIZE", &hand->fw_args.size, CFGF_NONE),
|
CFG_SIMPLE_INT("SIZE", &hand->fw_args.size),
|
||||||
|
|
||||||
CFG_INT("NAND_BUSWIDTH", &hand->nand_bw, CFGF_NONE),
|
CFG_SIMPLE_INT("NAND_BUSWIDTH", &hand->nand_bw),
|
||||||
CFG_INT("NAND_ROWCYCLES", &hand->nand_rc, CFGF_NONE),
|
CFG_SIMPLE_INT("NAND_ROWCYCLES", &hand->nand_rc),
|
||||||
CFG_INT("NAND_PAGESIZE", &hand->nand_ps, CFGF_NONE),
|
CFG_SIMPLE_INT("NAND_PAGESIZE", &hand->nand_ps),
|
||||||
CFG_INT("NAND_PAGEPERBLOCK", &hand->nand_ppb, CFGF_NONE),
|
CFG_SIMPLE_INT("NAND_PAGEPERBLOCK", &hand->nand_ppb),
|
||||||
CFG_INT("NAND_FORCEERASE", &hand->nand_force_erase, CFGF_NONE),
|
CFG_SIMPLE_INT("NAND_FORCEERASE", &hand->nand_force_erase),
|
||||||
CFG_INT("NAND_OOBSIZE", &hand->nand_os, CFGF_NONE),
|
CFG_SIMPLE_INT("NAND_OOBSIZE", &hand->nand_os),
|
||||||
CFG_INT("NAND_ECCPOS", &hand->nand_eccpos, CFGF_NONE),
|
CFG_SIMPLE_INT("NAND_ECCPOS", &hand->nand_eccpos),
|
||||||
CFG_INT("NAND_BADBLOCKPOS", &hand->nand_bbpos, CFGF_NONE),
|
CFG_SIMPLE_INT("NAND_BADBLOCKPOS", &hand->nand_bbpos),
|
||||||
CFG_INT("NAND_BADBLOCKPAGE", &hand->nand_bbpage, CFGF_NONE),
|
CFG_SIMPLE_INT("NAND_BADBLOCKPAGE", &hand->nand_bbpage),
|
||||||
CFG_INT("NAND_PLANENUM", &hand->nand_plane, CFGF_NONE),
|
CFG_SIMPLE_INT("NAND_PLANENUM", &hand->nand_plane),
|
||||||
CFG_INT("NAND_BCHBIT", &hand->nand_bchbit, CFGF_NONE),
|
CFG_SIMPLE_INT("NAND_BCHBIT", &hand->nand_bchbit),
|
||||||
CFG_INT("NAND_WPPIN", &hand->nand_wppin, CFGF_NONE),
|
CFG_SIMPLE_INT("NAND_WPPIN", &hand->nand_wppin),
|
||||||
CFG_INT("NAND_BLOCKPERCHIP", &hand->nand_bpc, CFGF_NONE),
|
CFG_SIMPLE_INT("NAND_BLOCKPERCHIP", &hand->nand_bpc),
|
||||||
|
|
||||||
CFG_END()
|
CFG_END()
|
||||||
};
|
};
|
||||||
@ -181,6 +181,7 @@ int parse_configure(struct hand *hand, char * file_path)
|
|||||||
if (cfg_parse(cfg, file_path) == CFG_PARSE_ERROR)
|
if (cfg_parse(cfg, file_path) == CFG_PARSE_ERROR)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
hand->fw_args.boudrate = cfg_getint(cfg, "BOUDRATE");
|
||||||
cfg_free(cfg);
|
cfg_free(cfg);
|
||||||
|
|
||||||
hand->fw_args.cpu_id = 0x4740;
|
hand->fw_args.cpu_id = 0x4740;
|
||||||
|
@ -95,7 +95,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
printf("inflash :> ");
|
printf("\ninflash :> ");
|
||||||
cptr = fgets(com_buf, 256, stdin);
|
cptr = fgets(com_buf, 256, stdin);
|
||||||
if (cptr == NULL)
|
if (cptr == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user