summaryrefslogtreecommitdiffstats
path: root/uClinux-2.4.20-uc1/drivers/mtd/nand/w90n745_nand.h
blob: d7a6b28a4643cacff8d958f5ecd19e61bb8611d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 *  linux/drivers/mtd/nand/w99702g_nand.h
 *
 *  Copyright (c) 2005  Winbond (http://www.winbond.com.tw)
 *
 * History:
 *	2006/08/24		Created by NS24 zswan
 */

#define EBI_BANK2
//#define EBI_BANK3
#ifdef EBI_BANK2
#define EXT2CON			0xFFF01020
#else
#define EXT3CON			0xFFF01024
#endif
#define EBI_BASE_ADDR	0xF0000000

#define outpb(port,value)     (*((unsigned char volatile *) (port))=value)
#define inpb(port)            (*((unsigned char volatile *) (port)))
#define outpw(port,value)     (*((unsigned int volatile *) (port))=value)
#define inpw(port)            (*((unsigned int volatile *) (port)))

#define REG_SMCMD		(EBI_BASE_ADDR + 0x04)
#define REG_SMADDR		(EBI_BASE_ADDR + 0x08)
#define REG_SMDATA		(EBI_BASE_ADDR + 0x0)
#ifdef EBI_BANK2
#define Setup_EXTIO2_Base()		(*((unsigned int volatile *)(EXT2CON))=0xE0004491);
#else
#define Setup_EXTIO3_Base()		(*((unsigned int volatile *)(EXT3CON))=0xE0004491);
#endif