From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 18 Nov 2009 12:18:47 -0600 Subject: [U-Boot] [PATCH] OMAP3EVM: Added NAND support In-Reply-To: <782515bb0911181007v66e4bc01wbb93f4d26e2f815b@mail.gmail.com> References: <1258527494-14330-1-git-send-email-hvaibhav@ti.com> <782515bb0911181007v66e4bc01wbb93f4d26e2f815b@mail.gmail.com> Message-ID: <4B043A87.5040509@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Nishanth Menon wrote: >> + >> +#define WRITE_NAND_COMMAND(d, adr)\ >> + writel(d, &nand_cs_base->nand_cmd) > writel? i thought u had 16 bit nand device. > >> +#define WRITE_NAND_ADDRESS(d, adr)\ >> + writel(d, &nand_cs_base->nand_adr) >> +#define WRITE_NAND(d, adr) writew(d, &nand_cs_base->nand_dat) >> +#define READ_NAND(adr) readl(&nand_cs_base->nand_dat) > readl?? should'nt you be using readw? > > Why these functions? does'nt mtd layer handle this? look at beagle -> > it does not use that.. > >> + >> +/* Other NAND Access APIs */ >> +#define NAND_WP_OFF() do {readl(&gpmc_cfg_base->config) |= GPMC_CONFIG_WP; } \ >> + while (0) >> +#define NAND_WP_ON() do {readl(&gpmc_cfg_base->config) &= ~GPMC_CONFIG_WP; } \ >> + while (0) >> +#define NAND_DISABLE_CE(nand) >> +#define NAND_ENABLE_CE(nand) >> +#define NAND_WAIT_READY(nand) udelay(10) >> + > are these really needed? No, they're not needed. That is the legacy NAND interface that has been superseded and removed. -Scott