Go to the documentation of this file.
13 #ifndef OPENOCD_FLASH_NAND_S3C24XX_REGS_H
14 #define OPENOCD_FLASH_NAND_S3C24XX_REGS_H
16 #define S3C2410_NFREG(x) (x)
18 #define S3C2410_NFCONF S3C2410_NFREG(0x00)
19 #define S3C2410_NFCMD S3C2410_NFREG(0x04)
20 #define S3C2410_NFADDR S3C2410_NFREG(0x08)
21 #define S3C2410_NFDATA S3C2410_NFREG(0x0C)
22 #define S3C2410_NFSTAT S3C2410_NFREG(0x10)
23 #define S3C2410_NFECC S3C2410_NFREG(0x14)
25 #define S3C2440_NFCONT S3C2410_NFREG(0x04)
26 #define S3C2440_NFCMD S3C2410_NFREG(0x08)
27 #define S3C2440_NFADDR S3C2410_NFREG(0x0C)
28 #define S3C2440_NFDATA S3C2410_NFREG(0x10)
29 #define S3C2440_NFECCD0 S3C2410_NFREG(0x14)
30 #define S3C2440_NFECCD1 S3C2410_NFREG(0x18)
31 #define S3C2440_NFECCD S3C2410_NFREG(0x1C)
32 #define S3C2440_NFSTAT S3C2410_NFREG(0x20)
33 #define S3C2440_NFESTAT0 S3C2410_NFREG(0x24)
34 #define S3C2440_NFESTAT1 S3C2410_NFREG(0x28)
35 #define S3C2440_NFMECC0 S3C2410_NFREG(0x2C)
36 #define S3C2440_NFMECC1 S3C2410_NFREG(0x30)
37 #define S3C2440_NFSECC S3C2410_NFREG(0x34)
38 #define S3C2440_NFSBLK S3C2410_NFREG(0x38)
39 #define S3C2440_NFEBLK S3C2410_NFREG(0x3C)
41 #define S3C2412_NFSBLK S3C2410_NFREG(0x20)
42 #define S3C2412_NFEBLK S3C2410_NFREG(0x24)
43 #define S3C2412_NFSTAT S3C2410_NFREG(0x28)
44 #define S3C2412_NFMECC_ERR0 S3C2410_NFREG(0x2C)
45 #define S3C2412_NFMECC_ERR1 S3C2410_NFREG(0x30)
46 #define S3C2412_NFMECC0 S3C2410_NFREG(0x34)
47 #define S3C2412_NFMECC1 S3C2410_NFREG(0x38)
48 #define S3C2412_NFSECC S3C2410_NFREG(0x3C)
50 #define S3C2410_NFCONF_EN (1 << 15)
51 #define S3C2410_NFCONF_512BYTE (1 << 14)
52 #define S3C2410_NFCONF_4STEP (1 << 13)
53 #define S3C2410_NFCONF_INITECC (1 << 12)
54 #define S3C2410_NFCONF_NFCE (1 << 11)
55 #define S3C2410_NFCONF_TACLS(x) ((x) << 8)
56 #define S3C2410_NFCONF_TWRPH0(x) ((x) << 4)
57 #define S3C2410_NFCONF_TWRPH1(x) ((x) << 0)
59 #define S3C2410_NFSTAT_BUSY (1 << 0)
61 #define S3C2440_NFCONF_BUSWIDTH_8 (0 << 0)
62 #define S3C2440_NFCONF_BUSWIDTH_16 (1 << 0)
63 #define S3C2440_NFCONF_ADVFLASH (1 << 3)
64 #define S3C2440_NFCONF_TACLS(x) ((x) << 12)
65 #define S3C2440_NFCONF_TWRPH0(x) ((x) << 8)
66 #define S3C2440_NFCONF_TWRPH1(x) ((x) << 4)
68 #define S3C2440_NFCONT_LOCKTIGHT (1 << 13)
69 #define S3C2440_NFCONT_SOFTLOCK (1 << 12)
70 #define S3C2440_NFCONT_ILLEGALACC_EN (1 << 10)
71 #define S3C2440_NFCONT_RNBINT_EN (1 << 9)
72 #define S3C2440_NFCONT_RN_FALLING (1 << 8)
73 #define S3C2440_NFCONT_SPARE_ECCLOCK (1 << 6)
74 #define S3C2440_NFCONT_MAIN_ECCLOCK (1 << 5)
75 #define S3C2440_NFCONT_INITECC (1 << 4)
76 #define S3C2440_NFCONT_NFCE (1 << 1)
77 #define S3C2440_NFCONT_ENABLE (1 << 0)
79 #define S3C2440_NFSTAT_READY (1 << 0)
80 #define S3C2440_NFSTAT_NCE (1 << 1)
81 #define S3C2440_NFSTAT_RNB_CHANGE (1 << 2)
82 #define S3C2440_NFSTAT_ILLEGAL_ACCESS (1 << 3)
84 #define S3C2412_NFCONF_NANDBOOT (1 << 31)
85 #define S3C2412_NFCONF_ECCCLKCON (1 << 30)
86 #define S3C2412_NFCONF_ECC_MLC (1 << 24)
87 #define S3C2412_NFCONF_TACLS_MASK (7 << 12)
89 #define S3C2412_NFCONT_ECC4_DIRWR (1 << 18)
90 #define S3C2412_NFCONT_LOCKTIGHT (1 << 17)
91 #define S3C2412_NFCONT_SOFTLOCK (1 << 16)
92 #define S3C2412_NFCONT_ECC4_ENCINT (1 << 13)
93 #define S3C2412_NFCONT_ECC4_DECINT (1 << 12)
94 #define S3C2412_NFCONT_MAIN_ECC_LOCK (1 << 7)
95 #define S3C2412_NFCONT_INIT_MAIN_ECC (1 << 5)
96 #define S3C2412_NFCONT_NFCE1 (1 << 2)
97 #define S3C2412_NFCONT_NFCE0 (1 << 1)
99 #define S3C2412_NFSTAT_ECC_ENCDONE (1 << 7)
100 #define S3C2412_NFSTAT_ECC_DECDONE (1 << 6)
101 #define S3C2412_NFSTAT_ILLEGAL_ACCESS (1 << 5)
102 #define S3C2412_NFSTAT_RNB_CHANGE (1 << 4)
103 #define S3C2412_NFSTAT_NFCE1 (1 << 3)
104 #define S3C2412_NFSTAT_NFCE0 (1 << 2)
105 #define S3C2412_NFSTAT_RES1 (1 << 1)
106 #define S3C2412_NFSTAT_READY (1 << 0)
108 #define S3C2412_NFECCERR_SERRDATA(x) (((x) >> 21) & 0xf)
109 #define S3C2412_NFECCERR_SERRBIT(x) (((x) >> 18) & 0x7)
110 #define S3C2412_NFECCERR_MERRDATA(x) (((x) >> 7) & 0x3ff)
111 #define S3C2412_NFECCERR_MERRBIT(x) (((x) >> 4) & 0x7)
112 #define S3C2412_NFECCERR_SPARE_ERR(x) (((x) >> 2) & 0x3)
113 #define S3C2412_NFECCERR_MAIN_ERR(x) (((x) >> 2) & 0x3)
114 #define S3C2412_NFECCERR_NONE (0)
115 #define S3C2412_NFECCERR_1BIT (1)
116 #define S3C2412_NFECCERR_MULTIBIT (2)
117 #define S3C2412_NFECCERR_ECCAREA (3)