[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux]U-boot hang in function flash_detect_cfi(...), need your help.



Hi Childhood,

On Thu, Nov 12, 2009 at 6:26 PM, Childhood Hwang
<childhood.hwang@xxxxxxxxx> wrote:
> Hello all:
>
> The function  flash_readarray_mode(...) of fs-boot set  an value
> 0xFFFFFFFF, What is it for ?

It's a kind of reset for CFI flash, to ensure it's in so-called "read
array mode" - that is in normal, reading, randomly accessible mode.

It's used to make sure that the flash is in a known state before
trying to read or execute code from it.

> /*!
>  * This routine send a command to the CUI
>  * to put the FLASH into Read Array mode.
>  *
>  * @param  addr - Memory address of FLASH device
>  *
>  * @return  none
>  */
> static void flash_readarray_mode(unsigned long flash_addr)
> {
>
>        /*
>         * We assume it is all CFI FLASH
>         * Write 32-bit to take care off all flash
>         * configurations.
>         */
>        *((volatile unsigned long *)(flash_addr)) = 0xFFFFFFFF;
> }
>
> I am trying to initialize a flash during u-boot phase, but u-boot hang
> in function flash_detect_cfi(...).
> This flash works well when I use it as the flash memory to boot u-boot
> and the kernel.

So if I understand the problem is in u-boot somewhere?

> Should anyone help me about initialization of an flash ?

Normally 'just works' - is there anything non-standard about your
flash connection and interface etc?

John
-- 
John Williams, PhD, B.Eng, B.IT
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com  p: +61-7-30090663  f: +61-7-30090663

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/