
7 May
2009
7 May
'09
1:28 a.m.
On Wednesday 06 May 2009 16:51:18 Wolfgang Denk wrote:
In Mike Frysinger wrote:
--- /dev/null +++ b/drivers/mtd/nand/nand_plat.c @@ -0,0 +1,53 @@ +/*
- Genericish driver for memory mapped NAND devices
Genericish ?
i tried to make it generic. i dont know if i accomplished that :).
+#define NAND_PLAT_WRITE_CMD(cmd, chip) BFIN_NAND_WRITE(BFIN_NAND_CLE(chip), cmd) +#define NAND_PLAT_WRITE_ADR(cmd, chip) BFIN_NAND_WRITE(BFIN_NAND_ALE(chip), cmd) +#define NAND_PLAT_DEV_READY(chip) ((*pPORTFIO & BFIN_NAND_READY) ? 1 : 0) +#define NAND_PLAT_INIT() \
- do { \
*pPORTF_FER &= ~BFIN_NAND_READY; \
*pPORTFIO_DIR &= ~BFIN_NAND_READY; \
*pPORTFIO_INEN |= BFIN_NAND_READY; \
- } while (0)
Please use I/O accessors instead of pointers.
OK -mike