diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-03-03 08:37:46 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-03-03 08:45:32 +0100 |
commit | 49d9b9bea71b13fa44153e2e21c681722fbafa5a (patch) | |
tree | fe53ba8f391681bc73c186a1a73613186ba0c3e8 /include/linux/mtd/nand.h | |
parent | fb7836ebf638de5ca1a6e0955ebf66e50fd5bd17 (diff) | |
download | barebox-49d9b9bea71b13fa44153e2e21c681722fbafa5a.tar.gz barebox-49d9b9bea71b13fa44153e2e21c681722fbafa5a.tar.xz |
mtd: nand: disable subpage reads
The default nand_read_subpage implementation returns -ENOSUPP, so we have
to make sure that barebox never uses this implementation. By setting the
NAND_SUBPAGE_READ flag to 0x0 we ensure NAND_HAS_SUBPAGE_READ() never returns
true and also give the compiler a chance to optimize away some unused code.
subpage reads are a rather exotic feature even in Linux. It is only used on
largepage NANDs with soft ecc. Even if we have this case it needs non page
aligned reads to actually profit from this feature.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Hattink, Tjalling [FINT] <T.Hattink@fugro.nl>
Diffstat (limited to 'include/linux/mtd/nand.h')
-rw-r--r-- | include/linux/mtd/nand.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 74ea0b4e02..3c7509f9af 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -162,7 +162,8 @@ typedef enum { #define NAND_ROM 0x00000800 /* Device supports subpage reads */ -#define NAND_SUBPAGE_READ 0x00001000 +/* Disabled in barebox for smaller binary sizes */ +#define NAND_SUBPAGE_READ (__BAREBOX__ ? 0x0 : 0x00001000) /* Options valid for Samsung large page devices */ #define NAND_SAMSUNG_LP_OPTIONS NAND_CACHEPRG |