Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 1 | /* |
Stefan Weil | 947af29 | 2010-01-07 00:03:52 +0100 | [diff] [blame] | 2 | * BF5XX - NAND flash controller platform_device info |
Bryan Wu | b37bde1 | 2007-10-02 13:56:05 -0700 | [diff] [blame] | 3 | * |
Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 4 | * Copyright 2007-2008 Analog Devices, Inc. |
| 5 | * |
| 6 | * Licensed under the GPL-2 |
Bryan Wu | b37bde1 | 2007-10-02 13:56:05 -0700 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | /* struct bf5xx_nand_platform |
| 10 | * |
Stefan Weil | 947af29 | 2010-01-07 00:03:52 +0100 | [diff] [blame] | 11 | * define a interface between platform board specific code and |
Bryan Wu | b37bde1 | 2007-10-02 13:56:05 -0700 | [diff] [blame] | 12 | * bf54x NFC driver. |
| 13 | * |
| 14 | * nr_partitions = number of partitions pointed to be partitoons (or zero) |
| 15 | * partitions = mtd partition list |
| 16 | */ |
| 17 | |
Bryan Wu | b37bde1 | 2007-10-02 13:56:05 -0700 | [diff] [blame] | 18 | #define NFC_PG_SIZE_OFFSET 9 |
| 19 | |
| 20 | #define NFC_NWIDTH_8 0 |
| 21 | #define NFC_NWIDTH_16 1 |
| 22 | #define NFC_NWIDTH_OFFSET 8 |
| 23 | |
| 24 | #define NFC_RDDLY_OFFSET 4 |
| 25 | #define NFC_WRDLY_OFFSET 0 |
| 26 | |
| 27 | #define NFC_STAT_NBUSY 1 |
| 28 | |
| 29 | struct bf5xx_nand_platform { |
| 30 | /* NAND chip information */ |
Bryan Wu | b37bde1 | 2007-10-02 13:56:05 -0700 | [diff] [blame] | 31 | unsigned short data_width; |
| 32 | |
| 33 | /* RD/WR strobe delay timing information, all times in SCLK cycles */ |
| 34 | unsigned short rd_dly; |
| 35 | unsigned short wr_dly; |
| 36 | |
| 37 | /* NAND MTD partition information */ |
| 38 | int nr_partitions; |
| 39 | struct mtd_partition *partitions; |
| 40 | }; |