blob: dee1c6f814e68510369b4a353779cecf3c3f6088 [file] [log] [blame]
Sergey Kubushyne8f39122007-08-10 20:26:18 +02001/*
2 * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
3 *
4 * Parts shamelesly stolen from Linux Kernel source tree.
5 *
6 * ------------------------------------------------------------
7 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02008 * SPDX-License-Identifier: GPL-2.0+
Sergey Kubushyne8f39122007-08-10 20:26:18 +02009 */
10#ifndef _NAND_DEFS_H_
11#define _NAND_DEFS_H_
12
13#include <asm/arch/hardware.h>
14
Sandeep Paulraj310baca2009-09-18 17:30:05 -040015#ifdef CONFIG_SOC_DM646X
Sandeep Paulrajadb80052009-05-09 12:35:20 -040016#define MASK_CLE 0x80000
17#define MASK_ALE 0x40000
18#else
Sergey Kubushyne8f39122007-08-10 20:26:18 +020019#define MASK_CLE 0x10
Sandeep Paulrajd4aa1132009-04-29 09:47:09 -040020#define MASK_ALE 0x08
Sandeep Paulrajadb80052009-05-09 12:35:20 -040021#endif
Sergey Kubushyne8f39122007-08-10 20:26:18 +020022
Eric Benardf7dafcf2013-04-22 05:55:00 +000023#ifdef CONFIG_SYS_NAND_MASK_CLE
24#undef MASK_CLE
25#define MASK_CLE CONFIG_SYS_NAND_MASK_CLE
26#endif
27#ifdef CONFIG_SYS_NAND_MASK_ALE
28#undef MASK_ALE
29#define MASK_ALE CONFIG_SYS_NAND_MASK_ALE
30#endif
31
Sergey Kubushyne8f39122007-08-10 20:26:18 +020032#define NAND_READ_START 0x00
33#define NAND_READ_END 0x30
34#define NAND_STATUS 0x70
35
David Brownellf4b0b9d2009-05-10 15:43:01 -070036extern void davinci_nand_init(struct nand_chip *nand);
37
Sergey Kubushyne8f39122007-08-10 20:26:18 +020038#endif