| 
									
										
										
										
											2008-02-14 15:48:23 +08: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 12:57:28 +02: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_flash { | 
					
						
							| 
									
										
										
										
											2011-03-03 11:27:01 +08:00
										 |  |  | 	char		*name; | 
					
						
							| 
									
										
										
										
											2010-08-17 13:50:23 +08:00
										 |  |  | 	uint32_t	chip_id; | 
					
						
							|  |  |  | 	unsigned int	page_per_block; /* Pages per block (PG_PER_BLK) */ | 
					
						
							|  |  |  | 	unsigned int	page_size;	/* Page size in bytes (PAGE_SZ) */ | 
					
						
							|  |  |  | 	unsigned int	flash_width;	/* Width of Flash memory (DWIDTH_M) */ | 
					
						
							|  |  |  | 	unsigned int	dfc_width;	/* Width of flash controller(DWIDTH_C) */ | 
					
						
							|  |  |  | 	unsigned int	num_blocks;	/* Number of physical blocks in Flash */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	struct pxa3xx_nand_timing *timing;	/* NAND Flash timing */ | 
					
						
							| 
									
										
										
										
											2008-08-29 12:57:28 +02:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-07-14 20:44:33 -07:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Current pxa3xx_nand controller has two chip select which | 
					
						
							|  |  |  |  * both be workable. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Notice should be taken that: | 
					
						
							|  |  |  |  * When you want to use this feature, you should not enable the | 
					
						
							|  |  |  |  * keep configuration feature, for two chip select could be | 
					
						
							|  |  |  |  * attached with different nand chip. The different page size | 
					
						
							|  |  |  |  * and timing requirement make the keep configuration impossible. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* The max num of chip select current support */ | 
					
						
							|  |  |  | #define NUM_CHIP_SELECT		(2)
 | 
					
						
							| 
									
										
										
										
											2008-02-14 15:48:23 +08: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 13:54:47 +02:00
										 |  |  | 	/* allow platform code to keep OBM/bootloader defined NFC config */ | 
					
						
							|  |  |  | 	int	keep_config; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-07-14 20:44:33 -07:00
										 |  |  | 	/* indicate how many chip selects will be used */ | 
					
						
							|  |  |  | 	int	num_cs; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-11-14 18:25:28 -03:00
										 |  |  | 	/* use an flash-based bad block table */ | 
					
						
							|  |  |  | 	bool	flash_bbt; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-05-14 14:58:08 -03:00
										 |  |  | 	/* requested ECC strength and ECC step size */ | 
					
						
							|  |  |  | 	int ecc_strength, ecc_step_size; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-07-14 20:44:33 -07:00
										 |  |  | 	const struct mtd_partition		*parts[NUM_CHIP_SELECT]; | 
					
						
							|  |  |  | 	unsigned int				nr_parts[NUM_CHIP_SELECT]; | 
					
						
							| 
									
										
										
										
											2008-08-29 12:59:48 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-08-29 12:59:51 +02:00
										 |  |  | 	const struct pxa3xx_nand_flash * 	flash; | 
					
						
							| 
									
										
										
										
											2008-08-29 12:59:48 +02:00
										 |  |  | 	size_t					num_flash; | 
					
						
							| 
									
										
										
										
											2008-02-14 15:48:23 +08:00
										 |  |  | }; | 
					
						
							| 
									
										
										
										
											2008-06-02 15:22:03 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | extern void pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info); | 
					
						
							| 
									
										
										
										
											2008-02-14 15:48:23 +08:00
										 |  |  | #endif /* __ASM_ARCH_PXA3XX_NAND_H */
 |