xref: /rk3399_rockchip-uboot/include/linux/mtd/fsl_upm.h (revision e93c1c169d49eda7babad9c781f541e2e34f0ff0)
1cd9d2305SAnton Vorontsov /*
2cd9d2305SAnton Vorontsov  * FSL UPM NAND driver
3cd9d2305SAnton Vorontsov  *
4cd9d2305SAnton Vorontsov  * Copyright (C) 2007 MontaVista Software, Inc.
5cd9d2305SAnton Vorontsov  *                    Anton Vorontsov <avorontsov@ru.mvista.com>
6cd9d2305SAnton Vorontsov  *
7cd9d2305SAnton Vorontsov  * This program is free software; you can redistribute it and/or
8cd9d2305SAnton Vorontsov  * modify it under the terms of the GNU General Public License as
9cd9d2305SAnton Vorontsov  * published by the Free Software Foundation; either version 2 of
10cd9d2305SAnton Vorontsov  * the License, or (at your option) any later version.
11cd9d2305SAnton Vorontsov  */
12cd9d2305SAnton Vorontsov 
13cd9d2305SAnton Vorontsov #ifndef __LINUX_MTD_NAND_FSL_UPM
14cd9d2305SAnton Vorontsov #define __LINUX_MTD_NAND_FSL_UPM
15cd9d2305SAnton Vorontsov 
16cd9d2305SAnton Vorontsov #include <linux/mtd/nand.h>
17cd9d2305SAnton Vorontsov 
18cd9d2305SAnton Vorontsov struct fsl_upm {
19cd9d2305SAnton Vorontsov 	void __iomem *mdr;
20cd9d2305SAnton Vorontsov 	void __iomem *mxmr;
21cd9d2305SAnton Vorontsov 	void __iomem *mar;
22cd9d2305SAnton Vorontsov 	void __iomem *io_addr;
23cd9d2305SAnton Vorontsov };
24cd9d2305SAnton Vorontsov 
25cd9d2305SAnton Vorontsov struct fsl_upm_nand {
26cd9d2305SAnton Vorontsov 	struct fsl_upm upm;
27cd9d2305SAnton Vorontsov 
28cd9d2305SAnton Vorontsov 	int width;
29cd9d2305SAnton Vorontsov 	int upm_cmd_offset;
30cd9d2305SAnton Vorontsov 	int upm_addr_offset;
31cd9d2305SAnton Vorontsov 	int wait_pattern;
32*e93c1c16SWolfgang Grandegger 	int (*dev_ready)(int chip_nr);
33cd9d2305SAnton Vorontsov 	int chip_delay;
34*e93c1c16SWolfgang Grandegger 	int chip_offset;
35*e93c1c16SWolfgang Grandegger 	int chip_nr;
36e1c3dbadSAnton Vorontsov 
37e1c3dbadSAnton Vorontsov 	/* no need to fill */
38e1c3dbadSAnton Vorontsov 	int last_ctrl;
39cd9d2305SAnton Vorontsov };
40cd9d2305SAnton Vorontsov 
41cd9d2305SAnton Vorontsov extern int fsl_upm_nand_init(struct nand_chip *chip, struct fsl_upm_nand *fun);
42cd9d2305SAnton Vorontsov 
43cd9d2305SAnton Vorontsov #endif
44