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; 32cd9d2305SAnton Vorontsov int (*dev_ready)(void); 33cd9d2305SAnton Vorontsov int chip_delay; 34*e1c3dbadSAnton Vorontsov 35*e1c3dbadSAnton Vorontsov /* no need to fill */ 36*e1c3dbadSAnton Vorontsov int last_ctrl; 37cd9d2305SAnton Vorontsov }; 38cd9d2305SAnton Vorontsov 39cd9d2305SAnton Vorontsov extern int fsl_upm_nand_init(struct nand_chip *chip, struct fsl_upm_nand *fun); 40cd9d2305SAnton Vorontsov 41cd9d2305SAnton Vorontsov #endif 42