diff options
author | Enrico Scholz <enrico.scholz@sigma-chemnitz.de> | 2008-08-29 06:57:28 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-09-01 16:27:32 -0400 |
commit | 43035338ad772b6a4097b2ac530b75390bee87c1 (patch) | |
tree | 6c3c65210f7e0395b49b2cdd5a3e09b5e999c603 /arch/arm/mach-pxa | |
parent | 5e706469a0518ec640a122aa5da22035e2af003a (diff) |
[MTD] [NAND] pxa3xx_nand: moved nand definitions into shared platform header
This patch moves the exported datastructures from the pxa3xx_nand.c driver
into the <mach/pxa3xx_nand.h> header. This is a plain movement without
any modification of the attributes.
This is the first one of a set of patches which:
* allows to specify used NAND flash in the platform code and allows to turn
off the old way to specify NAND characteristics in the driver. This way did
not worked well as these characteristics depend on the platform and can not be
derived from NAND id alone.
E.g. some NAND chips share the same ID (e.g. K9K8G08U0A and K9NBG08U5A) but
have different timings (which are written in the common driver currently and
must be modified there).
* adds 'const' annotations at various places
Further patches will be sent to the mtd-list.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/include/mach/pxa3xx_nand.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h b/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h index eb4b190b6657..0dc50d82ea73 100644 --- a/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h +++ b/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h | |||
@@ -4,6 +4,50 @@ | |||
4 | #include <linux/mtd/mtd.h> | 4 | #include <linux/mtd/mtd.h> |
5 | #include <linux/mtd/partitions.h> | 5 | #include <linux/mtd/partitions.h> |
6 | 6 | ||
7 | struct 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 | |||
19 | struct 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 | |||
32 | struct pxa3xx_nand_flash { | ||
33 | struct pxa3xx_nand_timing *timing; /* NAND Flash timing */ | ||
34 | struct pxa3xx_nand_cmdset *cmdset; | ||
35 | |||
36 | uint32_t page_per_block;/* Pages per block (PG_PER_BLK) */ | ||
37 | uint32_t page_size; /* Page size in bytes (PAGE_SZ) */ | ||
38 | uint32_t flash_width; /* Width of Flash memory (DWIDTH_M) */ | ||
39 | uint32_t dfc_width; /* Width of flash controller(DWIDTH_C) */ | ||
40 | uint32_t num_blocks; /* Number of physical blocks in Flash */ | ||
41 | uint32_t chip_id; | ||
42 | |||
43 | /* NOTE: these are automatically calculated, do not define */ | ||
44 | size_t oob_size; | ||
45 | size_t read_id_bytes; | ||
46 | |||
47 | unsigned int col_addr_cycles; | ||
48 | unsigned int row_addr_cycles; | ||
49 | }; | ||
50 | |||
7 | struct pxa3xx_nand_platform_data { | 51 | struct pxa3xx_nand_platform_data { |
8 | 52 | ||
9 | /* the data flash bus is shared between the Static Memory | 53 | /* the data flash bus is shared between the Static Memory |