[U-Boot] [PATCH 04/10] mxc_nand: add nand driver for MX2/MX3

Magnus Lilja lilja.magnus at gmail.com
Wed May 6 22:31:49 CEST 2009


Hi

2009/5/6 Ilya Yanok <yanok at emcraft.com>:
> Driver for NFC NAND controller found on Freescale's MX2 and MX3
> processors. Ported from Linux. Tested only with i.MX27 but should
> works with other MX2 and MX3 processors too.
>
> Signed-off-by: Ilya Yanok <yanok at emcraft.com>
> ---
>  drivers/mtd/nand/Makefile   |    1 +
>  drivers/mtd/nand/mxc_nand.c |  891 +++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 892 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/mtd/nand/mxc_nand.c
>
> diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
> index 471cd6b..24de947 100644
> --- a/drivers/mtd/nand/Makefile
> +++ b/drivers/mtd/nand/Makefile
> @@ -40,6 +40,7 @@ COBJS-$(CONFIG_DRIVER_NAND_BFIN) += bfin_nand.o
>  COBJS-$(CONFIG_NAND_DAVINCI) += davinci_nand.o
>  COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
>  COBJS-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o
> +COBJS-$(CONFIG_NAND_MXC) += mxc_nand.o
>  COBJS-$(CONFIG_NAND_NOMADIK) += nomadik.o
>  COBJS-$(CONFIG_NAND_S3C2410) += s3c2410_nand.c
>  COBJS-$(CONFIG_NAND_S3C64XX) += s3c64xx.o
> diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
> new file mode 100644
> index 0000000..48a6b7b
> --- /dev/null
> +++ b/drivers/mtd/nand/mxc_nand.c
> @@ -0,0 +1,891 @@
<...>
> +#define NFC_SP_EN           (1 << 2)
> +#define NFC_ECC_EN          (1 << 3)
> +#define NFC_INT_MSK         (1 << 4)
> +#define NFC_BIG             (1 << 5)
> +#define NFC_RST             (1 << 6)
> +#define NFC_CE              (1 << 7)
> +#define NFC_ONE_CYCLE       (1 << 8)
> +
> +typedef enum _bool{false,true} bool;

Isn't there some include-file we can use instead of typdefing this locally?

> +

Regards, Magnus


More information about the U-Boot mailing list