kernel: generic: fix fonfxc uimage parser
authorNOGUCHI Hiroshi <drvlabo@gmail.com>
Sat, 3 Aug 2019 10:46:10 +0000 (19:46 +0900)
committerPetr Štetiar <ynezz@true.cz>
Sun, 4 Aug 2019 20:09:20 +0000 (22:09 +0200)
commite92a14709d37f64dcba8c81fa51e61e5f10f439a
tree8732924a4c8af070c8d7f9f6259f999bf5264a29
parentea1acaf5a697a3b3e0cd5c778d2c3930d7d6812b
kernel: generic: fix fonfxc uimage parser

We cannot distinguish between fonfxc uImage and generic uImage because
fonfxc uImage header is almost same as generic uImage, except padding
length after image name.

The fonfxc uImage parser is available when specifying directly with DT
compatible property.  So this patch adds check if the partition DT node
is compatible with the parser.

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2413
Fixes: a1c6a316d299 ("ramips: add support for Fon FON2601")
Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com>
[commit light touches and removed C code comment]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c