diff --git a/target/linux/imx/patches-6.6/400-gpmi-nand.patch b/target/linux/imx/patches-6.6/400-gpmi-nand.patch index 70712ae19d5137..ea268c3421e9f7 100644 --- a/target/linux/imx/patches-6.6/400-gpmi-nand.patch +++ b/target/linux/imx/patches-6.6/400-gpmi-nand.patch @@ -9,10 +9,20 @@ Signed-off-by: Alexey Sadkov --- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c -@@ -1189,6 +1189,14 @@ +@@ -943,7 +943,7 @@ + return ret; + } + +- if (GPMI_IS_MX6Q(this) || GPMI_IS_MX6SX(this)) { ++ if (GPMI_IS_MX6Q(this) || GPMI_IS_MX6SX(this) || GPMI_IS_MX6UL(this) || GPMI_IS_MX6ULL(this) || GPMI_IS_MX6QP(this)) { + ret = clk_prepare_enable(r->clock[0]); + if (ret) + return ret; +@@ -1157,6 +1157,14 @@ + .clks = gpmi_clks_for_mx6, .clks_count = ARRAY_SIZE(gpmi_clks_for_mx6), }; - ++ +static const struct gpmi_devdata gpmi_devdata_imx6qp = { + .type = IS_MX6QP, + .bch_max_ecc_strength = 40, @@ -20,14 +30,14 @@ Signed-off-by: Alexey Sadkov + .clks = gpmi_clks_for_mx6, + .clks_count = ARRAY_SIZE(gpmi_clks_for_mx6), +}; -+ + static const struct gpmi_devdata gpmi_devdata_imx6sx = { .type = IS_MX6SX, - .bch_max_ecc_strength = 62, -@@ -1197,6 +1205,22 @@ +@@ -1165,6 +1173,22 @@ + .clks = gpmi_clks_for_mx6, .clks_count = ARRAY_SIZE(gpmi_clks_for_mx6), }; - ++ +static const struct gpmi_devdata gpmi_devdata_imx6ul = { + .type = IS_MX6UL, + .bch_max_ecc_strength = 40, @@ -43,36 +53,16 @@ Signed-off-by: Alexey Sadkov + .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", - }; -@@ -2598,13 +2622,12 @@ - &direct); - break; - } -+ } - -- if (!desc) { -- ret = -ENXIO; -- goto unmap; -- } -+ if (!desc) { -+ ret = -ENXIO; -+ goto unmap; - } -- - dev_dbg(this->dev, "%s setup done\n", __func__); - - if (nbufs > 1) { -@@ -2750,8 +2773,11 @@ +@@ -2719,8 +2743,11 @@ { .compatible = "fsl,imx23-gpmi-nand", .data = &gpmi_devdata_imx23, }, { .compatible = "fsl,imx28-gpmi-nand", .data = &gpmi_devdata_imx28, }, { .compatible = "fsl,imx6q-gpmi-nand", .data = &gpmi_devdata_imx6q, }, + { .compatible = "fsl,imx6qp-gpmi-nand", .data = &gpmi_devdata_imx6qp, }, { .compatible = "fsl,imx6sx-gpmi-nand", .data = &gpmi_devdata_imx6sx, }, -- { .compatible = "fsl,imx7d-gpmi-nand", .data = &gpmi_devdata_imx7d,}, -+ { .compatible = "fsl,imx7d-gpmi-nand", .data = &gpmi_devdata_imx7d, }, + { .compatible = "fsl,imx7d-gpmi-nand", .data = &gpmi_devdata_imx7d,}, + { .compatible = "fsl,imx6ul-gpmi-nand", .data = &gpmi_devdata_imx6ul, }, + { .compatible = "fsl,imx6ull-gpmi-nand", .data = &gpmi_devdata_imx6ull, }, {}