conf/distro/jlime-donkey.conf : Added parted & Dialog to distro_rdepends
[vuplus_openembedded] / packages / linux / linux-openzaurus-2.6.18+git / tmio-nand-r7.patch
1  drivers/mtd/nand/Kconfig  |    7 
2  drivers/mtd/nand/Makefile |    1 
3  drivers/mtd/nand/tmio.c   |  554 ++++++++++++++++++++++++++++++++++++++++++++++
4  3 files changed, 562 insertions(+)
5
6 Index: git/drivers/mtd/nand/tmio.c
7 ===================================================================
8 --- /dev/null   1970-01-01 00:00:00.000000000 +0000
9 +++ git/drivers/mtd/nand/tmio.c 2006-11-07 23:31:12.000000000 +0000
10 @@ -0,0 +1,554 @@
11 +/*
12 + * A device driver for NAND flash connected to a Toshiba Mobile IO
13 + * controller. This is known to work with the following variants:
14 + *     TC6393XB revision 3
15 + *
16 + * Maintainer: Chris Humbert <mahadri+mtd@drigon.com>
17 + *
18 + * Copyright (C) 2005 Chris Humbert
19 + * Copyright (C) 2005 Dirk Opfer
20 + * Copyright (C) 2004 SHARP
21 + * Copyright (C) 2002 Lineo Japan, Inc.
22 + * Copyright (C) Ian Molton and Sebastian Carlier
23 + *
24 + * Based on Sharp's NAND driver, sharp_sl_tc6393.c
25 + *
26 + * This program is free software; you can redistribute it and/or modify
27 + * it under the terms of the GNU General Public License version 2 as
28 + * published by the Free Software Foundation.
29 + */
30 +
31 +#include <linux/module.h>
32 +#include <linux/types.h>
33 +#include <linux/delay.h>
34 +#include <linux/wait.h>
35 +#include <linux/ioport.h>
36 +#include <linux/mtd/mtd.h>
37 +#include <linux/mtd/nand.h>
38 +#include <linux/mtd/nand_ecc.h>
39 +#include <linux/mtd/partitions.h>
40 +#include <asm/io.h>
41 +#include <asm/hardware/tmio.h>
42 +
43 +#include <linux/interrupt.h>
44 +
45 +#define mtd_printk(level, mtd, format, arg...) \
46 +       printk (level "%s: " format, mtd->name, ## arg)
47 +#define mtd_warn(mtd, format, arg...)          \
48 +       mtd_printk (KERN_WARNING, mtd, format, ## arg)
49 +
50 +/*--------------------------------------------------------------------------*/
51 +
52 +/* tmio_nfcr.mode Register Command List */
53 +#define FCR_MODE_DATA          0x94    // Data Data_Mode
54 +#define FCR_MODE_COMMAND       0x95    // Data Command_Mode
55 +#define FCR_MODE_ADDRESS       0x96    // Data Address_Mode
56 +
57 +#define FCR_MODE_HWECC_CALC    0xB4    // HW-ECC Data
58 +#define FCR_MODE_HWECC_RESULT  0xD4    // HW-ECC Calculation Result Read_Mode
59 +#define FCR_MODE_HWECC_RESET   0xF4    // HW-ECC Reset
60 +
61 +#define FCR_MODE_POWER_ON      0x0C    // Power Supply ON  to SSFDC card
62 +#define FCR_MODE_POWER_OFF     0x08    // Power Supply OFF to SSFDC card
63 +
64 +#define FCR_MODE_LED_OFF       0x00    // LED OFF
65 +#define FCR_MODE_LED_ON                0x04    // LED ON
66 +
67 +#define FCR_MODE_EJECT_ON      0x68    // Ejection Demand from Penguin is Advanced
68 +#define FCR_MODE_EJECT_OFF     0x08    // Ejection Demand from Penguin is Not Advanced
69 +
70 +#define FCR_MODE_LOCK          0x6C    // Operates By Lock_Mode. Ejection Switch is Invalid
71 +#define FCR_MODE_UNLOCK                0x0C    // Operates By UnLock_Mode.Ejection Switch is Effective
72 +
73 +#define FCR_MODE_CONTROLLER_ID 0x40    // Controller ID Read
74 +#define FCR_MODE_STANDBY       0x00    // SSFDC card Changes Standby State
75 +
76 +#define FCR_MODE_WE            0x80
77 +#define FCR_MODE_ECC1          0x40
78 +#define FCR_MODE_ECC0          0x20
79 +#define FCR_MODE_CE            0x10
80 +#define FCR_MODE_PCNT1         0x08
81 +#define FCR_MODE_PCNT0         0x04
82 +#define FCR_MODE_ALE           0x02
83 +#define FCR_MODE_CLE           0x01
84 +
85 +#define FCR_STATUS_BUSY                0x80
86 +
87 +/*
88 + * NAND Flash Host Controller Configuration Register
89 + */
90 +struct tmio_nfhccr {
91 +       u8 x00[4];
92 +       u16     command;        /* 0x04 Command                         */
93 +       u8 x01[0x0a];
94 +       u16     base[2];        /* 0x10 NAND Flash Control Reg Base Addr*/
95 +       u8 x02[0x29];
96 +       u8      intp;           /* 0x3d Interrupt Pin                   */
97 +       u8 x03[0x0a];
98 +       u8      inte;           /* 0x48 Interrupt Enable                */
99 +       u8 x04;
100 +       u8      ec;             /* 0x4a Event Control                   */
101 +       u8 x05;
102 +       u8      icc;            /* 0x4c Internal Clock Control          */
103 +       u8 x06[0x0e];
104 +       u8      eccc;           /* 0x5b ECC Control                     */
105 +       u8 x07[4];
106 +       u8      nftc;           /* 0x60 NAND Flash Transaction Control  */
107 +       u8      nfm;            /* 0x61 NAND Flash Monitor              */
108 +       u8      nfpsc;          /* 0x62 NAND Flash Power Supply Control */
109 +       u8      nfdc;           /* 0x63 NAND Flash Detect Control       */
110 +       u8 x08[0x9c];
111 +} __attribute__ ((packed));
112 +
113 +/*
114 + * NAND Flash Control Register
115 + */
116 +struct tmio_nfcr {
117 +union {
118 +       u8      u8;             /* 0x00 Data Register                   */
119 +       u16     u16;
120 +       u32     u32;
121 +} __attribute__ ((packed));
122 +       u8      mode;           /* 0x04 Mode Register                   */
123 +       u8      status;         /* 0x05 Status Register                 */
124 +       u8      isr;            /* 0x06 Interrupt Status Register       */
125 +       u8      imr;            /* 0x07 Interrupt Mask Register         */
126 +} __attribute__ ((packed));
127 +
128 +struct tmio_nand {
129 +       struct mtd_info                 mtd;
130 +       struct nand_chip                chip;
131 +
132 +       struct tmio_nfhccr __iomem *    ccr;
133 +       struct tmio_nfcr __iomem *      fcr;
134 +
135 +       unsigned int                    irq;
136 +
137 +       /* for tmio_nand_read_byte */
138 +       u8                              read;
139 +       unsigned                        read_good:1;
140 +};
141 +
142 +#define mtd_to_tmio(m)                 container_of(m, struct tmio_nand, mtd)
143 +
144 +/*--------------------------------------------------------------------------*/
145 +
146 +static void tmio_nand_hwcontrol(struct mtd_info *mtd, int cmd,
147 +                                  unsigned int ctrl)
148 +{
149 +       struct tmio_nand *tmio = mtd_to_tmio (mtd);
150 +       struct tmio_nfcr __iomem *fcr = tmio->fcr;
151 +       struct nand_chip *chip = mtd->priv;
152 +
153 +       if (ctrl & NAND_CTRL_CHANGE) {
154 +               u8 mode;
155 +
156 +               if (ctrl & NAND_NCE) {
157 +                       mode = FCR_MODE_DATA;
158 +
159 +                       if (ctrl & NAND_CLE)
160 +                               mode |=  FCR_MODE_CLE;
161 +                       else
162 +                               mode &= ~FCR_MODE_CLE;
163 +
164 +                       if (ctrl & NAND_ALE)
165 +                               mode |=  FCR_MODE_ALE;
166 +                       else
167 +                               mode &= ~FCR_MODE_ALE;
168 +               } else {
169 +                       mode = FCR_MODE_STANDBY;
170 +               }
171 +
172 +               iowrite8 (mode, &fcr->mode);
173 +               tmio->read_good = 0;
174 +       }
175 +
176 +       if (cmd != NAND_CMD_NONE)
177 +               writeb(cmd, chip->IO_ADDR_W);
178 +}
179 +
180 +static int tmio_nand_dev_ready (struct mtd_info* mtd)
181 +{
182 +       struct tmio_nand*               tmio    = mtd_to_tmio (mtd);
183 +       struct tmio_nfcr __iomem *      fcr     = tmio->fcr;
184 +
185 +       return !(ioread8 (&fcr->status) & FCR_STATUS_BUSY);
186 +}
187 +
188 +static irqreturn_t tmio_irq (int irq, void *__tmio)
189 +{
190 +       struct tmio_nand*               tmio    = __tmio;
191 +       struct nand_chip*               this    = &tmio->chip;
192 +       struct tmio_nfcr __iomem *      fcr     = tmio->fcr;
193 +
194 +       /* disable RDYREQ interrupt */
195 +       iowrite8 (0x00, &fcr->imr);
196 +
197 +       if (unlikely (!waitqueue_active (&this->controller->wq)))
198 +               printk (KERN_WARNING TMIO_NAME_NAND ": spurious interrupt\n");
199 +
200 +       wake_up (&this->controller->wq);
201 +       return IRQ_HANDLED;
202 +}
203 +
204 +/*
205 + * The TMIO core has a RDYREQ interrupt on the posedge of #SMRB.
206 + * This interrupt is normally disabled, but for long operations like
207 + * erase and write, we enable it to wake us up.  The irq handler
208 + * disables the interrupt.
209 + */
210 +static int
211 +tmio_nand_wait (struct mtd_info *mtd, struct nand_chip *this)
212 +{
213 +       struct tmio_nand*               tmio    = mtd_to_tmio (mtd);
214 +       struct tmio_nfcr __iomem *      fcr     = tmio->fcr;
215 +       long                            timeout;
216 +
217 +       /* enable RDYREQ interrupt */
218 +       iowrite8 (0x0f, &fcr->isr);
219 +       iowrite8 (0x81, &fcr->imr);
220 +
221 +       timeout = wait_event_timeout (this->controller->wq, tmio_nand_dev_ready (mtd),
222 +                       msecs_to_jiffies (this->state == FL_ERASING ? 400 : 20));
223 +
224 +       if (unlikely (!tmio_nand_dev_ready (mtd))) {
225 +               iowrite8 (0x00, &fcr->imr);
226 +               mtd_warn (mtd, "still busy with %s after %d ms\n",
227 +                               this->state == FL_ERASING ? "erase" : "program",
228 +                               this->state == FL_ERASING ? 400 : 20);
229 +
230 +       } else if (unlikely (!timeout)) {
231 +               iowrite8 (0x00, &fcr->imr);
232 +               mtd_warn (mtd, "timeout waiting for interrupt\n");
233 +       }
234 +
235 +       this->cmdfunc (mtd, NAND_CMD_STATUS, -1, -1);
236 +       return this->read_byte (mtd);
237 +}
238 +
239 +/*
240 + * The TMIO controller combines two 8-bit data bytes into one 16-bit
241 + * word. This function separates them so nand_base.c works as expected,
242 + * especially its NAND_CMD_READID routines.
243 + *
244 + * To prevent stale data from being read, tmio_nand_hwcontrol() clears
245 + * tmio->read_good.
246 + */
247 +static u_char tmio_nand_read_byte (struct mtd_info *mtd)
248 +{
249 +       struct tmio_nand*               tmio    = mtd_to_tmio (mtd);
250 +       struct tmio_nfcr __iomem *      fcr     = tmio->fcr;
251 +       unsigned int                    data;
252 +
253 +       if (tmio->read_good--)
254 +               return tmio->read;
255 +
256 +       data            = ioread16 (&fcr->u16);
257 +       tmio->read      = data >> 8;
258 +       return data;
259 +}
260 +
261 +/*
262 + * The TMIO controller converts an 8-bit NAND interface to a 16-bit
263 + * bus interface, so all data reads and writes must be 16-bit wide.
264 + * Thus, we implement 16-bit versions of the read, write, and verify
265 + * buffer functions.
266 + */
267 +static void
268 +tmio_nand_write_buf (struct mtd_info *mtd, const u_char *buf, int len)
269 +{
270 +       struct tmio_nand*               tmio    = mtd_to_tmio (mtd);
271 +       struct tmio_nfcr __iomem *      fcr     = tmio->fcr;
272 +
273 +       iowrite16_rep (&fcr->u16, buf, len >> 1);
274 +}
275 +
276 +static void tmio_nand_read_buf (struct mtd_info *mtd, u_char *buf, int len)
277 +{
278 +       struct tmio_nand*               tmio    = mtd_to_tmio (mtd);
279 +       struct tmio_nfcr __iomem *      fcr     = tmio->fcr;
280 +
281 +       ioread16_rep (&fcr->u16, buf, len >> 1);
282 +}
283 +
284 +static int
285 +tmio_nand_verify_buf (struct mtd_info *mtd, const u_char *buf, int len)
286 +{
287 +       struct tmio_nand*               tmio    = mtd_to_tmio (mtd);
288 +       struct tmio_nfcr __iomem *      fcr     = tmio->fcr;
289 +       u16*                            p       = (u16*) buf;
290 +
291 +       for (len >>= 1; len; len--)
292 +               if (*(p++) != ioread16 (&fcr->u16))
293 +                       return -EFAULT;
294 +       return 0;
295 +}
296 +
297 +static void tmio_nand_enable_hwecc (struct mtd_info* mtd, int mode)
298 +{
299 +       struct tmio_nand*               tmio    = mtd_to_tmio (mtd);
300 +       struct tmio_nfcr __iomem *      fcr     = tmio->fcr;
301 +
302 +       iowrite8 (FCR_MODE_HWECC_RESET, &fcr->mode);
303 +       ioread8 (&fcr->u8);     /* dummy read */
304 +       iowrite8 (FCR_MODE_HWECC_CALC, &fcr->mode);
305 +}
306 +
307 +static int tmio_nand_calculate_ecc (struct mtd_info* mtd, const u_char* dat,
308 +                                                       u_char* ecc_code)
309 +{
310 +       struct tmio_nand*               tmio    = mtd_to_tmio (mtd);
311 +       struct tmio_nfcr __iomem *      fcr     = tmio->fcr;
312 +       unsigned int                    ecc;
313 +
314 +       iowrite8 (FCR_MODE_HWECC_RESULT, &fcr->mode);
315 +
316 +       ecc = ioread16 (&fcr->u16);
317 +       ecc_code[1] = ecc;      // 000-255 LP7-0
318 +       ecc_code[0] = ecc >> 8; // 000-255 LP15-8
319 +       ecc = ioread16 (&fcr->u16);
320 +       ecc_code[2] = ecc;      // 000-255 CP5-0,11b
321 +       ecc_code[4] = ecc >> 8; // 256-511 LP7-0
322 +       ecc = ioread16 (&fcr->u16);
323 +       ecc_code[3] = ecc;      // 256-511 LP15-8
324 +       ecc_code[5] = ecc >> 8; // 256-511 CP5-0,11b
325 +
326 +       iowrite8 (FCR_MODE_DATA, &fcr->mode);
327 +       return 0;
328 +}
329 +
330 +static void tmio_hw_init (struct device *dev, struct tmio_nand *tmio)
331 +{
332 +       struct resource*                nfcr    = tmio_resource_control (dev);
333 +       struct tmio_device*             tdev    = dev_to_tdev (dev);
334 +       struct tmio_nfhccr __iomem *    ccr     = tmio->ccr;
335 +       struct tmio_nfcr __iomem *      fcr     = tmio->fcr;
336 +       unsigned long                   base;
337 +
338 +       /* (89h) SMD Buffer ON By TC6393XB SystemConfig gpibfc1 */
339 +       tdev->ops->clock (dev, 1);
340 +       tdev->ops->function (dev, 1);
341 +
342 +       /* (4Ch) CLKRUN Enable    1st spcrunc */
343 +       iowrite8 (0x81,                 &ccr->icc);
344 +
345 +       /* (10h)BaseAddress    0x1000 spba.spba2 */
346 +       base = nfcr->start - tdev->iomem->start;
347 +       iowrite16 (base,                ccr->base + 0);
348 +       iowrite16 (base >> 16,          ccr->base + 1);
349 +
350 +       /* (04h)Command Register I/O spcmd */
351 +       iowrite8 (0x02,                 &ccr->command);
352 +
353 +       /* (62h) Power Supply Control ssmpwc */
354 +       /* HardPowerOFF - SuspendOFF - PowerSupplyWait_4MS */
355 +       iowrite8 (0x02,                 &ccr->nfpsc);
356 +
357 +       /* (63h) Detect Control ssmdtc */
358 +       iowrite8 (0x02,                 &ccr->nfdc);
359 +
360 +       /* Interrupt status register clear sintst */
361 +       iowrite8 (0x0f,                 &fcr->isr);
362 +
363 +       /* After power supply, Media are reset smode */
364 +       iowrite8 (FCR_MODE_POWER_ON,    &fcr->mode);
365 +       iowrite8 (FCR_MODE_COMMAND,     &fcr->mode);
366 +       iowrite8 (NAND_CMD_RESET,       &fcr->u8);
367 +
368 +       /* Standby Mode smode */
369 +       iowrite8 (FCR_MODE_STANDBY,     &fcr->mode);
370 +
371 +       mdelay (5);
372 +}
373 +
374 +static void tmio_hw_stop (struct device *dev, struct tmio_nand *tmio)
375 +{
376 +       struct tmio_device*             tdev    = dev_to_tdev (dev);
377 +       struct tmio_nfcr __iomem *      fcr     = tmio->fcr;
378 +
379 +       iowrite8 (FCR_MODE_POWER_OFF,   &fcr->mode);
380 +       tdev->ops->function (dev, 0);
381 +       tdev->ops->clock (dev, 0);
382 +}
383 +
384 +/*--------------------------------------------------------------------------*/
385 +
386 +#ifdef CONFIG_MTD_PARTITIONS
387 +static const char *part_probes[] = { "cmdlinepart", NULL };
388 +#endif
389 +
390 +static int tmio_probe (struct device *dev)
391 +{
392 +       struct tmio_device*             tdev    = dev_to_tdev (dev);
393 +       struct tmio_nand_platform_data* tnpd    = dev->platform_data;
394 +       struct resource*                ccr     = tmio_resource_config (dev);
395 +       struct resource*                fcr     = tmio_resource_control (dev);
396 +       struct resource*                irq     = tmio_resource_irq (dev);
397 +       struct tmio_nand*               tmio;
398 +       struct mtd_info*                mtd;
399 +       struct nand_chip*               this;
400 +       struct mtd_partition*           parts;
401 +       int                             nbparts = 0;
402 +       int                             retval;
403 +
404 +       if (!tnpd)
405 +               return -EINVAL;
406 +
407 +       retval = request_resource (tdev->iomem, ccr);
408 +       if (retval)
409 +               goto err_request_ccr;
410 +
411 +       retval = request_resource (tdev->iomem, fcr);
412 +       if (retval)
413 +               goto err_request_fcr;
414 +
415 +       tmio = kzalloc (sizeof *tmio, GFP_KERNEL);
416 +       if (!tmio) {
417 +               retval = -ENOMEM;
418 +               goto err_kzalloc;
419 +       }
420 +
421 +       dev_set_drvdata (dev, tmio);
422 +       mtd             = &tmio->mtd;
423 +       this            = &tmio->chip;
424 +       mtd->priv       = this;
425 +       mtd->name       = TMIO_NAME_NAND;
426 +
427 +       tmio->ccr = ioremap (ccr->start, ccr->end - ccr->start + 1);
428 +       if (!tmio->ccr) {
429 +               retval = -EIO;
430 +               goto err_iomap_ccr;
431 +       }
432 +
433 +       tmio->fcr = ioremap (fcr->start, fcr->end - fcr->start + 1);
434 +       if (!tmio->fcr) {
435 +               retval = -EIO;
436 +               goto err_iomap_fcr;
437 +       }
438 +
439 +       tmio_hw_init (dev, tmio);
440 +
441 +       /* Set address of NAND IO lines */
442 +       this->IO_ADDR_R         = tmio->fcr;
443 +       this->IO_ADDR_W         = tmio->fcr;
444 +
445 +       /* Set address of hardware control function */
446 +       this->cmd_ctrl          = tmio_nand_hwcontrol;
447 +       this->dev_ready         = tmio_nand_dev_ready;
448 +       this->read_byte         = tmio_nand_read_byte;
449 +       this->write_buf         = tmio_nand_write_buf;
450 +       this->read_buf          = tmio_nand_read_buf;
451 +       this->verify_buf        = tmio_nand_verify_buf;
452 +
453 +       /* set eccmode using hardware ECC */
454 +       this->ecc.mode          = NAND_ECC_HW;
455 +       this->ecc.size          = 512;
456 +       this->ecc.bytes         = 6;
457 +       this->ecc.hwctl         = tmio_nand_enable_hwecc;
458 +       this->ecc.calculate     = tmio_nand_calculate_ecc;
459 +       this->ecc.correct       = nand_correct_data;
460 +       this->badblock_pattern  = tnpd->badblock_pattern;
461 +
462 +       /* 15 us command delay time */
463 +       this->chip_delay        = 15;
464 +
465 +       if (irq->start) {
466 +               retval = request_irq (irq->start, &tmio_irq,
467 +                                       SA_INTERRUPT, irq->name, tmio);
468 +               if (!retval) {
469 +                       tmio->irq       = irq->start;
470 +                       this->waitfunc  = tmio_nand_wait;
471 +               } else
472 +                       mtd_warn (mtd, "request_irq error %d\n", retval);
473 +       }
474 +
475 +       /* Scan to find existence of the device */
476 +       if (nand_scan (mtd, 1)) {
477 +               retval = -ENODEV;
478 +               goto err_scan;
479 +       }
480 +
481 +       /* Register the partitions */
482 +#ifdef CONFIG_MTD_PARTITIONS
483 +       nbparts = parse_mtd_partitions (mtd, part_probes, &parts, 0);
484 +#endif
485 +       if (nbparts <= 0) {
486 +               parts   = tnpd->partition;
487 +               nbparts = tnpd->num_partitions;
488 +       }
489 +
490 +       add_mtd_partitions (mtd, parts, nbparts);
491 +       return 0;
492 +
493 +err_scan:
494 +       if (tmio->irq)
495 +               free_irq (tmio->irq, tmio);
496 +       tmio_hw_stop (dev, tmio);
497 +       iounmap (tmio->fcr);
498 +err_iomap_fcr:
499 +       iounmap (tmio->ccr);
500 +err_iomap_ccr:
501 +       kfree (tmio);
502 +err_kzalloc:
503 +       release_resource (fcr);
504 +err_request_fcr:
505 +       release_resource (ccr);
506 +err_request_ccr:
507 +       return retval;
508 +}
509 +
510 +static int tmio_remove (struct device *dev)
511 +{
512 +       struct tmio_nand*               tmio    = dev_get_drvdata (dev);
513 +
514 +       nand_release (&tmio->mtd);
515 +       if (tmio->irq)
516 +               free_irq (tmio->irq, tmio);
517 +       tmio_hw_stop (dev, tmio);
518 +       iounmap (tmio->fcr);
519 +       iounmap (tmio->ccr);
520 +       kfree (tmio);
521 +       release_resource (tmio_resource_control (dev));
522 +       release_resource (tmio_resource_config (dev));
523 +       return 0;
524 +}
525 +
526 +#ifdef CONFIG_PM
527 +static int tmio_suspend (struct device *dev, pm_message_t state)
528 +{
529 +       tmio_hw_stop (dev, dev_get_drvdata (dev));
530 +       return 0;
531 +}
532 +
533 +static int tmio_resume (struct device *dev)
534 +{
535 +       tmio_hw_init (dev, dev_get_drvdata (dev));
536 +       return 0;
537 +}
538 +#endif
539 +
540 +static struct device_driver tmio_driver = {
541 +       .name           = TMIO_NAME_NAND,
542 +       .bus            = &tmio_bus_type,
543 +       .probe          = tmio_probe,
544 +       .remove         = tmio_remove,
545 +#ifdef CONFIG_PM
546 +       .suspend        = tmio_suspend,
547 +       .resume         = tmio_resume,
548 +#endif
549 +};
550 +
551 +static int __init tmio_init (void) {
552 +       return driver_register (&tmio_driver);
553 +}
554 +
555 +static void __exit tmio_exit (void) {
556 +       driver_unregister (&tmio_driver);
557 +}
558 +
559 +module_init (tmio_init);
560 +module_exit (tmio_exit);
561 +
562 +MODULE_LICENSE ("GPL");
563 +MODULE_AUTHOR ("Dirk Opfer, Chris Humbert");
564 +MODULE_DESCRIPTION ("NAND flash driver on Toshiba Mobile IO controller");
565 Index: git/drivers/mtd/nand/Kconfig
566 ===================================================================
567 --- git.orig/drivers/mtd/nand/Kconfig   2006-10-31 16:09:03.000000000 +0000
568 +++ git/drivers/mtd/nand/Kconfig        2006-11-07 22:13:09.000000000 +0000
569 @@ -63,6 +63,13 @@ config MTD_NAND_AMS_DELTA
570         help
571           Support for NAND flash on Amstrad E3 (Delta).
572  
573 +config MTD_NAND_TMIO
574 +       tristate "NAND Flash device on Toshiba Mobile IO Controller"
575 +       depends on MTD_NAND && TOSHIBA_TC6393XB
576 +       help
577 +         Support for NAND flash connected to a Toshiba Mobile IO
578 +         Controller in some PDAs, including the Sharp SL6000x.
579 +
580  config MTD_NAND_TOTO
581         tristate "NAND Flash device on TOTO board"
582         depends on ARCH_OMAP && MTD_NAND && BROKEN
583 Index: git/drivers/mtd/nand/Makefile
584 ===================================================================
585 --- git.orig/drivers/mtd/nand/Makefile  2006-10-31 16:09:03.000000000 +0000
586 +++ git/drivers/mtd/nand/Makefile       2006-11-07 22:13:09.000000000 +0000
587 @@ -22,5 +22,6 @@ obj-$(CONFIG_MTD_NAND_TS7250)         += ts7250
588  obj-$(CONFIG_MTD_NAND_NANDSIM)         += nandsim.o
589  obj-$(CONFIG_MTD_NAND_CS553X)          += cs553x_nand.o
590  obj-$(CONFIG_MTD_NAND_NDFC)            += ndfc.o
591 +obj-$(CONFIG_MTD_NAND_TMIO)            += tmio.o
592  
593  nand-objs = nand_base.o nand_bbt.o