From: Ezequiel Garcia Date: Wed, 18 Dec 2013 21:44:09 +0000 (-0300) Subject: mtd: nand: pxa3xx: Use extended cmdfunc() only if needed X-Git-Tag: v3.14-rc1~65^2~70 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cbbdc6a9f8830737e099aca12794eb907f96882;p=pandora-kernel.git mtd: nand: pxa3xx: Use extended cmdfunc() only if needed Currently, we have two different cmdfunc's implementations: one for PXA3xx SoC variant and one for Armada 370/XP SoC variant. The former is the legacy one, typically constrained to devices with page sizes smaller or equal to the controller's FIFO buffer. On the other side, the latter _only_ supports the so-called extended command semantics, which allow to handle devices with larger page sizes (4 KiB, 8 KiB, ...). This means we currently don't support devices with smaller pages on the A370/XP SoC. Fix it by first renaming the cmdfuncs variants, and then make the choice based on device page size (and SoC variant), rather than SoC variant alone. While at it, add a check for page size, to make sure we don't allow larger pages sizes on the PXA3xx variant. Tested-by: Arnaud Ebalard Signed-off-by: Ezequiel Garcia Signed-off-by: Brian Norris --- Reading git-diff-tree failed