Re: [U-Boot] [PATCH] nios2: reset cfi flash before reading env

2011-01-17 Thread Wolfgang Denk
Dear Thomas Chou, In message 4d252aab.6040...@wytron.com.tw you wrote: Instead of making fixed assumptions about flash type and it's properties here you should use generic routines from the CFI driver to do the reset. ... env_init() goes before flash_init() in board.c. So we don't know

Re: [U-Boot] [PATCH] nios2: reset cfi flash before reading env

2011-01-17 Thread Thomas Chou
Dear Wolfgang, On 01/18/2011 05:02 AM, Wolfgang Denk wrote: void __flash_cmd_reset(flash_info_t *info) I recommend you have a second, closer look. Notice that flash_cmd_reset() comes with __attribute__ weak, because it does not work as a general solution - it may work here, but other code

Re: [U-Boot] [PATCH] nios2: reset cfi flash before reading env

2011-01-05 Thread Wolfgang Denk
Dear Thomas Chou, In message 1294211855-18584-1-git-send-email-tho...@wytron.com.tw you wrote: Flash might be in unknown state when u-boot is started with jtag. And got wrong env data. So reset it in board early init. Signed-off-by: Thomas Chou tho...@wytron.com.tw ---

Re: [U-Boot] [PATCH] nios2: reset cfi flash before reading env

2011-01-05 Thread Thomas Chou
On 01/05/2011 04:15 PM, Wolfgang Denk wrote: Instead of making fixed assumptions about flash type and it's properties here you should use generic routines from the CFI driver to do the reset. Dear Wolfgang, env_init() goes before flash_init() in board.c. So we don't know the flash type and

[U-Boot] [PATCH] nios2: reset cfi flash before reading env

2011-01-04 Thread Thomas Chou
Flash might be in unknown state when u-boot is started with jtag. And got wrong env data. So reset it in board early init. Signed-off-by: Thomas Chou tho...@wytron.com.tw --- board/altera/nios2-generic/nios2-generic.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git