linux/drivers/mtd/parsers
Linus Walleij b7cf5e2830 mtd: afs: add v2 partition parsing
The AFS v2 partition type appear in later ARM reference designs
such as RealView, Versatile Express and the 64bit Juno Development
Platform.

The image informations is padded with a 32bit word (4 bytes) on
the 32bit platforms and a 64bit word (8 bytes) on the 64bit
platforms. The boot monitor source code gives at hand that this
is because the first entry in the struct mapped over the image
information is a "next" pointer for a linked list, filled in
by firmware after reading in the info block, and always zero
in the flash. We adjust padding by checking what padding gives
the right checksum.

This was tested on:
- Integrator/AP (v1 partitions)
- RealView PB11MPCore (v2 32bit partitions)
- Juno Development System (v2 64bit partitions)

All systems display the images in flash very nicely as separate
partitions, e.g on Juno:

4 afs partitions found on MTD device 8000000.flash
Creating 4 MTD partitions on "8000000.flash":
0x000000040000-0x0000000c0000 : "fip"
0x000000ec0000-0x0000018c0000 : "Image"
0x000000f00000-0x000000f40000 : "juno"
0x000003ec0000-0x000003f00000 : "bl1"

Cc: Ryan Harkin <ryan.harkin@linaro.org>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
2019-05-06 21:57:03 +02:00
..
afs.c mtd: afs: add v2 partition parsing 2019-05-06 21:57:03 +02:00
Kconfig mtd: afs: Move AFS partition parser to parsers subdir 2019-05-06 21:48:46 +02:00
Makefile mtd: afs: Move AFS partition parser to parsers subdir 2019-05-06 21:48:46 +02:00
parser_imagetag.c mtd: parser_imagetag: add of_match_table support 2019-05-06 21:46:45 +02:00
parser_trx.c mtd: parsers: trx: add of_match_table with the new DT binding 2018-07-07 10:51:00 +02:00
redboot.c mtd: partitions: Add OF support to RedBoot partitions 2018-11-12 11:51:02 +01:00
sharpslpart.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00