On Mon, Aug 04, 2008 at 02:46:15PM +0200, Guennadi Liakhovetski wrote:
> +#ifdef CONFIG_NAND_SPL
> +static u_char nand_read_byte(struct mtd_info *mtd)
> +{
> + struct nand_chip *this = mtd->priv;
> + return readb(this->IO_ADDR_R);
> +}
> +
> +static void nand_write_byte(struct mtd_info *mtd, u_char byte)
> +{
> + struct nand_chip *this = mtd->priv;
> + writeb(byte, this->IO_ADDR_W);
> +}
> +
> +static void nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
> +{
> + int i;
> + struct nand_chip *this = mtd->priv;
> +
> + for (i = 0; i < len; i++)
> + buf[i] = readb(this->IO_ADDR_R);
> +}
> +#endif
We should probably move this under nand_spl/, and let boards select it
if they need it.
> +/*
> + * Hardware specific access to control-lines function
> + * Written by jsgood
> + */
> +static void s3c_nand_hwcontrol(struct mtd_info *mtd, int cmd)
> +{
> + struct nand_chip *this = mtd->priv;
> +
> + switch (cmd) {
> + case NAND_CTL_SETCLE:
> + this->IO_ADDR_W = (void __iomem *)NFCMMD;
> + break;
> + case NAND_CTL_CLRCLE:
> + this->IO_ADDR_W = (void __iomem *)NFDATA;
> + break;
> + case NAND_CTL_SETALE:
> + this->IO_ADDR_W = (void __iomem *)NFADDR;
> + break;
> + case NAND_CTL_CLRALE:
> + this->IO_ADDR_W = (void __iomem *)NFDATA;
> + break;
> + case NAND_CTL_SETNCE:
> + s3c_nand_select_chip(mtd, 0);
> + break;
> + case NAND_CTL_CLRNCE:
> + s3c_nand_select_chip(mtd, -1);
> + break;
> + }
> +}
This interface has changed in u-boot-nand-flash/testing. Can you rebase
against it?
-Scott
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/u-boot-users