void nand_init(void) { int i; unsigned int size = 0; for (i = 0; i < CFG_MAX_NAND_DEVICE; i++) { nand_init_chip(&nand_info[i], &nand_chip[i], base_address[i]); size += nand_info[i].size; if (nand_curr_device == -1) nand_curr_device = i; } printf("%lu MB ", size / (1024 * 1024)); #if defined(CFG_NAND_FLASH_BBT) printf("(Flash Based BBT Enabled)"); #endif printf("\n"); #ifdef CFG_NAND_SELECT_DEVICE /* * Select the chip in the board/cpu specific driver */ board_nand_select_device(nand_info[nand_curr_device].priv, nand_curr_device); #endif }
void nand_init(void) { int i; unsigned int size = 0; for (i = 0; i < CFG_MAX_NAND_DEVICE; i++) { nand_init_chip(&nand_info[i], &nand_chip[i], base_address[i]); size += nand_info[i].size; if (nand_curr_device == -1) nand_curr_device = i; } // printf("%lu MiB\n", size / (1024 * 1024)); //HJ #ifdef CFG_NAND_SELECT_DEVICE /* * Select the chip in the board/cpu specific driver */ board_nand_select_device(nand_info[nand_curr_device].priv, nand_curr_device); #endif }
void nand_init(void) { int i; unsigned int size = 0; for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++) { //CONFIG_SYS_MAX_NAND_DEVICE == 1 nand_init_chip(&nand_info[i], &nand_chip[i], base_address[i]); size += nand_info[i].size / 1024; if (nand_curr_device == -1) nand_curr_device = i; } printf("%u MiB\n", size / 1024); printf("zhaodehaoxinku\n"); #ifdef CONFIG_SYS_NAND_SELECT_DEVICE /* * Select the chip in the board/cpu specific driver */ board_nand_select_device(nand_info[nand_curr_device].priv, nand_curr_device); #endif }
void nand_init(void) { #ifdef CONFIG_SYS_NAND_SELF_INIT board_nand_init(); #else int i; for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++) nand_init_chip(i); #endif printf("%lu MiB\n", total_nand_size / 1024); #ifdef CONFIG_SYS_NAND_SELECT_DEVICE /* * Select the chip in the board/cpu specific driver */ board_nand_select_device(nand_info[nand_curr_device].priv, nand_curr_device); #endif }
void nand_init(void) { int i; unsigned int size = 0; for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++) { nand_init_chip(&nand_info[i], &nand_chip[i], base_address[i]); size += nand_info[i].size / 1024; if (nand_curr_device == -1) nand_curr_device = i; } #if defined(MV_NAND_GANG_MODE) printf("%u MiB - Gang\n", size / 1024); #else printf("%u MiB\n", size / 1024); #endif #ifdef CONFIG_SYS_NAND_SELECT_DEVICE /* * Select the chip in the board/cpu specific driver */ board_nand_select_device(nand_info[nand_curr_device].priv, nand_curr_device); #endif }