summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/nand/gpmi-nand/gpmi-nand.c11
-rw-r--r--drivers/mtd/nand/gpmi-nand/gpmi-nand.h8
2 files changed, 15 insertions, 4 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index ef0c4b4e5565..407f60f25e10 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -89,6 +89,12 @@ static const struct gpmi_devdata gpmi_devdata_imx7d = {
.max_chain_delay = 12,
};
+static const struct gpmi_devdata gpmi_devdata_imx6ul = {
+ .type = IS_MX6UL,
+ .bch_max_ecc_strength = 40,
+ .max_chain_delay = 12,
+};
+
static irqreturn_t bch_irq(int irq, void *cookie)
{
struct gpmi_nand_data *this = cookie;
@@ -592,7 +598,7 @@ acquire_err:
}
static char *extra_clks_for_mx6q[GPMI_CLK_MAX] = {
- "gpmi_apb", "gpmi_bch", "gpmi_bch_apb", "per1_bch",
+ "gpmi_apb", "gpmi_bch", "gpmi_bch_apb",
};
static char *extra_clks_for_mx7d[GPMI_CLK_MAX] = {
@@ -1815,6 +1821,9 @@ static const struct of_device_id gpmi_nand_id_table[] = {
.compatible = "fsl,imx6sx-gpmi-nand",
.data = (void *)&gpmi_devdata_imx6sx,
}, {
+ .compatible = "fsl,imx6ul-gpmi-nand",
+ .data = (void *)&gpmi_devdata_imx6ul,
+ }, {
.compatible = "fsl,imx7d-gpmi-nand",
.data = (void *)&gpmi_devdata_imx7d,
}
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.h b/drivers/mtd/nand/gpmi-nand/gpmi-nand.h
index 4974ef9d929d..5c2533eb6dd0 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;
@@ -125,7 +125,8 @@ enum gpmi_type {
IS_MX6Q,
IS_MX6QP,
IS_MX6SX,
- IS_MX7D
+ IS_MX7D,
+ IS_MX6UL
};
struct gpmi_devdata {
@@ -304,8 +305,9 @@ extern int gpmi_read_page(struct gpmi_nand_data *,
#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_MX6SX(x) || GPMI_IS_MX6UL(x))
#define GPMI_IS_MX7(x) (GPMI_IS_MX7D(x))
#endif