xref: /OK3568_Linux_fs/kernel/arch/mips/include/asm/netlogic/xlr/flash.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Copyright (c) 2003-2012 Broadcom Corporation
3*4882a593Smuzhiyun  * All Rights Reserved
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * This software is available to you under a choice of one of two
6*4882a593Smuzhiyun  * licenses.  You may choose to be licensed under the terms of the GNU
7*4882a593Smuzhiyun  * General Public License (GPL) Version 2, available from the file
8*4882a593Smuzhiyun  * COPYING in the main directory of this source tree, or the Broadcom
9*4882a593Smuzhiyun  * license below:
10*4882a593Smuzhiyun  *
11*4882a593Smuzhiyun  * Redistribution and use in source and binary forms, with or without
12*4882a593Smuzhiyun  * modification, are permitted provided that the following conditions
13*4882a593Smuzhiyun  * are met:
14*4882a593Smuzhiyun  *
15*4882a593Smuzhiyun  * 1. Redistributions of source code must retain the above copyright
16*4882a593Smuzhiyun  *    notice, this list of conditions and the following disclaimer.
17*4882a593Smuzhiyun  * 2. Redistributions in binary form must reproduce the above copyright
18*4882a593Smuzhiyun  *    notice, this list of conditions and the following disclaimer in
19*4882a593Smuzhiyun  *    the documentation and/or other materials provided with the
20*4882a593Smuzhiyun  *    distribution.
21*4882a593Smuzhiyun  *
22*4882a593Smuzhiyun  * THIS SOFTWARE IS PROVIDED BY BROADCOM ``AS IS'' AND ANY EXPRESS OR
23*4882a593Smuzhiyun  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24*4882a593Smuzhiyun  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25*4882a593Smuzhiyun  * ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM OR CONTRIBUTORS BE LIABLE
26*4882a593Smuzhiyun  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27*4882a593Smuzhiyun  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28*4882a593Smuzhiyun  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
29*4882a593Smuzhiyun  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
30*4882a593Smuzhiyun  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
31*4882a593Smuzhiyun  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
32*4882a593Smuzhiyun  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33*4882a593Smuzhiyun  */
34*4882a593Smuzhiyun #ifndef _ASM_NLM_FLASH_H_
35*4882a593Smuzhiyun #define _ASM_NLM_FLASH_H_
36*4882a593Smuzhiyun 
37*4882a593Smuzhiyun #define FLASH_CSBASE_ADDR(cs)		(cs)
38*4882a593Smuzhiyun #define FLASH_CSADDR_MASK(cs)		(0x10 + (cs))
39*4882a593Smuzhiyun #define FLASH_CSDEV_PARM(cs)		(0x20 + (cs))
40*4882a593Smuzhiyun #define FLASH_CSTIME_PARMA(cs)		(0x30 + (cs))
41*4882a593Smuzhiyun #define FLASH_CSTIME_PARMB(cs)		(0x40 + (cs))
42*4882a593Smuzhiyun 
43*4882a593Smuzhiyun #define FLASH_INT_MASK			0x50
44*4882a593Smuzhiyun #define FLASH_INT_STATUS		0x60
45*4882a593Smuzhiyun #define FLASH_ERROR_STATUS		0x70
46*4882a593Smuzhiyun #define FLASH_ERROR_ADDR		0x80
47*4882a593Smuzhiyun 
48*4882a593Smuzhiyun #define FLASH_NAND_CLE(cs)		(0x90 + (cs))
49*4882a593Smuzhiyun #define FLASH_NAND_ALE(cs)		(0xa0 + (cs))
50*4882a593Smuzhiyun 
51*4882a593Smuzhiyun #define FLASH_NAND_CSDEV_PARAM		0x000041e6
52*4882a593Smuzhiyun #define FLASH_NAND_CSTIME_PARAMA	0x4f400e22
53*4882a593Smuzhiyun #define FLASH_NAND_CSTIME_PARAMB	0x000083cf
54*4882a593Smuzhiyun 
55*4882a593Smuzhiyun #endif
56