summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/include/mach/imx-nand.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-03-11 16:13:25 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-03-12 11:04:33 +0100
commit1512479a6e2c6bf3a2a92db59d27f800a924bf06 (patch)
treedbb42a4594467034429b13d7ba848ae06a6362bb /arch/arm/mach-imx/include/mach/imx-nand.h
parentd8910405cb2b89b285f3bb092f4089ced6b77ae0 (diff)
downloadbarebox-1512479a6e2c6bf3a2a92db59d27f800a924bf06.tar.gz
barebox-1512479a6e2c6bf3a2a92db59d27f800a924bf06.tar.xz
ARM: i.MX: Add bbu handler for external NAND boot
The external NAND boot code currently does not handle bad blocks correctly on 2k NAND flashes. This patch adds a barebox_update handler for external NAND boot which embeds a Bad block table in the flashed image. The boot code will skip bad blocks found in this bad block table then. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/include/mach/imx-nand.h')
-rw-r--r--arch/arm/mach-imx/include/mach/imx-nand.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/include/mach/imx-nand.h b/arch/arm/mach-imx/include/mach/imx-nand.h
index 8352d79bcf..9e6416e4d4 100644
--- a/arch/arm/mach-imx/include/mach/imx-nand.h
+++ b/arch/arm/mach-imx/include/mach/imx-nand.h
@@ -70,4 +70,10 @@ struct imx_nand_platform_data {
#define NFC_ID (1 << 4)
#define NFC_STATUS (1 << 5)
+/*
+ * For external NAND boot this defines the magic value for the bad block table
+ * This is found at offset ARM_HEAD_SPARE_OFS in the image on NAND.
+ */
+#define IMX_NAND_BBT_MAGIC 0xbadb10c0
+
#endif /* __ASM_ARCH_NAND_H */