public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] NAND flash support
@ 2006-08-01 17:29 mitsy
  0 siblings, 0 replies; 7+ messages in thread
From: mitsy @ 2006-08-01 17:29 UTC (permalink / raw)
  To: u-boot

Hi,

I've been trying to add NAND flash support to my u-boot but having
issues. I'd really appreciate if anyone could give me any
suggestions/comments on what I'm doing wrong.

The board I have is based on AMD au1550, and it has one NOR flash and
one NAND flash. NAND flash is configured in lowlevel_init.S correctly
(I believe so since it works from Linux kernel.) However, when I try
to send any command to NAND flash, it just hangs there. Here are the
command macros I have:

#define NAND_WAIT_READY(nand)   while (!(*(volatile u8
*)((ulong)MEM_STSTAT) & 0x01))
#define WRITE_NAND_COMMAND(d, adr) do { printf("weee!"); *(volatile u8
*)((ulong)adr+MEM_STNAND_CMD) = d; __asm__ volatile ("sync"); }
while(0)
#define WRITE_NAND_ADDRESS(d, adr) do {*(volatile u8
*)((ulong)adr+MEM_STNAND_ADDR) = d; __asm__ volatile ("sync");}
while(0)
#define WRITE_NAND(d, adr)      do {*(volatile u8
*)((ulong)adr+MEM_STNAND_DATA) = d; __asm__ volatile ("sync");}
while(0)
#define READ_NAND(adr)          (*(volatile u8 *)((ulong)adr+MEM_STNAND_DATA))
#define NAND_DISABLE_CE(nand)   do { *(volatile u8 *)(MEM_STNDCTL) =
0; __asm__ volatile ("sync");} while(0)
#define NAND_ENABLE_CE(nand)    do { *(volatile u8 *)(MEM_STNDCTL) =
(1<<5); __asm__ volatile ("sync");} while(0)

These are empty since the processor handles them.

#define NAND_CTL_CLRALE
#define NAND_CTL_SETALE
#define NAND_CTL_CLRCLE
#define NAND_CTL_SETCLE

Thank you for your help in advance!

Mitsy

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-08-01 17:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20051028135742.8BAD11606F@sc8-sf-spam2.sourceforge.net>
2005-10-31  8:47 ` [U-Boot-Users] NAND flash support Terence Soh
2005-10-31  9:23   ` Wolfgang Denk
2005-11-01  7:46     ` Mike Rapoport
2005-11-01 12:06       ` Ladislav Michl
2005-11-01 14:22         ` Mike Rapoport
2005-11-02 13:18           ` Ladislav Michl
2006-08-01 17:29 mitsy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox