[U-Boot] about ## Unknown FLASH on Bank 0

Wolfgang Denk wd at denx.de
Thu Nov 26 08:07:33 CET 2009


Dear Peter Pan,

In message <48abf2c20911251756k1ca3fe19p26db4a65b68bc366 at mail.gmail.com> you wrote:
> 
> I have checked this problem again, and find out the reason why sometimes
> we get a false value of the ID0 we read from norflash.
> 
> When we read IDs from norflash, we first write the read id command:
> 
> AMD_SEND_CMD(baseaddr, ACMD_READMODE);
> AMD_SEND_CMD((baseaddr | LATCH_OFFSET1), ACMD_UNLOCK1);
> AMD_SEND_CMD((baseaddr | LATCH_OFFSET2), ACMD_UNLOCK2);
> AMD_SEND_CMD((baseaddr | LATCH_OFFSET1), ACMD_ID);
> 
> then we read the IDs from norflash:
> pAddr = (unsigned short *)(baseaddr & 0xFFFFFF00); //Manufacture Id
> code0 = *(pAddr);   //cycle 4: Addr: X00    data = 0x01
> pAddr = (unsigned short *)(baseaddr + DEVICE_CODE1_OFFSET_2X16);
> code1 = *pAddr;     //cycle 4: Addr: X01, X - don't care. data = 0x227E
> pAddr = (unsigned short *)(baseaddr + DEVICE_CODE2_OFFSET_2X16);
> code2 = *pAddr;     //cycle 5: Addr: X0E    data = 0x2223
> pAddr = (unsigned short *)(baseaddr + DEVICE_CODE3_OFFSET_2X16);
> code3 = *(pAddr);   //cycle 6: Addr: X0F    data = 0x2201
> AMD_SEND_CMD(baseaddr, ACMD_READMODE);

Umm.. could you please point out which specific part of code (i. e .
file name and line numbers, or snippet of the real code from the
source file) you are talking about here?

I have problems following you, as for example I can find no such thing
as AMD_SEND_CMD or ACMD_READMODE or LATCH_OFFSET anywhere in the whole
source tree ?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You could end up being oddly sad and full of a strange, diffuse  com-
passion  which would lead you to believe that it might be a good idea
to wipe out the whole human race and start again with amoebas.
                                 - Terry Pratchett, _Guards! Guards!_


More information about the U-Boot mailing list