Gary Thomas | 1 Sep 2006 13:03
Favicon

Re: problem with flash_am29xxxxx.inl

miguelon <at> tiscali.it wrote:
> Hi,
> I'm working on a TaskIt Portux920T which mount an AMD/Spansion 
> S29GL128M Flash memory. I've already obtained the right patch for this 
> device (thanks Sato) but it still doesn't work. Therefore I had a look 
> at the driver code and I discovered that the device id is not 
> recognized because the driver reads from a wrong address.  Actually the 
> problem is when the driver calls the FLASH_P2V macro:
> 
> f_s1 = FLASH_P2V(ROM+FLASH_Setup_Addr1);
> 
> First thing, when I see FLASH_P2V I think about something which change 
> the physical address to a virtual address but actually the macro just 
> does a double casting. Am I right or I miss something?
> Second thing, in my case ROM is a pointer to 0x60000000 (the virtual 
> address of the FLASH) and FLASH_Setup_Addr1 is  555 but if I print f_s1 
> I obtain 0x60001554. The last bits are shifted by 2 but I need only a 
> shift by one because in my case the A0 of the micro is connected to the 
> A1 of the flash. I don't have clear how this shift is performed, maybe 
> I'm missing something in the FLASH_P2V macro. Can someone help me?
> Thanks

The layout of the device is described by some #define statements in your
xxx_flash.c file.  Look at this and how those definitions affect how
addresses within the FLASH are computed.

BTW, your device is connected in a non-standard fashion, so you may
have to modify how the macros work to get it to function properly.

--

-- 
(Continue reading)


Gmane