2008-01-14 20:09:32 +00:00
|
|
|
/*
|
|
|
|
* FSL UPM NAND driver
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 MontaVista Software, Inc.
|
|
|
|
* Anton Vorontsov <avorontsov@ru.mvista.com>
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2008-01-14 20:09:32 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __LINUX_MTD_NAND_FSL_UPM
|
|
|
|
#define __LINUX_MTD_NAND_FSL_UPM
|
|
|
|
|
2017-11-30 04:45:24 +00:00
|
|
|
#include <linux/mtd/rawnand.h>
|
2008-01-14 20:09:32 +00:00
|
|
|
|
2009-02-11 17:38:23 +00:00
|
|
|
#define FSL_UPM_WAIT_RUN_PATTERN 0x1
|
|
|
|
#define FSL_UPM_WAIT_WRITE_BYTE 0x2
|
|
|
|
#define FSL_UPM_WAIT_WRITE_BUFFER 0x4
|
|
|
|
|
2008-01-14 20:09:32 +00:00
|
|
|
struct fsl_upm {
|
|
|
|
void __iomem *mdr;
|
|
|
|
void __iomem *mxmr;
|
|
|
|
void __iomem *mar;
|
|
|
|
void __iomem *io_addr;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct fsl_upm_nand {
|
|
|
|
struct fsl_upm upm;
|
|
|
|
|
|
|
|
int width;
|
|
|
|
int upm_cmd_offset;
|
|
|
|
int upm_addr_offset;
|
2009-02-11 17:38:22 +00:00
|
|
|
int upm_mar_chip_offset;
|
2009-02-11 17:38:23 +00:00
|
|
|
int wait_flags;
|
2009-02-11 17:38:21 +00:00
|
|
|
int (*dev_ready)(int chip_nr);
|
2008-01-14 20:09:32 +00:00
|
|
|
int chip_delay;
|
2009-02-11 17:38:21 +00:00
|
|
|
int chip_offset;
|
|
|
|
int chip_nr;
|
2008-06-12 16:10:21 +00:00
|
|
|
|
|
|
|
/* no need to fill */
|
|
|
|
int last_ctrl;
|
2008-01-14 20:09:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern int fsl_upm_nand_init(struct nand_chip *chip, struct fsl_upm_nand *fun);
|
|
|
|
|
|
|
|
#endif
|