chdrv_config_params.c中的宏定义要改为16M的.
board_init_r()中对BROI ROM的配置寄存器设置代码,改为16M flash.
flash_init()是cfi_flash.c中的,被注释掉了,直接改为设定为8Mflash.肯定需要改,要用sf_probe()?.
182 init_fnc_t *init_sequence[] = {
183 board_early_init_f,
184 timer_init,
185 env_init, /* initialize environment */
186 #ifdef CONFIG_INCA_IP
187 incaip_set_cpuclk, /* set cpu clock according to environment variable */
188 #endif
189 init_baudrate, /* initialze baudrate settings */
190 serial_init, /* serial communications setup */
191 console_init_f,
192 display_banner, /* say that we are here */
193 checkboard,
194 init_func_ram,
195 NULL,
196 };
in lowlevel_init.S, modify the alternate register to fit s-flash.
/* Alternate0 set USB, UART0 */
REGWR t0 0x0028 0x20780
order:
in start.S,
lowlevel_init
board_init_f
relocate_code:
in_ram:
board_init_r
emma3slx.h set up the SDRAM size
121 //#define CONFIG_SYS_SDRAM_SIZE (128 << 20)
122 #define CONFIG_SYS_SDRAM_SIZE (256 << 20)
123
124 #define CONFIG_SYS_UBOOT_SDRAM_SIZE 0x10000000
125 //#define CONFIG_SYS_UBOOT_SDRAM_SIZE 0x8000000
v2 p-flash的ddr initialization没有改成256M,也跑起来了?
how to use the flash driver to write the s-flash of 16M? confused.
CHDRV_FLASH_Erase()都是相对于handle指定的块的offset.
write_serial_flash() write one sector.
erase_serial_flash() erase 4kb sector.
板子坏了?换块16M的板子?
找一个loader试试能启动不?
change one write project, it is ok.
/* set the Network setup for ref board */
459 {
460 #define emmaZPIO_ZPIO_DIR2 *((ulong *)0xb0110d38)
461 #define emmaZPIO_ZPIO_DATA2 *((ulong *)0xb0110d08)
462 #define emmaZPIO_ZPIO_INT_ST2 *((ulong *)0xb0110d50)
463 #define emmaZPIO_ZPIO_MASK2 *((ulong *)0xb0110d68)
464 #define ZPIO_PIN_SET_BIT 0x00000200
465
466 /* net */
467 /* gpio enable */
468 emmaZPIO_ZPIO_INT_ST2 &= ~ZPIO_PIN_SET_BIT;
469 emmaZPIO_ZPIO_MASK2 &= ~ZPIO_PIN_SET_BIT;
470 /* set dir */
471 emmaZPIO_ZPIO_DIR2 |= ZPIO_PIN_SET_BIT;
472 /* low */
473 emmaZPIO_ZPIO_DATA2 &= ~ZPIO_PIN_SET_BIT;
474
475 sleep_seconds(0xffffffff);
476 sleep_seconds(0xffffffff);
477 /* high */
478 emmaZPIO_ZPIO_DATA2 |= ZPIO_PIN_SET_BIT;
479 sleep_seconds(0xffffffff);
480 sleep_seconds(0xffffffff);
481
482 }
S25FL129P
64kb/ sector
128M=?block*?sector*64kb*256b/page
能启动了,完成tftp的功能应该没有问题.但是保存环境变量到flash,不行.
还是先调8M flash的吧.