aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nand_base.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-23 17:28:48 -0400
committerThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-23 17:28:48 -0400
commitcad74f2c380411ae7bee997f3ba18834cfe313a2 (patch)
treeaec691447dc3ab76688fe9dbe3cc2ae04ad1cbee /drivers/mtd/nand/nand_base.c
parent7abd3ef9875eb2afcdcd4f450680298a2983a55e (diff)
[MTD] NAND remove write_byte/word function from nand_chip
The previous change of the command / hardware control allows to remove the write_byte/word functions completely, as their only user were nand_command and nand_command_lp. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r--drivers/mtd/nand/nand_base.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index f6997fb77b91..4f387c8388d7 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -198,19 +198,6 @@ static uint8_t nand_read_byte(struct mtd_info *mtd)
198} 198}
199 199
200/** 200/**
201 * nand_write_byte - [DEFAULT] write one byte to the chip
202 * @mtd: MTD device structure
203 * @byte: pointer to data byte to write
204 *
205 * Default write function for 8it buswith
206 */
207static void nand_write_byte(struct mtd_info *mtd, uint8_t byte)
208{
209 struct nand_chip *this = mtd->priv;
210 writeb(byte, this->IO_ADDR_W);
211}
212
213/**
214 * nand_read_byte16 - [DEFAULT] read one byte endianess aware from the chip 201 * nand_read_byte16 - [DEFAULT] read one byte endianess aware from the chip
215 * @mtd: MTD device structure 202 * @mtd: MTD device structure
216 * 203 *
@@ -224,20 +211,6 @@ static uint8_t nand_read_byte16(struct mtd_info *mtd)
224} 211}
225 212
226/** 213/**
227 * nand_write_byte16 - [DEFAULT] write one byte endianess aware to the chip
228 * @mtd: MTD device structure
229 * @byte: pointer to data byte to write
230 *
231 * Default write function for 16bit buswith with
232 * endianess conversion
233 */
234static void nand_write_byte16(struct mtd_info *mtd, uint8_t byte)
235{
236 struct nand_chip *this = mtd->priv;
237 writew(le16_to_cpu((u16) byte), this->IO_ADDR_W);
238}
239
240/**
241 * nand_read_word - [DEFAULT] read one word from the chip 214 * nand_read_word - [DEFAULT] read one word from the chip
242 * @mtd: MTD device structure 215 * @mtd: MTD device structure
243 * 216 *
@@ -251,20 +224,6 @@ static u16 nand_read_word(struct mtd_info *mtd)
251} 224}
252 225
253/** 226/**
254 * nand_write_word - [DEFAULT] write one word to the chip
255 * @mtd: MTD device structure
256 * @word: data word to write
257 *
258 * Default write function for 16bit buswith without
259 * endianess conversion
260 */
261static void nand_write_word(struct mtd_info *mtd, u16 word)
262{
263 struct nand_chip *this = mtd->priv;
264 writew(word, this->IO_ADDR_W);
265}
266
267/**
268 * nand_select_chip - [DEFAULT] control CE line 227 * nand_select_chip - [DEFAULT] control CE line
269 * @mtd: MTD device structure 228 * @mtd: MTD device structure
270 * @chip: chipnumber to select, -1 for deselect 229 * @chip: chipnumber to select, -1 for deselect
@@ -2200,12 +2159,8 @@ static void nand_set_defaults(struct nand_chip *this, int busw)
2200 2159
2201 if (!this->select_chip) 2160 if (!this->select_chip)
2202 this->select_chip = nand_select_chip; 2161 this->select_chip = nand_select_chip;
2203 if (!this->write_byte)
2204 this->write_byte = busw ? nand_write_byte16 : nand_write_byte;
2205 if (!this->read_byte) 2162 if (!this->read_byte)
2206 this->read_byte = busw ? nand_read_byte16 : nand_read_byte; 2163 this->read_byte = busw ? nand_read_byte16 : nand_read_byte;
2207 if (!this->write_word)
2208 this->write_word = nand_write_word;
2209 if (!this->read_word) 2164 if (!this->read_word)
2210 this->read_word = nand_read_word; 2165 this->read_word = nand_read_word;
2211 if (!this->block_bad) 2166 if (!this->block_bad)