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