forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, | ||
|
@@ -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, }, | ||
{} | ||
|