]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: orion-nand: fix build error with ARMv4
authorArnd Bergmann <arnd@arndb.de>
Fri, 21 Jul 2017 20:38:06 +0000 (22:38 +0200)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 23 Aug 2017 14:49:18 +0000 (16:49 +0200)
commit178da932602a698930d20c2803ffad5ee94ef3cb
treeb6fd8aab3d6e6538e1597ddf99849845cefc4387
parent099ff6d5e366b5f44e0ae9a19d21a51992340cea
mtd: orion-nand: fix build error with ARMv4

orion_nand_read_buf uses an inline assembly with the "ldrd"
instruction, which is only available from ARMv5 upwards. This
used to be fine, since all users have an ARMv5 or ARMv7 CPU,
but now we can also build a multiplatform kernel with ARMv4
support enabled in addition to the "kirkwood" (mvebu) platform.

This provides an alternative to call the readsl() function that
is supposed to have the same effect and is also optimized for
performance.

I first posted a version of this patch back in 2014, and there
was some discussion about it then. This fixes the bugs identified
back then and should be a reasonable alternative for the rare
corner case.

Link: https://patchwork.kernel.org/patch/4144791/
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/orion_nand.c