Skip to content

Commit

Permalink
fix patch3
Browse files Browse the repository at this point in the history
  • Loading branch information
devbis committed Nov 23, 2024
1 parent d6100ae commit f56b2e2
Showing 1 changed file with 19 additions and 29 deletions.
48 changes: 19 additions & 29 deletions target/linux/imx/patches-6.6/400-gpmi-nand.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,35 @@ Signed-off-by: Alexey Sadkov <[email protected]>

--- 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,
+ .max_chain_delay = 12000,
+ .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,
Expand All @@ -43,36 +53,16 @@ Signed-off-by: Alexey Sadkov <[email protected]>
+ .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, },
{}
Expand Down

0 comments on commit f56b2e2

Please sign in to comment.