00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _ABLE_CLIB_ABLE_IOMD_H
00030 #define _ABLE_CLIB_ABLE_IOMD_H 1
00031
00032 #ifndef __ASSEMBLY__
00033 enum iomd_regs_e {
00034 IOMD_CONTROL =(IOMD_BASE + 0x000),
00035 #ifdef CONFIG_MACHINE_BUSHSTB
00036 IOMD_KARTTX =(IOMD_BASE + 0x0A8),
00037 IOMD_KARTRX =(IOMD_BASE + 0x0A8),
00038 IOMD_KCTRL =(IOMD_BASE + 0x0AC),
00039 #else
00040 IOMD_KARTTX =(IOMD_BASE + 0x004),
00041 IOMD_KARTRX =(IOMD_BASE + 0x004),
00042 IOMD_KCTRL =(IOMD_BASE + 0x008),
00043 #endif
00044
00045 IOMD_IOLINES =(IOMD_BASE + 0x00C),
00046
00047 IOMD_IRQSTATA =(IOMD_BASE + 0x010),
00048 IOMD_IRQREQA =(IOMD_BASE + 0x014),
00049 IOMD_IRQCLRA =(IOMD_BASE + 0x014),
00050 IOMD_IRQMASKA =(IOMD_BASE + 0x018),
00051
00052 IOMD_IRQSTATB =(IOMD_BASE + 0x020),
00053 IOMD_IRQREQB =(IOMD_BASE + 0x024),
00054 IOMD_IRQMASKB =(IOMD_BASE + 0x028),
00055
00056 IOMD_FIQSTAT =(IOMD_BASE + 0x030),
00057 IOMD_FIQREQ =(IOMD_BASE + 0x034),
00058 IOMD_FIQMASK =(IOMD_BASE + 0x038),
00059
00060 IOMD_T0CNTL =(IOMD_BASE + 0x040),
00061 IOMD_T0LTCHL =(IOMD_BASE + 0x040),
00062 IOMD_T0CNTH =(IOMD_BASE + 0x044),
00063 IOMD_T0LTCHH =(IOMD_BASE + 0x044),
00064 IOMD_T0GO =(IOMD_BASE + 0x048),
00065 IOMD_T0LATCH =(IOMD_BASE + 0x04c),
00066
00067 IOMD_T1CNTL =(IOMD_BASE + 0x050),
00068 IOMD_T1LTCHL =(IOMD_BASE + 0x050),
00069 IOMD_T1CNTH =(IOMD_BASE + 0x054),
00070 IOMD_T1LTCHH =(IOMD_BASE + 0x054),
00071 IOMD_T1GO =(IOMD_BASE + 0x058),
00072 IOMD_T1LATCH =(IOMD_BASE + 0x05c),
00073
00074 IOMD_IRQSTATC =(IOMD_BASE + 0x060),
00075 IOMD_IRQREQC =(IOMD_BASE + 0x064),
00076 IOMD_IRQCLRC =(IOMD_BASE + 0x064),
00077 IOMD_IRQMASKC =(IOMD_BASE + 0x068),
00078
00079 IOMD_VIDMUX =(IOMD_BASE + 0x06c),
00080
00081 IOMD_IRQSTATD =(IOMD_BASE + 0x070),
00082 IOMD_IRQREQD =(IOMD_BASE + 0x074),
00083 IOMD_IRQCLRD =(IOMD_BASE + 0x074),
00084 IOMD_IRQMASKD =(IOMD_BASE + 0x078),
00085
00086 IOMD_ROMCR0 =(IOMD_BASE + 0x080),
00087 IOMD_ROMCR1 =(IOMD_BASE + 0x084),
00088 IOMD_DRAMCR =(IOMD_BASE + 0x088),
00089 IOMD_VREFCR =(IOMD_BASE + 0x08C),
00090
00091 IOMD_FSIZE =(IOMD_BASE + 0x090),
00092 IOMD_ID0 =(IOMD_BASE + 0x094),
00093 IOMD_ID1 =(IOMD_BASE + 0x098),
00094 IOMD_VERSION =(IOMD_BASE + 0x09C),
00095
00096 IOMD_MOUSEX =(IOMD_BASE + 0x0A0),
00097 IOMD_MOUSEY =(IOMD_BASE + 0x0A4),
00098
00099 IOMD_DMATCR =(IOMD_BASE + 0x0C0),
00100 IOMD_IOTCR =(IOMD_BASE + 0x0C4),
00101 IOMD_ECTCR =(IOMD_BASE + 0x0C8),
00102 IOMD_DMAEXT =(IOMD_BASE + 0x0CC),
00103 IOMD_ASTCR =(IOMD_BASE + 0x0CC),
00104
00105 IOMD_IO0CURA =(IOMD_BASE + 0x100),
00106 IOMD_IO0ENDA =(IOMD_BASE + 0x104),
00107 IOMD_IO0CURB =(IOMD_BASE + 0x108),
00108 IOMD_IO0ENDB =(IOMD_BASE + 0x10C),
00109 IOMD_IO0CR =(IOMD_BASE + 0x110),
00110 IOMD_IO0ST =(IOMD_BASE + 0x114),
00111
00112 IOMD_IO1CURA =(IOMD_BASE + 0x120),
00113 IOMD_IO1ENDA =(IOMD_BASE + 0x124),
00114 IOMD_IO1CURB =(IOMD_BASE + 0x128),
00115 IOMD_IO1ENDB =(IOMD_BASE + 0x12C),
00116 IOMD_IO1CR =(IOMD_BASE + 0x130),
00117 IOMD_IO1ST =(IOMD_BASE + 0x134),
00118
00119 IOMD_IO2CURA =(IOMD_BASE + 0x140),
00120 IOMD_IO2ENDA =(IOMD_BASE + 0x144),
00121 IOMD_IO2CURB =(IOMD_BASE + 0x148),
00122 IOMD_IO2ENDB =(IOMD_BASE + 0x14C),
00123 IOMD_IO2CR =(IOMD_BASE + 0x150),
00124 IOMD_IO2ST =(IOMD_BASE + 0x154),
00125
00126 IOMD_IO3CURA =(IOMD_BASE + 0x160),
00127 IOMD_IO3ENDA =(IOMD_BASE + 0x164),
00128 IOMD_IO3CURB =(IOMD_BASE + 0x168),
00129 IOMD_IO3ENDB =(IOMD_BASE + 0x16C),
00130 IOMD_IO3CR =(IOMD_BASE + 0x170),
00131 IOMD_IO3ST =(IOMD_BASE + 0x174),
00132
00133 IOMD_SD0CURA =(IOMD_BASE + 0x180),
00134 IOMD_SD0ENDA =(IOMD_BASE + 0x184),
00135 IOMD_SD0CURB =(IOMD_BASE + 0x188),
00136 IOMD_SD0ENDB =(IOMD_BASE + 0x18C),
00137 IOMD_SD0CR =(IOMD_BASE + 0x190),
00138 IOMD_SD0ST =(IOMD_BASE + 0x194),
00139
00140 IOMD_SD1CURA =(IOMD_BASE + 0x1A0),
00141 IOMD_SD1ENDA =(IOMD_BASE + 0x1A4),
00142 IOMD_SD1CURB =(IOMD_BASE + 0x1A8),
00143 IOMD_SD1ENDB =(IOMD_BASE + 0x1AC),
00144 IOMD_SD1CR =(IOMD_BASE + 0x1B0),
00145 IOMD_SD1ST =(IOMD_BASE + 0x1B4),
00146
00147 IOMD_CURSCUR =(IOMD_BASE + 0x1C0),
00148 IOMD_CURSINIT =(IOMD_BASE + 0x1C4),
00149
00150 IOMD_VIDCUR =(IOMD_BASE + 0x1D0),
00151 IOMD_VIDEND =(IOMD_BASE + 0x1D4),
00152 IOMD_VIDSTART =(IOMD_BASE + 0x1D8),
00153 IOMD_VIDINIT =(IOMD_BASE + 0x1DC),
00154 IOMD_VIDCR =(IOMD_BASE + 0x1E0),
00155
00156 IOMD_DMASTAT =(IOMD_BASE + 0x1F0),
00157 IOMD_DMAREQ =(IOMD_BASE + 0x1F4),
00158 IOMD_DMAMASK =(IOMD_BASE + 0x1F8)
00159 };
00160
00161 #define DMA_EXT_IO0 1
00162 #define DMA_EXT_IO1 2
00163 #define DMA_EXT_IO2 4
00164 #define DMA_EXT_IO3 8
00165
00166 #define DMA_END_S (1 << 31)
00167 #define DMA_END_L (1 << 30)
00168
00169 #define DMA_CR_C 0x80
00170 #define DMA_CR_D 0x40
00171 #define DMA_CR_E 0x20
00172
00173 #define DMA_ST_OFL 4
00174 #define DMA_ST_INT 2
00175 #define DMA_ST_AB 1
00176
00177 #else
00178
00179
00180 #define IOMD_KARTTX (0x004)
00181 #define IOMD_KARTRX (0x004)
00182 #define IOMD_KCTRL (0x008)
00183
00184 #define IOMD_IOLINES (0x00C)
00185
00186 #define IOMD_IRQSTATA (0x010)
00187 #define IOMD_IRQREQA (0x014)
00188 #define IOMD_IRQCLRA (0x014)
00189 #define IOMD_IRQMASKA (0x018)
00190
00191 #define IOMD_IRQSTATB (0x020)
00192 #define IOMD_IRQREQB (0x024)
00193 #define IOMD_IRQMASKB (0x028)
00194
00195 #define IOMD_FIQSTAT (0x030)
00196 #define IOMD_FIQREQ (0x034)
00197 #define IOMD_FIQMASK (0x038)
00198
00199 #define IOMD_T0CNTL (0x040)
00200 #define IOMD_T0LTCHL (0x040)
00201 #define IOMD_T0CNTH (0x044)
00202 #define IOMD_T0LTCHH (0x044)
00203 #define IOMD_T0GO (0x048)
00204 #define IOMD_T0LATCH (0x04c)
00205
00206 #define IOMD_T1CNTL (0x050)
00207 #define IOMD_T1LTCHL (0x050)
00208 #define IOMD_T1CNTH (0x054)
00209 #define IOMD_T1LTCHH (0x054)
00210 #define IOMD_T1GO (0x058)
00211 #define IOMD_T1LATCH (0x05c)
00212
00213 #define IOMD_IRQSTATC (0x060)
00214 #define IOMD_IRQREQC (0x064)
00215 #define IOMD_IRQCLRC (0x064)
00216 #define IOMD_IRQMASKC (0x068)
00217
00218 #define IOMD_VIDMUX (0x06c)
00219
00220 #define IOMD_IRQSTATD (0x070)
00221 #define IOMD_IRQREQD (0x074)
00222 #define IOMD_IRQCLRD (0x074)
00223 #define IOMD_IRQMASKD (0x078)
00224
00225 #define IOMD_ROMCR0 (0x080)
00226 #define IOMD_ROMCR1 (0x084)
00227 #define IOMD_DRAMCR (0x088)
00228 #define IOMD_VREFCR (0x08C)
00229
00230 #define IOMD_FSIZE (0x090)
00231 #define IOMD_ID0 (0x094)
00232 #define IOMD_ID1 (0x098)
00233 #define IOMD_VERSION (0x09C)
00234
00235 #define IOMD_MOUSEX (0x0A0)
00236 #define IOMD_MOUSEY (0x0A4)
00237
00238 #define IOMD_DMATCR (0x0C0)
00239 #define IOMD_IOTCR (0x0C4)
00240 #define IOMD_ECTCR (0x0C8)
00241 #define IOMD_DMAEXT (0x0CC)
00242 #define IOMD_ASTCR (0x0CC)
00243
00244 #define IOMD_IO0CURA (0x100)
00245 #define IOMD_IO0ENDA (0x104)
00246 #define IOMD_IO0CURB (0x108)
00247 #define IOMD_IO0ENDB (0x10C)
00248 #define IOMD_IO0CR (0x110)
00249 #define IOMD_IO0ST (0x114)
00250
00251 #define IOMD_IO1CURA (0x120)
00252 #define IOMD_IO1ENDA (0x124)
00253 #define IOMD_IO1CURB (0x128)
00254 #define IOMD_IO1ENDB (0x12C)
00255 #define IOMD_IO1CR (0x130)
00256 #define IOMD_IO1ST (0x134)
00257
00258 #define IOMD_IO2CURA (0x140)
00259 #define IOMD_IO2ENDA (0x144)
00260 #define IOMD_IO2CURB (0x148)
00261 #define IOMD_IO2ENDB (0x14C)
00262 #define IOMD_IO2CR (0x150)
00263 #define IOMD_IO2ST (0x154)
00264
00265 #define IOMD_IO3CURA (0x160)
00266 #define IOMD_IO3ENDA (0x164)
00267 #define IOMD_IO3CURB (0x168)
00268 #define IOMD_IO3ENDB (0x16C)
00269 #define IOMD_IO3CR (0x170)
00270 #define IOMD_IO3ST (0x174)
00271
00272 #define IOMD_SD0CURA (0x180)
00273 #define IOMD_SD0ENDA (0x184)
00274 #define IOMD_SD0CURB (0x188)
00275 #define IOMD_SD0ENDB (0x18C)
00276 #define IOMD_SD0CR (0x190)
00277 #define IOMD_SD0ST (0x194)
00278
00279 #define IOMD_SD1CURA (0x1A0)
00280 #define IOMD_SD1ENDA (0x1A4)
00281 #define IOMD_SD1CURB (0x1A8)
00282 #define IOMD_SD1ENDB (0x1AC)
00283 #define IOMD_SD1CR (0x1B0)
00284 #define IOMD_SD1ST (0x1B4)
00285
00286 #define IOMD_CURSCUR (0x1C0)
00287 #define IOMD_CURSINIT (0x1C4)
00288
00289 #define IOMD_VIDCUR (0x1D0)
00290 #define IOMD_VIDEND (0x1D4)
00291 #define IOMD_VIDSTART (0x1D8)
00292 #define IOMD_VIDINIT (0x1DC)
00293 #define IOMD_VIDCR (0x1E0)
00294
00295 #define IOMD_DMASTAT (0x1F0)
00296 #define IOMD_DMAREQ (0x1F4)
00297 #define IOMD_DMAMASK (0x1F8)
00298
00299
00300
00301
00302 #endif
00303
00304 #endif