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