aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/sunxi/patches-4.1/128-2-mtd-nand-support-non-ONFI-timings.patch
diff options
context:
space:
mode:
authorZoltan HERPAI <wigyori@uid0.hu>2015-08-09 12:25:18 +0000
committerZoltan HERPAI <wigyori@uid0.hu>2015-08-09 12:25:18 +0000
commitd10caae910327f3bf5163943d364c6c914921239 (patch)
tree0ab49e184d9ee4c3c9cd836991897f0e7ba6e526 /target/linux/sunxi/patches-4.1/128-2-mtd-nand-support-non-ONFI-timings.patch
parent331f540f34a56959b281f771c46d3facdba62fd8 (diff)
downloadmaster-187ad058-d10caae910327f3bf5163943d364c6c914921239.tar.gz
master-187ad058-d10caae910327f3bf5163943d364c6c914921239.tar.bz2
master-187ad058-d10caae910327f3bf5163943d364c6c914921239.zip
sunxi: add support for 4.1
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46571 3c298f89-4303-0410-b956-a3cf2f4a3e73
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.patch32
1 files changed, 32 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 0000000000..d7a396396f
--- /dev/null
+++ b/target/linux/sunxi/patches-4.1/128-2-mtd-nand-support-non-ONFI-timings.patch
@@ -0,0 +1,32 @@
+diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
+index f561c68..8e636df 100644
+--- a/drivers/mtd/nand/nand_base.c
++++ b/drivers/mtd/nand/nand_base.c
+@@ -3624,8 +3624,13 @@ static bool find_full_id_nand(struct mtd_info *mtd, struct nand_chip *chip,
+ 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;
+
+diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
+index 2eb92a3..7d9e599 100644
+--- a/include/linux/mtd/nand.h
++++ b/include/linux/mtd/nand.h
+@@ -863,6 +863,7 @@ struct nand_flash_dev {
+ uint16_t step_ds;
+ } ecc;
+ int onfi_timing_mode_default;
++ const struct nand_sdr_timings *custom_sdr_timing;
+ };
+
+ /**