aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-02-09 07:36:22 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2007-02-09 07:36:22 -0500
commitc1f1625860847b57a0450a28d112423c2af675ff (patch)
tree2390866229b7d0eeb61166e77b153c8d3c70ee3a /include
parent552a8278d0becd671274af56a11ee601e585387a (diff)
parentcde36b37d6fa5ebc8c95461a972c379185626b2c (diff)
Merge branch 'master' of git://git.infradead.org/~kmpark/onenand-mtd-2.6
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/bbm.h7
-rw-r--r--include/linux/mtd/onenand.h15
-rw-r--r--include/linux/mtd/onenand_regs.h7
3 files changed, 18 insertions, 11 deletions
diff --git a/include/linux/mtd/bbm.h b/include/linux/mtd/bbm.h
index 1221b7c44158..fff8c53e5434 100644
--- a/include/linux/mtd/bbm.h
+++ b/include/linux/mtd/bbm.h
@@ -92,6 +92,13 @@ struct nand_bbt_descr {
92 */ 92 */
93#define ONENAND_BADBLOCK_POS 0 93#define ONENAND_BADBLOCK_POS 0
94 94
95/*
96 * Bad block scanning errors
97 */
98#define ONENAND_BBT_READ_ERROR 1
99#define ONENAND_BBT_READ_ECC_ERROR 2
100#define ONENAND_BBT_READ_FATAL_ERROR 4
101
95/** 102/**
96 * struct bbm_info - [GENERIC] Bad Block Table data structure 103 * struct bbm_info - [GENERIC] Bad Block Table data structure
97 * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry 104 * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index f775a7af3890..d8af8a95e58d 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/include/linux/mtd/onenand.h 2 * linux/include/linux/mtd/onenand.h
3 * 3 *
4 * Copyright (C) 2005-2006 Samsung Electronics 4 * Copyright (C) 2005-2007 Samsung Electronics
5 * Kyungmin Park <kyungmin.park@samsung.com> 5 * Kyungmin Park <kyungmin.park@samsung.com>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
@@ -42,14 +42,10 @@ typedef enum {
42 42
43/** 43/**
44 * struct onenand_bufferram - OneNAND BufferRAM Data 44 * struct onenand_bufferram - OneNAND BufferRAM Data
45 * @block: block address in BufferRAM 45 * @blockpage: block & page address in BufferRAM
46 * @page: page address in BufferRAM
47 * @valid: valid flag
48 */ 46 */
49struct onenand_bufferram { 47struct onenand_bufferram {
50 int block; 48 int blockpage;
51 int page;
52 int valid;
53}; 49};
54 50
55/** 51/**
@@ -63,7 +59,6 @@ struct onenand_bufferram {
63 * partly be set to inform onenand_scan about 59 * partly be set to inform onenand_scan about
64 * @erase_shift: [INTERN] number of address bits in a block 60 * @erase_shift: [INTERN] number of address bits in a block
65 * @page_shift: [INTERN] number of address bits in a page 61 * @page_shift: [INTERN] number of address bits in a page
66 * @ppb_shift: [INTERN] number of address bits in a pages per block
67 * @page_mask: [INTERN] a page per block mask 62 * @page_mask: [INTERN] a page per block mask
68 * @bufferram_index: [INTERN] BufferRAM index 63 * @bufferram_index: [INTERN] BufferRAM index
69 * @bufferram: [INTERN] BufferRAM info 64 * @bufferram: [INTERN] BufferRAM info
@@ -103,7 +98,6 @@ struct onenand_chip {
103 98
104 unsigned int erase_shift; 99 unsigned int erase_shift;
105 unsigned int page_shift; 100 unsigned int page_shift;
106 unsigned int ppb_shift; /* Pages per block shift */
107 unsigned int page_mask; 101 unsigned int page_mask;
108 102
109 unsigned int bufferram_index; 103 unsigned int bufferram_index;
@@ -150,6 +144,9 @@ struct onenand_chip {
150#define ONENAND_SET_SYS_CFG1(v, this) \ 144#define ONENAND_SET_SYS_CFG1(v, this) \
151 (this->write_word(v, this->base + ONENAND_REG_SYS_CFG1)) 145 (this->write_word(v, this->base + ONENAND_REG_SYS_CFG1))
152 146
147#define ONENAND_IS_DDP(this) \
148 (this->device_id & ONENAND_DEVICE_IS_DDP)
149
153/* Check byte access in OneNAND */ 150/* Check byte access in OneNAND */
154#define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1) 151#define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1)
155 152
diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h
index e31c8f5d4271..af94719890e7 100644
--- a/include/linux/mtd/onenand_regs.h
+++ b/include/linux/mtd/onenand_regs.h
@@ -3,7 +3,8 @@
3 * 3 *
4 * OneNAND Register header file 4 * OneNAND Register header file
5 * 5 *
6 * Copyright (C) 2005-2006 Samsung Electronics 6 * Copyright (C) 2005-2007 Samsung Electronics
7 * Kyungmin Park <kyungmin.park@samsung.com>
7 * 8 *
8 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
@@ -80,9 +81,11 @@
80#define ONENAND_VERSION_PROCESS_SHIFT (8) 81#define ONENAND_VERSION_PROCESS_SHIFT (8)
81 82
82/* 83/*
83 * Start Address 1 F100h (R/W) 84 * Start Address 1 F100h (R/W) & Start Address 2 F101h (R/W)
84 */ 85 */
85#define ONENAND_DDP_SHIFT (15) 86#define ONENAND_DDP_SHIFT (15)
87#define ONENAND_DDP_CHIP0 (0)
88#define ONENAND_DDP_CHIP1 (1 << ONENAND_DDP_SHIFT)
86 89
87/* 90/*
88 * Start Address 8 F107h (R/W) 91 * Start Address 8 F107h (R/W)