mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
mtd: atmel_nand: Disable subpage NAND write when using Atmel PMECC
commit 90445ff624 upstream.
Crash detected on sam5d35 and its pmecc nand ecc controller.
The problem was a call to chip->ecc.hwctl from nand_write_subpage_hwecc
(nand_base.c) when we write a sub page.
chip->ecc.hwctl function is not set when we are using PMECC controller.
As a workaround, set NAND_NO_SUBPAGE_WRITE for PMECC controller in
order to disable sub page access in nand_write_page.
Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Acked-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0c6859c7f5
commit
71eec3f820
@@ -1096,6 +1096,7 @@ static int __init atmel_pmecc_nand_init_params(struct platform_device *pdev,
|
||||
goto err_pmecc_data_alloc;
|
||||
}
|
||||
|
||||
nand_chip->options |= NAND_NO_SUBPAGE_WRITE;
|
||||
nand_chip->ecc.read_page = atmel_nand_pmecc_read_page;
|
||||
nand_chip->ecc.write_page = atmel_nand_pmecc_write_page;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user