2007-08-11 03:26:18 +09:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
|
|
|
|
*
|
|
|
|
* Parts shamelesly stolen from Linux Kernel source tree.
|
|
|
|
*
|
|
|
|
* ------------------------------------------------------------
|
|
|
|
*
|
2013-07-08 16:37:19 +09:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2007-08-11 03:26:18 +09:00
|
|
|
*/
|
|
|
|
#ifndef _NAND_DEFS_H_
|
|
|
|
#define _NAND_DEFS_H_
|
|
|
|
|
|
|
|
#include <asm/arch/hardware.h>
|
|
|
|
|
2009-09-19 06:30:05 +09:00
|
|
|
#ifdef CONFIG_SOC_DM646X
|
2009-05-10 01:35:20 +09:00
|
|
|
#define MASK_CLE 0x80000
|
|
|
|
#define MASK_ALE 0x40000
|
|
|
|
#else
|
2007-08-11 03:26:18 +09:00
|
|
|
#define MASK_CLE 0x10
|
2009-04-29 22:47:09 +09:00
|
|
|
#define MASK_ALE 0x08
|
2009-05-10 01:35:20 +09:00
|
|
|
#endif
|
2007-08-11 03:26:18 +09:00
|
|
|
|
2013-04-22 14:55:00 +09:00
|
|
|
#ifdef CONFIG_SYS_NAND_MASK_CLE
|
|
|
|
#undef MASK_CLE
|
|
|
|
#define MASK_CLE CONFIG_SYS_NAND_MASK_CLE
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_SYS_NAND_MASK_ALE
|
|
|
|
#undef MASK_ALE
|
|
|
|
#define MASK_ALE CONFIG_SYS_NAND_MASK_ALE
|
|
|
|
#endif
|
|
|
|
|
2007-08-11 03:26:18 +09:00
|
|
|
#define NAND_READ_START 0x00
|
|
|
|
#define NAND_READ_END 0x30
|
|
|
|
#define NAND_STATUS 0x70
|
|
|
|
|
2009-05-11 07:43:01 +09:00
|
|
|
extern void davinci_nand_init(struct nand_chip *nand);
|
|
|
|
|
2007-08-11 03:26:18 +09:00
|
|
|
#endif
|