]> bbs.cooldavid.org Git - net-next-2.6.git/blame - arch/arm/plat-pxa/include/plat/pxa3xx_nand.h
Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify
[net-next-2.6.git] / arch / arm / plat-pxa / include / plat / pxa3xx_nand.h
CommitLineData
fe69af00 1#ifndef __ASM_ARCH_PXA3XX_NAND_H
2#define __ASM_ARCH_PXA3XX_NAND_H
3
4#include <linux/mtd/mtd.h>
5#include <linux/mtd/partitions.h>
6
43035338
ES
7struct pxa3xx_nand_timing {
8 unsigned int tCH; /* Enable signal hold time */
9 unsigned int tCS; /* Enable signal setup time */
10 unsigned int tWH; /* ND_nWE high duration */
11 unsigned int tWP; /* ND_nWE pulse time */
12 unsigned int tRH; /* ND_nRE high duration */
13 unsigned int tRP; /* ND_nRE pulse width */
14 unsigned int tR; /* ND_nWE high to ND_nRE low for read */
15 unsigned int tWHR; /* ND_nWE high to ND_nRE low for status read */
16 unsigned int tAR; /* ND_ALE low to ND_nRE low delay */
17};
18
19struct pxa3xx_nand_cmdset {
20 uint16_t read1;
21 uint16_t read2;
22 uint16_t program;
23 uint16_t read_status;
24 uint16_t read_id;
25 uint16_t erase;
26 uint16_t reset;
27 uint16_t lock;
28 uint16_t unlock;
29 uint16_t lock_status;
30};
31
32struct pxa3xx_nand_flash {
c1f82478
LW
33 uint32_t chip_id;
34 unsigned int page_per_block; /* Pages per block (PG_PER_BLK) */
35 unsigned int page_size; /* Page size in bytes (PAGE_SZ) */
36 unsigned int flash_width; /* Width of Flash memory (DWIDTH_M) */
37 unsigned int dfc_width; /* Width of flash controller(DWIDTH_C) */
38 unsigned int num_blocks; /* Number of physical blocks in Flash */
39
40 struct pxa3xx_nand_cmdset *cmdset; /* NAND command set */
41 struct pxa3xx_nand_timing *timing; /* NAND Flash timing */
43035338
ES
42};
43
fe69af00 44struct pxa3xx_nand_platform_data {
45
46 /* the data flash bus is shared between the Static Memory
47 * Controller and the Data Flash Controller, the arbiter
48 * controls the ownership of the bus
49 */
50 int enable_arbiter;
51
f271049e
MR
52 /* allow platform code to keep OBM/bootloader defined NFC config */
53 int keep_config;
54
7dad482e
ES
55 const struct mtd_partition *parts;
56 unsigned int nr_parts;
c8ac3f81 57
c8c17c88 58 const struct pxa3xx_nand_flash * flash;
c8ac3f81 59 size_t num_flash;
fe69af00 60};
9ae819a8
EM
61
62extern void pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info);
fe69af00 63#endif /* __ASM_ARCH_PXA3XX_NAND_H */