18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * (C) Copyright TOSHIBA CORPORATION 2007
58c2ecf20Sopenharmony_ci */
68c2ecf20Sopenharmony_ci#ifndef __TXX9_NDFMC_H
78c2ecf20Sopenharmony_ci#define __TXX9_NDFMC_H
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#define NDFMC_PLAT_FLAG_USE_BSPRT	0x01
108c2ecf20Sopenharmony_ci#define NDFMC_PLAT_FLAG_NO_RSTR		0x02
118c2ecf20Sopenharmony_ci#define NDFMC_PLAT_FLAG_HOLDADD		0x04
128c2ecf20Sopenharmony_ci#define NDFMC_PLAT_FLAG_DUMMYWRITE	0x08
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_cistruct txx9ndfmc_platform_data {
158c2ecf20Sopenharmony_ci	unsigned int shift;
168c2ecf20Sopenharmony_ci	unsigned int gbus_clock;
178c2ecf20Sopenharmony_ci	unsigned int hold;		/* hold time in nanosecond */
188c2ecf20Sopenharmony_ci	unsigned int spw;		/* strobe pulse width in nanosecond */
198c2ecf20Sopenharmony_ci	unsigned int flags;
208c2ecf20Sopenharmony_ci	unsigned char ch_mask;		/* available channel bitmask */
218c2ecf20Sopenharmony_ci	unsigned char wp_mask;		/* write-protect bitmask */
228c2ecf20Sopenharmony_ci	unsigned char wide_mask;	/* 16bit-nand bitmask */
238c2ecf20Sopenharmony_ci};
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_civoid txx9_ndfmc_init(unsigned long baseaddr,
268c2ecf20Sopenharmony_ci		     const struct txx9ndfmc_platform_data *plat_data);
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci#endif /* __TXX9_NDFMC_H */
29