projects
/
openwrt
/
staging
/
mkresin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lantiq: add Linux 5.4 support as testing kernel version
[openwrt/staging/mkresin.git]
/
target
/
linux
/
lantiq
/
patches-5.4
/
0018-MTD-nand-lots-of-xrx200-fixes.patch
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 4e34580efcb79cac86b70ab8027e89cf11525990..d68466c36892dbb1550954c367164971763a5878 100644
(file)
--- 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 <blogic@openwrt.org>
--- a/drivers/mtd/nand/raw/xway_nand.c
+++ b/drivers/mtd/nand/raw/xway_nand.c
--- a/drivers/mtd/nand/raw/xway_nand.c
+++ b/drivers/mtd/nand/raw/xway_nand.c
-@@ -6
3,6 +63
,24 @@
+@@ -6
1,6 +61
,24 @@
#define NAND_CON_CSMUX (1 << 1)
#define NAND_CON_NANDM 1
#define NAND_CON_CSMUX (1 << 1)
#define NAND_CON_NANDM 1
@@
-35,7
+35,7
@@
Signed-off-by: John Crispin <blogic@openwrt.org>
struct xway_nand_data {
struct nand_chip chip;
unsigned long csflags;
struct xway_nand_data {
struct nand_chip chip;
unsigned long csflags;
-@@ -9
4,10 +112,22 @@ static void xway_select_chip(struct mtd_
+@@ -9
1,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);
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 <blogic@openwrt.org>
ltq_ebu_w32_mask(0, NAND_CON_NANDM, EBU_NAND_CON);
ltq_ebu_w32_mask(0, NAND_CON_CE, EBU_NAND_CON);
break;
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 */
+ 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 <blogic@openwrt.org>
if (cmd == NAND_CMD_NONE)
return;
if (cmd == NAND_CMD_NONE)
return;
-@@ -11
8,6 +154,24 @@ static void xway_cmd_ctrl(struct mtd_inf
+@@ -11
7,6 +152,24 @@ static void xway_cmd_ctrl(struct nand_ch
while ((ltq_ebu_r32(EBU_NAND_WAIT) & NAND_WAIT_WR_C) == 0)
;
while ((ltq_ebu_r32(EBU_NAND_WAIT) & NAND_WAIT_WR_C) == 0)
;
@@
-95,8
+94,8
@@
Signed-off-by: John Crispin <blogic@openwrt.org>
+ }
}
+ }
}
- static int xway_dev_ready(struct
mtd_info *mtd
)
-@@ -15
7,6 +211
,7 @@ static int xway_nand_probe(struct platfo
+ static int xway_dev_ready(struct
nand_chip *chip
)
+@@ -15
6,6 +209
,7 @@ static int xway_nand_probe(struct platfo
int err;
u32 cs;
u32 cs_flag = 0;
int err;
u32 cs;
u32 cs_flag = 0;
@@
-104,7
+103,7
@@
Signed-off-by: John Crispin <blogic@openwrt.org>
/* Allocate memory for the device structure (and zero it) */
data = devm_kzalloc(&pdev->dev, sizeof(struct xway_nand_data),
/* Allocate memory for the device structure (and zero it) */
data = devm_kzalloc(&pdev->dev, sizeof(struct xway_nand_data),
-@@ -19
2,6 +247
,15 @@ static int xway_nand_probe(struct platfo
+@@ -19
1,6 +245
,15 @@ static int xway_nand_probe(struct platfo
if (!err && cs == 1)
cs_flag = NAND_CON_IN_CS1 | NAND_CON_OUT_CS1;
if (!err && cs == 1)
cs_flag = NAND_CON_IN_CS1 | NAND_CON_OUT_CS1;