tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8800x / regs_nfc.h
1 /*
2  * arch/arm/mach-sc8800s/include/mach/regs_nfc.h
3  *
4  * Chip nand flash controller registers Definitions
5  *
6  * Copyright (C) 2010 Spreadtrum International Ltd.
7  *
8  * 2010-05-25: yingchun li <yingchun.li@spreadtrum.com>
9  *            initial version
10  *
11  *  This program is free software; you can redistribute it and/or modify
12  *  it under the terms of the GNU General Public License version 2 as
13  *  published by the Free Software Foundation.
14  */
15
16 #ifndef _SC8800H_REG_NFC_H_
17 #define _SC8800H_REG_NFC_H_
18
19 #include <asm/arch/regs_global.h>
20 #include <asm/arch/bits.h>
21
22 #define NFC_REG_BASE                    ARM_NAND_BASE
23
24 #define NFC_MBUF                        (NFC_REG_BASE + 0x0000)
25 #define NFC_SBUF                        (NFC_REG_BASE + 0x0c00)
26
27 #define NFC_CMD                         (NFC_REG_BASE + 0x1c00)
28 #define NFC_STR0                        (NFC_REG_BASE + 0x1c04)
29 #define NFC_STR1                        (NFC_REG_BASE + 0x1c08)
30 #define NFC_STR2                        (NFC_REG_BASE + 0x1c0c)
31 #define NFC_STR3                        (NFC_REG_BASE + 0x1c10)
32 #define NFC_END0                        (NFC_REG_BASE + 0x1c14)
33 #define NFC_END1                        (NFC_REG_BASE + 0x1c18)
34 #define NFC_END2                        (NFC_REG_BASE + 0x1c1c)
35 #define NFC_END3                        (NFC_REG_BASE + 0x1c20)
36 #define NFC_PARA                        (NFC_REG_BASE + 0x1c24)
37
38 #define NFC_PAGEECC0                    (NFC_REG_BASE + 0x1c28)
39 #define NFC_PAGEECC1                    (NFC_REG_BASE + 0x1c2c)
40 #define NFC_PAGEECC2                    (NFC_REG_BASE + 0x1c30)
41 #define NFC_PAGEECC3                    (NFC_REG_BASE + 0x1c34)
42
43 #define NFC_CMDCLR                      (NFC_REG_BASE + 0x1c48)
44 #define NFC_RB                          (NFC_REG_BASE + 0x1c80)
45
46 #define NFC_INTSRC                      (NFC_REG_BASE + 0x1c84)
47 #define NFC_INTEN                       (NFC_REG_BASE + 0x1c88)
48 #define NFC_INTMSK                      (NFC_REG_BASE + 0x1c8c)
49
50 #define NFC_WPN                         (NFC_REG_BASE + 0x1c38)
51 #define NFC_IDSTATUS                    (NFC_REG_BASE + 0x1c3c)
52 #define NFC_ECCEN                       (NFC_REG_BASE + 0x1d00)
53 #define NFC_TIMEOUT                     (NFC_REG_BASE + 0x1d18) 
54
55 #define REG_NFC_MBUF                    (*((volatile unsigned int *)(NFC_MBUF)))
56 #define REG_NFC_SBUF                    (*((volatile unsigned int *)(NFC_SBUF)))
57 #define REG_NFC_CMD                     (*((volatile unsigned int *)(NFC_CMD)))
58 #define REG_NFC_STR0                    (*((volatile unsigned int *)(NFC_STR0)))
59 #define REG_NFC_STR1                    (*((volatile unsigned int *)(NFC_STR1)))
60 #define REG_NFC_STR2                    (*((volatile unsigned int *)(NFC_STR2)))
61 #define REG_NFC_STR3                    (*((volatile unsigned int *)(NFC_STR3)))
62 #define REG_NFC_END0                    (*((volatile unsigned int *)(NFC_END0)))
63 #define REG_NFC_END1                    (*((volatile unsigned int *)(NFC_END1)))
64 #define REG_NFC_END2                    (*((volatile unsigned int *)(NFC_END2)))
65 #define REG_NFC_END3                    (*((volatile unsigned int *)(NFC_END3)))
66 #define REG_NFC_PARA                    (*((volatile unsigned int *)(NFC_PARA)))
67
68 #define REG_NFC_PAGEECC0                (*((volatile unsigned int *)(NFC_PAGEECC0)))
69 #define REG_NFC_PAGEECC1                (*((volatile unsigned int *)(NFC_PAGEECC1)))
70 #define REG_NFC_PAGEECC2                (*((volatile unsigned int *)(NFC_PAGEECC2)))
71 #define REG_NFC_PAGEECC3                (*((volatile unsigned int *)(NFC_PAGEECC3)))
72
73 #define REG_NFC_WPN                     (*((volatile unsigned int *)(NFC_WPN)))
74 #define REG_NFC_ECCEN                   (*((volatile unsigned int *)(NFC_ECCEN)))
75 #define REG_NFC_INTSRC                  (*((volatile unsigned int *)(NFC_INTSRC)))
76 #define REG_NFC_IDSTATUS                (*((volatile unsigned int *)(NFC_IDSTATUS)))
77
78 #endif 
79