diff options
-rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 13 | ||||
-rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-nand.h | 5 |
2 files changed, 16 insertions, 2 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index 9ba334252408..28a85ee0dc2b 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c @@ -108,7 +108,7 @@ static const struct gpmi_devdata gpmi_devdata_imx28 = { }; static const char * const gpmi_clks_for_mx6[] = { - "gpmi_io", "gpmi_apb", "gpmi_bch", "gpmi_bch_apb", "per1_bch", + "gpmi_io", "gpmi_apb", "gpmi_bch", "gpmi_bch_apb", }; static const struct gpmi_devdata gpmi_devdata_imx6q = { @@ -133,6 +133,14 @@ static const struct gpmi_devdata gpmi_devdata_imx6sx = { .clks_count = ARRAY_SIZE(gpmi_clks_for_mx6), }; +static const struct gpmi_devdata gpmi_devdata_imx6ul = { + .type = IS_MX6UL, + .bch_max_ecc_strength = 40, + .max_chain_delay = 12, + .clks = gpmi_clks_for_mx6, + .clks_count = ARRAY_SIZE(gpmi_clks_for_mx6), +}; + static const char * const gpmi_clks_for_mx7d[] = { "gpmi_io", "gpmi_bch_apb", }; @@ -2107,6 +2115,9 @@ static const struct of_device_id gpmi_nand_id_table[] = { .compatible = "fsl,imx6sx-gpmi-nand", .data = &gpmi_devdata_imx6sx, }, { + .compatible = "fsl,imx6ul-gpmi-nand", + .data = (void *)&gpmi_devdata_imx6ul, + }, { .compatible = "fsl,imx7d-gpmi-nand", .data = &gpmi_devdata_imx7d, }, {} diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.h b/drivers/mtd/nand/gpmi-nand/gpmi-nand.h index 242597a5a03a..f269a1de943f 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.h +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.h @@ -22,7 +22,7 @@ #include <linux/dma-mapping.h> #include <linux/dmaengine.h> -#define GPMI_CLK_MAX 5 /* MX6Q needs five clocks */ +#define GPMI_CLK_MAX 4 /* MX6Q needs four clocks */ struct resources { void __iomem *gpmi_regs; void __iomem *bch_regs; @@ -126,6 +126,7 @@ enum gpmi_type { IS_MX6QP, IS_MX6SX, IS_MX7D, + IS_MX6UL }; struct gpmi_devdata { @@ -311,7 +312,9 @@ void gpmi_copy_bits(u8 *dst, size_t dst_bit_off, #define GPMI_IS_MX6QP(x) ((x)->devdata->type == IS_MX6QP) #define GPMI_IS_MX6SX(x) ((x)->devdata->type == IS_MX6SX) #define GPMI_IS_MX7D(x) ((x)->devdata->type == IS_MX7D) +#define GPMI_IS_MX6UL(x) ((x)->devdata->type == IS_MX6UL) #define GPMI_IS_MX6(x) (GPMI_IS_MX6Q(x) || GPMI_IS_MX6QP(x) || GPMI_IS_MX6SX(x) || \ + GPMI_IS_MX6UL(x) || \ GPMI_IS_MX7D(x)) #endif |