From c69ffda546522ae67544ad717a45abbc2ca3527f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 2 Jan 2016 14:48:27 +0000 Subject: ramips: clean up and refresh kernel patches Signed-off-by: Felix Fietkau SVN-Revision: 48070 --- .../0040-nand-add-mtk-nand-hack-hook.patch | 27 +++++++--------------- 1 file changed, 8 insertions(+), 19 deletions(-) (limited to 'target/linux/ramips/patches-4.3/0040-nand-add-mtk-nand-hack-hook.patch') diff --git a/target/linux/ramips/patches-4.3/0040-nand-add-mtk-nand-hack-hook.patch b/target/linux/ramips/patches-4.3/0040-nand-add-mtk-nand-hack-hook.patch index 51fd8ee6a4..78d607e7f0 100644 --- a/target/linux/ramips/patches-4.3/0040-nand-add-mtk-nand-hack-hook.patch +++ b/target/linux/ramips/patches-4.3/0040-nand-add-mtk-nand-hack-hook.patch @@ -11,8 +11,6 @@ Signed-off-by: John Crispin include/linux/mtd/nand.h | 4 ++++ 4 files changed, 44 insertions(+), 5 deletions(-) -diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c -index 00e150c..808e9c3 100644 --- a/drivers/mtd/nand/mtk_nand.c +++ b/drivers/mtd/nand/mtk_nand.c @@ -110,6 +110,10 @@ int part_num = NUM_PARTITIONS; @@ -26,7 +24,7 @@ index 00e150c..808e9c3 100644 static u8 local_oob_buf[NAND_MAX_OOBSIZE]; static u8 nand_badblock_offset = 0; -@@ -348,7 +352,7 @@ mtk_nand_check_bch_error(struct mtd_info *mtd, u8 * pDataBuf, u32 u4SecIndex, u3 +@@ -348,7 +352,7 @@ mtk_nand_check_bch_error(struct mtd_info if (0xF == u4ErrNum) { mtd->ecc_stats.failed++; bRet = false; @@ -35,7 +33,7 @@ index 00e150c..808e9c3 100644 } else { for (i = 0; i < ((u4ErrNum + 1) >> 1); ++i) { au4ErrBitLoc[i] = DRV_Reg32(ECC_DECEL0_REG32 + i); -@@ -1422,7 +1426,7 @@ mtk_nand_erase_hw(struct mtd_info *mtd, int page) +@@ -1422,7 +1426,7 @@ mtk_nand_erase_hw(struct mtd_info *mtd, { struct nand_chip *chip = (struct nand_chip *)mtd->priv; @@ -44,7 +42,7 @@ index 00e150c..808e9c3 100644 return chip->waitfunc(mtd, chip); } -@@ -2094,8 +2098,8 @@ mtk_nand_probe(struct platform_device *pdev) +@@ -2094,8 +2098,8 @@ mtk_nand_probe(struct platform_device *p nand_chip->write_page = mtk_nand_write_page; nand_chip->ecc.write_oob = mtk_nand_write_oob; nand_chip->block_markbad = mtk_nand_block_markbad; // need to add nand_get_device()/nand_release_device(). @@ -55,7 +53,7 @@ index 00e150c..808e9c3 100644 nand_chip->ecc.read_oob = mtk_nand_read_oob; nand_chip->block_bad = mtk_nand_block_bad; -@@ -2175,6 +2179,21 @@ mtk_nand_probe(struct platform_device *pdev) +@@ -2175,6 +2179,21 @@ mtk_nand_probe(struct platform_device *p nand_chip->pagemask = (nand_chip->chipsize >> nand_chip->page_shift) - 1; nand_chip->phys_erase_shift = ffs(mtd->erasesize) - 1; nand_chip->chip_shift = ffs(nand_chip->chipsize) - 1;//0x1C;//ffs(nand_chip->chipsize) - 1; @@ -87,7 +85,7 @@ index 00e150c..808e9c3 100644 kfree(host); nand_disable_clock(); return err; -@@ -2261,8 +2283,12 @@ mtk_nand_remove(struct platform_device *pdev) +@@ -2261,8 +2283,12 @@ mtk_nand_remove(struct platform_device * { struct mtk_nand_host *host = platform_get_drvdata(pdev); struct mtd_info *mtd = &host->mtd; @@ -100,11 +98,9 @@ index 00e150c..808e9c3 100644 kfree(host); nand_disable_clock(); -diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c -index 04dbc69..c5ed6fc 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c -@@ -1592,6 +1592,9 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from, +@@ -1592,6 +1592,9 @@ static int nand_do_read_ops(struct mtd_i __func__, buf); read_retry: @@ -122,7 +118,7 @@ index 04dbc69..c5ed6fc 100644 if (ret < 0) { if (use_bufpoi) /* Invalidate page cache */ -@@ -2786,8 +2790,11 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, +@@ -2786,8 +2790,11 @@ int nand_erase_nand(struct mtd_info *mtd if (page <= chip->pagebuf && chip->pagebuf < (page + pages_per_block)) chip->pagebuf = -1; @@ -135,11 +131,9 @@ index 04dbc69..c5ed6fc 100644 /* * See if operation failed and additional status checks are -diff --git a/drivers/mtd/nand/nand_device_list.h b/drivers/mtd/nand/nand_device_list.h -index 4c36b3a..267fd0c 100644 --- a/drivers/mtd/nand/nand_device_list.h +++ b/drivers/mtd/nand/nand_device_list.h -@@ -43,6 +43,8 @@ static const flashdev_info gen_FlashTable[]={ +@@ -43,6 +43,8 @@ static const flashdev_info gen_FlashTabl {0xADBC, 0x905554, 5, 16, 512, 128, 2048, 64, 0x10801011, "H9DA4GH4JJAMC", 0}, {0x01F1, 0x801D01, 4, 8, 128, 128, 2048, 64, 0x30C77fff, "S34ML01G100TF", 0}, {0x92F1, 0x8095FF, 4, 8, 128, 128, 2048, 64, 0x30C77fff, "F59L1G81A", 0}, @@ -148,8 +142,6 @@ index 4c36b3a..267fd0c 100644 {0xECD3, 0x519558, 5, 8, 1024, 128, 2048, 64, 0x44333, "K9K8G8000", 0}, {0xC2F1, 0x801DC2, 4, 8, 128, 128, 2048, 64, 0x30C77fff, "MX30LF1G08AA", 0}, {0x98D3, 0x902676, 5, 8, 1024, 256, 4096, 224, 0x00C25332, "TC58NVG3S0F", 0}, -diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h -index 272f429..b633b84 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -671,6 +671,10 @@ struct nand_chip { @@ -163,6 +155,3 @@ index 272f429..b633b84 100644 int (*onfi_set_features)(struct mtd_info *mtd, struct nand_chip *chip, int feature_addr, uint8_t *subfeature_para); int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip, --- -1.7.10.4 - -- cgit v1.2.3