aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/sunxi/patches-4.1/128-2-mtd-nand-support-non-ONFI-timings.patch
diff options
context:
space:
mode:
authorJames <>2015-11-04 11:49:21 +0000
committerJames <>2015-11-04 11:49:21 +0000
commit716ca530e1c4515d8683c9d5be3d56b301758b66 (patch)
tree700eb5bcc1a462a5f21dcec15ce7c97ecfefa772 /target/linux/sunxi/patches-4.1/128-2-mtd-nand-support-non-ONFI-timings.patch
downloadtrunk-47381-master.tar.gz
trunk-47381-master.tar.bz2
trunk-47381-master.zip
trunk-47381HEADmaster
Diffstat (limited to 'target/linux/sunxi/patches-4.1/128-2-mtd-nand-support-non-ONFI-timings.patch')
-rw-r--r--target/linux/sunxi/patches-4.1/128-2-mtd-nand-support-non-ONFI-timings.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/sunxi/patches-4.1/128-2-mtd-nand-support-non-ONFI-timings.patch b/target/linux/sunxi/patches-4.1/128-2-mtd-nand-support-non-ONFI-timings.patch
new file mode 100644
index 0000000..03c7f26
--- /dev/null
+++ b/target/linux/sunxi/patches-4.1/128-2-mtd-nand-support-non-ONFI-timings.patch
@@ -0,0 +1,28 @@
+--- a/drivers/mtd/nand/nand_base.c
++++ b/drivers/mtd/nand/nand_base.c
+@@ -4262,8 +4262,13 @@ static bool find_full_id_nand(struct mtd
+ chip->ecc_strength_ds = NAND_ECC_STRENGTH(type);
+ chip->ecc_step_ds = NAND_ECC_STEP(type);
+
+- mode = type->onfi_timing_mode_default;
+- chip->sdr_timings = onfi_async_timing_mode_to_sdr_timings(mode);
++ if (type->custom_sdr_timing) {
++ chip->sdr_timings = type->custom_sdr_timing;
++ } else {
++ mode = type->onfi_timing_mode_default;
++ chip->sdr_timings =
++ onfi_async_timing_mode_to_sdr_timings(mode);
++ }
+
+ *busw = type->options & NAND_BUSWIDTH_16;
+
+--- a/include/linux/mtd/nand.h
++++ b/include/linux/mtd/nand.h
+@@ -988,6 +988,7 @@ struct nand_flash_dev {
+ uint16_t step_ds;
+ } ecc;
+ int onfi_timing_mode_default;
++ const struct nand_sdr_timings *custom_sdr_timing;
+ };
+
+ /**