This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

question on amd flash driver of redboot


Dear All,
	Hello.
	I have a question on flash_am28xxxxx.inl for redboot. 
	I am confused by the macro CYGNUM_FLASH_16AS8. It seems that if
the flash works in word mode and I want to operate it as byte, I should
NOT define the macro.
	My situation is as following:
	My flash chip is AM29LV320D. The BYTE pin is pull up to logic 1,
so it can only work in word mode. In word mode A20:A0 of the flash chip
are used as address pins while A20:A-1 in byte mode. A20:A0 are respectively
connected to the EBI address pins of CPU EBI_A21:EBI_A1. In this
situation, should I define the macro CYGNUM_FLASH_16AS8? I think I
should. Here is the code:

#ifndef CYGNUM_FLASH_16AS8
#define _16AS8 0
#else
#define _16AS8 CYGNUM_FLASH_16AS8
#endif

#if (_16AS8 == 0)
# define FLASH_Setup_Addr1              (0x555)
# define FLASH_Setup_Addr2              (0x2AA)
......
#else
# define FLASH_Setup_Addr1              (0xAAA)
# define FLASH_Setup_Addr2              (0x555)
......
	If I want to write a command to the chip address 0x555(A20:A0),
I would tell CPU to write the command to 0xAAA(EBI_A21:EBI_A0). Because
EBI_A1 maps to A0, EBI_A2 maps to A1 and so on. So I think I should
define the macro according to the code above. But if I do so, redboot
does not work. And if I don't define the macro, redboot will work
happily.
	So where may the problem be? Any helps are appreciated. Thank
you.
	
Best Regards,
-- 
kneep <caozhiyuan@hotmail.com>



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]