2008-02-14 07:48:23 +00:00
|
|
|
#ifndef __ASM_ARCH_PXA3XX_NAND_H
|
|
|
|
#define __ASM_ARCH_PXA3XX_NAND_H
|
|
|
|
|
|
|
|
#include <linux/mtd/mtd.h>
|
|
|
|
#include <linux/mtd/partitions.h>
|
|
|
|
|
2008-08-29 10:57:28 +00:00
|
|
|
struct pxa3xx_nand_timing {
|
|
|
|
unsigned int tCH; /* Enable signal hold time */
|
|
|
|
unsigned int tCS; /* Enable signal setup time */
|
|
|
|
unsigned int tWH; /* ND_nWE high duration */
|
|
|
|
unsigned int tWP; /* ND_nWE pulse time */
|
|
|
|
unsigned int tRH; /* ND_nRE high duration */
|
|
|
|
unsigned int tRP; /* ND_nRE pulse width */
|
|
|
|
unsigned int tR; /* ND_nWE high to ND_nRE low for read */
|
|
|
|
unsigned int tWHR; /* ND_nWE high to ND_nRE low for status read */
|
|
|
|
unsigned int tAR; /* ND_ALE low to ND_nRE low delay */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct pxa3xx_nand_cmdset {
|
|
|
|
uint16_t read1;
|
|
|
|
uint16_t read2;
|
|
|
|
uint16_t program;
|
|
|
|
uint16_t read_status;
|
|
|
|
uint16_t read_id;
|
|
|
|
uint16_t erase;
|
|
|
|
uint16_t reset;
|
|
|
|
uint16_t lock;
|
|
|
|
uint16_t unlock;
|
|
|
|
uint16_t lock_status;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct pxa3xx_nand_flash {
|
2008-08-29 10:59:50 +00:00
|
|
|
const struct pxa3xx_nand_timing *timing; /* NAND Flash timing */
|
|
|
|
const struct pxa3xx_nand_cmdset *cmdset;
|
2008-08-29 10:57:28 +00:00
|
|
|
|
|
|
|
uint32_t page_per_block;/* Pages per block (PG_PER_BLK) */
|
|
|
|
uint32_t page_size; /* Page size in bytes (PAGE_SZ) */
|
|
|
|
uint32_t flash_width; /* Width of Flash memory (DWIDTH_M) */
|
|
|
|
uint32_t dfc_width; /* Width of flash controller(DWIDTH_C) */
|
|
|
|
uint32_t num_blocks; /* Number of physical blocks in Flash */
|
|
|
|
uint32_t chip_id;
|
|
|
|
};
|
|
|
|
|
2008-02-14 07:48:23 +00:00
|
|
|
struct pxa3xx_nand_platform_data {
|
|
|
|
|
|
|
|
/* the data flash bus is shared between the Static Memory
|
|
|
|
* Controller and the Data Flash Controller, the arbiter
|
|
|
|
* controls the ownership of the bus
|
|
|
|
*/
|
|
|
|
int enable_arbiter;
|
|
|
|
|
2009-02-17 11:54:47 +00:00
|
|
|
/* allow platform code to keep OBM/bootloader defined NFC config */
|
|
|
|
int keep_config;
|
|
|
|
|
2008-08-29 10:59:50 +00:00
|
|
|
const struct mtd_partition *parts;
|
|
|
|
unsigned int nr_parts;
|
2008-08-29 10:59:48 +00:00
|
|
|
|
2008-08-29 10:59:51 +00:00
|
|
|
const struct pxa3xx_nand_flash * flash;
|
2008-08-29 10:59:48 +00:00
|
|
|
size_t num_flash;
|
2008-02-14 07:48:23 +00:00
|
|
|
};
|
2008-06-02 07:22:03 +00:00
|
|
|
|
|
|
|
extern void pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info);
|
2008-02-14 07:48:23 +00:00
|
|
|
#endif /* __ASM_ARCH_PXA3XX_NAND_H */
|