[U-Boot] [U-BOOT] nand merge problem
Scott Wood
scottwood at freescale.com
Wed May 27 16:34:26 CEST 2009
xiangfu_gmail wrote:
> static void jz_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
> {
> struct nand_chip *this = (struct nand_chip *)(mtd->priv);
>
> if (ctrl & NAND_CTRL_CHANGE) {
> if (ctrl & NAND_NCE)
> REG_EMC_NFCSR |= EMC_NFCSR_NFCE1;
> else
> REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE1;
>
> if (ctrl & NAND_CLE)
> this->IO_ADDR_W = (void __iomem *)
> ((unsigned long)(this->IO_ADDR_W) | 0x00008000);
> else
> this->IO_ADDR_W = (void __iomem *)
> ((unsigned long)(this->IO_ADDR_W) & ~0x00008000);
>
> if (ctrl & NAND_ALE)
> this->IO_ADDR_W = (void __iomem *)
> ((unsigned long)(this->IO_ADDR_W) | 0x00010000);
> else
> this->IO_ADDR_W = (void __iomem *)
> ((unsigned long)(this->IO_ADDR_W) & ~0x00010000);
>
> }
> }
Nowhere in this function do you issue the command... See
cpu/ppc4xx/ndfc.c for a simple hwcontrol function.
-Scott
More information about the U-Boot
mailing list