ARM: i.MX: bbu: reimplement IMX_INTERNAL_FLAG_KEEP_DOSPART flag
This patch reimplements the IMX_INTERNAL_FLAG_KEEP_DOSPART flag
and makes it more generic. Until now we only kept a dos partition
table over the update. Beginning with i.MX8 we may also want to
preserve a GPT, so we have to extend the preserved area.

It might also be the case that not (only) a partition table is
stored in the initial area of a device, but also other unrelated
data, so it's better to just keep the initial area that is unused
by the i.MX ROM. It's also good to export the flag to allow boards
to specify the initial area shall be preserved.

When a board wants to set the flag for a mtd like device then it
has to check for suitable erase sizes beforehand. We do not check
this (yet).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 0e7f667 commit 26034146a8d17ebcba3293d75c111458e725c2bc
@Sascha Hauer Sascha Hauer authored on 29 Jun 2018
Showing 2 changed files
View
arch/arm/mach-imx/imx-bbu-internal.c
View
arch/arm/mach-imx/include/mach/bbu.h