Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'mtd/fixes-for-5.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux

Pull mtd fixes from Miquel Raynal:
"Second series of fixes for raw NAND drivers initiated because of a
rework of the ECC engine subsystem.

The location of the DT parsing logic got moved, breaking several
drivers which in fact were not doing the ECC engine initialization at
the right place.

These drivers have been fixed by enforcing a particular ECC engine
type and algorithm, software Hamming, while the algorithm may be
overwritten by a DT property. This merge request fixes this in the
xway, socrates, plat_nand, pasemi, orion, mpc5121, gpio, au1550 and
ams-delta controller drivers"

* tag 'mtd/fixes-for-5.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
mtd: rawnand: xway: Do not force a particular software ECC engine
mtd: rawnand: socrates: Do not force a particular software ECC engine
mtd: rawnand: plat_nand: Do not force a particular software ECC engine
mtd: rawnand: pasemi: Do not force a particular software ECC engine
mtd: rawnand: orion: Do not force a particular software ECC engine
mtd: rawnand: mpc5121: Do not force a particular software ECC engine
mtd: rawnand: gpio: Do not force a particular software ECC engine
mtd: rawnand: au1550: Do not force a particular software ECC engine
mtd: rawnand: ams-delta: Do not force a particular software ECC engine

+27 -9
+3 -1
drivers/mtd/nand/raw/ams-delta.c
··· 218 218 static int gpio_nand_attach_chip(struct nand_chip *chip) 219 219 { 220 220 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT; 221 - chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 221 + 222 + if (chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN) 223 + chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 222 224 223 225 return 0; 224 226 }
+3 -1
drivers/mtd/nand/raw/au1550nd.c
··· 239 239 static int au1550nd_attach_chip(struct nand_chip *chip) 240 240 { 241 241 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT; 242 - chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 242 + 243 + if (chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN) 244 + chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 243 245 244 246 return 0; 245 247 }
+3 -1
drivers/mtd/nand/raw/gpio.c
··· 164 164 static int gpio_nand_attach_chip(struct nand_chip *chip) 165 165 { 166 166 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT; 167 - chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 167 + 168 + if (chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN) 169 + chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 168 170 169 171 return 0; 170 172 }
+3 -1
drivers/mtd/nand/raw/mpc5121_nfc.c
··· 606 606 static int mpc5121_nfc_attach_chip(struct nand_chip *chip) 607 607 { 608 608 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT; 609 - chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 609 + 610 + if (chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN) 611 + chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 610 612 611 613 return 0; 612 614 }
+3 -1
drivers/mtd/nand/raw/orion_nand.c
··· 86 86 static int orion_nand_attach_chip(struct nand_chip *chip) 87 87 { 88 88 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT; 89 - chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 89 + 90 + if (chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN) 91 + chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 90 92 91 93 return 0; 92 94 }
+3 -1
drivers/mtd/nand/raw/pasemi_nand.c
··· 77 77 static int pasemi_attach_chip(struct nand_chip *chip) 78 78 { 79 79 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT; 80 - chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 80 + 81 + if (chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN) 82 + chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 81 83 82 84 return 0; 83 85 }
+3 -1
drivers/mtd/nand/raw/plat_nand.c
··· 22 22 static int plat_nand_attach_chip(struct nand_chip *chip) 23 23 { 24 24 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT; 25 - chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 25 + 26 + if (chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN) 27 + chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 26 28 27 29 return 0; 28 30 }
+3 -1
drivers/mtd/nand/raw/socrates_nand.c
··· 120 120 static int socrates_attach_chip(struct nand_chip *chip) 121 121 { 122 122 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT; 123 - chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 123 + 124 + if (chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN) 125 + chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 124 126 125 127 return 0; 126 128 }
+3 -1
drivers/mtd/nand/raw/xway_nand.c
··· 149 149 static int xway_attach_chip(struct nand_chip *chip) 150 150 { 151 151 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT; 152 - chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 152 + 153 + if (chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN) 154 + chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 153 155 154 156 return 0; 155 157 }