summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLukasz Majewski <l.majewski@samsung.com>2011-11-09 10:30:06 +0100
committerLukasz Majewski <l.majewski@samsung.com>2012-04-04 17:08:40 +0200
commite26fd3d3bfcf9a425b57defeb91b4e088392e3d9 (patch)
treedf0e9dbe1e2d27773c029defd58fea0bc378b718 /include
parent8f9c249836b1c081cb1b6b6bf063923473df6884 (diff)
downloadu-boot-imx-e26fd3d3bfcf9a425b57defeb91b4e088392e3d9.zip
u-boot-imx-e26fd3d3bfcf9a425b57defeb91b4e088392e3d9.tar.gz
u-boot-imx-e26fd3d3bfcf9a425b57defeb91b4e088392e3d9.tar.bz2
onenand: Replace ONENAND_IS_MLC() with ONENAND_HAS_4KB()
This replacement causes 4KB page size devices to work properly with u-boot. The old ONENAND_IS_MLC() behavior has been preserved by explicit setting of ONENAND_HAS_4KB_PAGE for those devices. This change makes the onenand_base.c file more resembling the respective kernel sources. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> --- Test HW: - Samsung S5PC110 GONI - Samsung S5PC210 Universal
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/onenand.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index dea42f4..bb4a4a6 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -140,6 +140,9 @@ struct onenand_chip {
#define ONENAND_IS_DDP(this) \
(this->device_id & ONENAND_DEVICE_IS_DDP)
+#define ONENAND_IS_4KB_PAGE(this) \
+ (this->options & ONENAND_HAS_4KB_PAGE)
+
#define ONENAND_IS_2PLANE(this) (0)
/*
@@ -148,6 +151,7 @@ struct onenand_chip {
#define ONENAND_HAS_CONT_LOCK (0x0001)
#define ONENAND_HAS_UNLOCK_ALL (0x0002)
#define ONENAND_HAS_2PLANE (0x0004)
+#define ONENAND_HAS_4KB_PAGE (0x0008)
#define ONENAND_RUNTIME_BADBLOCK_CHECK (0x0200)
#define ONENAND_PAGEBUF_ALLOC (0x1000)
#define ONENAND_OOBBUF_ALLOC (0x2000)