X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fstaging%2Fmkresin.git;a=blobdiff_plain;f=target%2Flinux%2Flantiq%2Fpatches-5.4%2F0018-MTD-nand-lots-of-xrx200-fixes.patch;fp=target%2Flinux%2Flantiq%2Fpatches-5.4%2F0018-MTD-nand-lots-of-xrx200-fixes.patch;h=d68466c36892dbb1550954c367164971763a5878;hp=4e34580efcb79cac86b70ab8027e89cf11525990;hb=d83a66ab011483e13b6cac345e148d3da0d5f0c7;hpb=333b796c04d313cac56043b91461f083b71f8b45 diff --git a/target/linux/lantiq/patches-5.4/0018-MTD-nand-lots-of-xrx200-fixes.patch b/target/linux/lantiq/patches-5.4/0018-MTD-nand-lots-of-xrx200-fixes.patch index 4e34580efc..d68466c368 100644 --- a/target/linux/lantiq/patches-5.4/0018-MTD-nand-lots-of-xrx200-fixes.patch +++ b/target/linux/lantiq/patches-5.4/0018-MTD-nand-lots-of-xrx200-fixes.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/drivers/mtd/nand/raw/xway_nand.c +++ b/drivers/mtd/nand/raw/xway_nand.c -@@ -63,6 +63,24 @@ +@@ -61,6 +61,24 @@ #define NAND_CON_CSMUX (1 << 1) #define NAND_CON_NANDM 1 @@ -35,7 +35,7 @@ Signed-off-by: John Crispin struct xway_nand_data { struct nand_chip chip; unsigned long csflags; -@@ -94,10 +112,22 @@ static void xway_select_chip(struct mtd_ +@@ -91,10 +109,22 @@ static void xway_select_chip(struct nand case -1: ltq_ebu_w32_mask(NAND_CON_CE, 0, EBU_NAND_CON); ltq_ebu_w32_mask(NAND_CON_NANDM, 0, EBU_NAND_CON); @@ -58,11 +58,10 @@ Signed-off-by: John Crispin ltq_ebu_w32_mask(0, NAND_CON_NANDM, EBU_NAND_CON); ltq_ebu_w32_mask(0, NAND_CON_CE, EBU_NAND_CON); break; -@@ -108,6 +138,12 @@ static void xway_select_chip(struct mtd_ - - static void xway_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) +@@ -107,6 +137,11 @@ static void xway_cmd_ctrl(struct nand_ch { -+ + struct mtd_info *mtd = nand_to_mtd(chip); + + if (req_mask) { + if (cmd != NAND_CMD_STATUS) + ltq_ebu_w32(0, EBU_NAND_WAIT); /* Clear nand ready */ @@ -71,7 +70,7 @@ Signed-off-by: John Crispin if (cmd == NAND_CMD_NONE) return; -@@ -118,6 +154,24 @@ static void xway_cmd_ctrl(struct mtd_inf +@@ -117,6 +152,24 @@ static void xway_cmd_ctrl(struct nand_ch while ((ltq_ebu_r32(EBU_NAND_WAIT) & NAND_WAIT_WR_C) == 0) ; @@ -95,8 +94,8 @@ Signed-off-by: John Crispin + } } - static int xway_dev_ready(struct mtd_info *mtd) -@@ -157,6 +211,7 @@ static int xway_nand_probe(struct platfo + static int xway_dev_ready(struct nand_chip *chip) +@@ -156,6 +209,7 @@ static int xway_nand_probe(struct platfo int err; u32 cs; u32 cs_flag = 0; @@ -104,7 +103,7 @@ Signed-off-by: John Crispin /* Allocate memory for the device structure (and zero it) */ data = devm_kzalloc(&pdev->dev, sizeof(struct xway_nand_data), -@@ -192,6 +247,15 @@ static int xway_nand_probe(struct platfo +@@ -191,6 +245,15 @@ static int xway_nand_probe(struct platfo if (!err && cs == 1) cs_flag = NAND_CON_IN_CS1 | NAND_CON_OUT_CS1;