mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 08:21:14 +00:00
86583384ff
NAND controller is present on BCM6328, BCM6362, BCM6368 and BCM63268. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
22 lines
534 B
Diff
22 lines
534 B
Diff
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
|
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
|
@@ -1019,11 +1019,14 @@ static int brcmnand_hamming_ooblayout_fr
|
|
if (!section) {
|
|
/*
|
|
* Small-page NAND use byte 6 for BBI while large-page
|
|
- * NAND use byte 0.
|
|
+ * NAND use bytes 0 and 1.
|
|
*/
|
|
- if (cfg->page_size > 512)
|
|
- oobregion->offset++;
|
|
- oobregion->length--;
|
|
+ if (cfg->page_size > 512) {
|
|
+ oobregion->offset += 2;
|
|
+ oobregion->length -= 2;
|
|
+ } else {
|
|
+ oobregion->length--;
|
|
+ }
|
|
}
|
|
}
|
|
|