]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: nand: atmel: Fix DT backward compatibility in pmecc.c
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 17 Jul 2017 18:20:08 +0000 (20:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2017 20:46:49 +0000 (13:46 -0700)
commita34d48d5ca47c7ba740783ed8490b93499e0f870
tree75f28d0604d7c1a3e3ab5e8d99739b262ad8c5bb
parent0eda7e0bf2389a4dd5e752dcaa4a8d48bb799172
mtd: nand: atmel: Fix DT backward compatibility in pmecc.c

commit 3aa0907675a38498d8f2d343e94207ad28a117cf upstream.

PMECC caps extraction from old DT bindings is broken, thus leading to
erroneous EL registers offset, which in turn make HW ECC unusable on
sama5d2 when old bindings are in use.

Passing the NAND dev node instead of the NFC node to of_match_node()
solves the problem.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
Tested-by: Romain Izard <romain.izard.pro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/atmel/pmecc.c