Make the TCC780x NAND driver also build for 77x targets. This is work-in-progress...
[kugel-rb.git] / firmware / export / tcc77x.h
blobb17865e257d05013f412a6a1a91f8f1ff8517a0e
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 Dave Chapman
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #ifndef __TCC77X_H__
22 #define __TCC77X_H__
24 /* General-purpose IO */
26 #define GPIOA (*(volatile unsigned long *)0x80000300)
27 #define GPIOB (*(volatile unsigned long *)0x80000310)
28 #define GPIOC (*(volatile unsigned long *)0x80000320)
29 #define GPIOD (*(volatile unsigned long *)0x80000330)
30 #define GPIOE (*(volatile unsigned long *)0x80000340)
32 #define GPIOA_DIR (*(volatile unsigned long *)0x80000304)
33 #define GPIOB_DIR (*(volatile unsigned long *)0x80000314)
34 #define GPIOC_DIR (*(volatile unsigned long *)0x80000324)
35 #define GPIOD_DIR (*(volatile unsigned long *)0x80000334)
36 #define GPIOE_DIR (*(volatile unsigned long *)0x80000344)
38 #define GPIOA_FUNC (*(volatile unsigned long *)0x80000308)
39 #define GPIOB_FUNC (*(volatile unsigned long *)0x80000318)
40 #define GPIOC_FUNC (*(volatile unsigned long *)0x80000328)
41 #define GPIOD_FUNC (*(volatile unsigned long *)0x80000338)
42 #define GPIOE_FUNC (*(volatile unsigned long *)0x80000348)
44 #define BMI (*(volatile unsigned long *)0x80000364)
46 /* Clock Generator */
48 #define CLKCTRL (*(volatile unsigned long *)0x80000400)
49 #define PLL0CFG (*(volatile unsigned long *)0x80000404)
50 #define CLKDIVC (*(volatile unsigned long *)0x8000040c)
51 #define MODECTR (*(volatile unsigned long *)0x80000410)
52 #define BCLKCTR (*(volatile unsigned long *)0x80000414)
53 #define SWRESET (*(volatile unsigned long *)0x80000418)
54 #define PCLKCFG0 (*(volatile unsigned long *)0x8000041c)
55 #define PCLKCFG1 (*(volatile unsigned long *)0x80000420)
56 #define PCLKCFG2 (*(volatile unsigned long *)0x80000424)
57 #define PCLKCFG3 (*(volatile unsigned long *)0x80000428)
58 #define PCLKCFG4 (*(volatile unsigned long *)0x8000042c)
59 #define PCLKCFG5 (*(volatile unsigned long *)0x80000430)
60 #define PCLKCFG6 (*(volatile unsigned long *)0x80000434)
62 /* Device bits for SWRESET & BCLKCTR */
64 #define DEV_NAND (1<<16)
66 /* ADC */
68 #define ADCCON (*(volatile unsigned long *)0x80000a00)
69 #define ADCDATA (*(volatile unsigned long *)0x80000a04)
70 #define ADCCONA (*(volatile unsigned long *)0x80000a80)
71 #define ADCSTATUS (*(volatile unsigned long *)0x80000a84)
72 #define ADCCFG (*(volatile unsigned long *)0x80000a88)
75 /* Memory Controller */
76 #define SDCFG (*(volatile unsigned long *)0xf0000000)
77 #define SDFSM (*(volatile unsigned long *)0xf0000004)
78 #define MCFG (*(volatile unsigned long *)0xf0000008)
79 #define TST (*(volatile unsigned long *)0xf000000c)
80 #define CSCFG0 (*(volatile unsigned long *)0xf0000010)
81 #define CSCFG1 (*(volatile unsigned long *)0xf0000014)
82 #define CSCFG2 (*(volatile unsigned long *)0xf0000018)
83 #define CSCFG3 (*(volatile unsigned long *)0xf000001c)
84 #define CLKCFG (*(volatile unsigned long *)0xf0000020)
85 #define SDCMD (*(volatile unsigned long *)0xf0000024)
88 /* IRQ Controller */
90 #define TIMER0_IRQ_MASK (1<<6)
91 #define ADC_IRQ_MASK (1<<16)
93 #define IEN (*(volatile unsigned long *)0x80000100)
94 #define CREQ (*(volatile unsigned long *)0x80000104)
95 #define IREQ (*(volatile unsigned long *)0x80000108)
96 #define IRQSEL (*(volatile unsigned long *)0x8000010c)
97 #define ICFG (*(volatile unsigned long *)0x80000110)
98 #define MREQ (*(volatile unsigned long *)0x80000114)
99 #define TSTREQ (*(volatile unsigned long *)0x80000118)
100 #define IRQ (*(volatile unsigned long *)0x80000120)
101 #define FIQ (*(volatile unsigned long *)0x80000124)
102 #define MIRQ (*(volatile unsigned long *)0x80000128)
103 #define MFIQ (*(volatile unsigned long *)0x8000012c)
104 #define TMODE (*(volatile unsigned long *)0x80000130)
105 #define SYNC (*(volatile unsigned long *)0x80000134)
106 #define WKUP (*(volatile unsigned long *)0x80000138)
108 /* Timer Controller */
110 #define TCFG0 (*(volatile unsigned long *)0x80000200)
111 #define TCNT0 (*(volatile unsigned long *)0x80000204)
112 #define TREF0 (*(volatile unsigned long *)0x80000208)
113 #define TMREF0 (*(volatile unsigned long *)0x8000020c)
114 #define TCFG1 (*(volatile unsigned long *)0x80000210)
115 #define TCNT1 (*(volatile unsigned long *)0x80000214)
116 #define TREF1 (*(volatile unsigned long *)0x80000218)
117 #define TMREF1 (*(volatile unsigned long *)0x8000021c)
118 #define TCFG2 (*(volatile unsigned long *)0x80000220)
119 #define TCNT2 (*(volatile unsigned long *)0x80000224)
120 #define TREF2 (*(volatile unsigned long *)0x80000228)
121 #define TMREF2 (*(volatile unsigned long *)0x8000022c)
122 #define TCFG3 (*(volatile unsigned long *)0x80000230)
123 #define TCNT3 (*(volatile unsigned long *)0x80000234)
124 #define TREF3 (*(volatile unsigned long *)0x80000238)
125 #define TMREF3 (*(volatile unsigned long *)0x8000023c)
126 #define TCFG4 (*(volatile unsigned long *)0x80000240)
127 #define TCNT4 (*(volatile unsigned long *)0x80000244)
128 #define TREF4 (*(volatile unsigned long *)0x80000248)
129 #define TCFG5 (*(volatile unsigned long *)0x80000250)
130 #define TCNT5 (*(volatile unsigned long *)0x80000254)
131 #define TREF5 (*(volatile unsigned long *)0x80000258)
132 #define TIREQ (*(volatile unsigned long *)0x80000260)
133 #define TWDCFG (*(volatile unsigned long *)0x80000270)
134 #define TWDCLR (*(volatile unsigned long *)0x80000274)
135 #define TC32EN (*(volatile unsigned long *)0x80000280)
136 #define TC32LDV (*(volatile unsigned long *)0x80000284)
137 #define TC32CMP0 (*(volatile unsigned long *)0x80000288)
138 #define TC32CMP1 (*(volatile unsigned long *)0x8000028c)
139 #define TC32PCNT (*(volatile unsigned long *)0x80000290)
140 #define TC32MCNT (*(volatile unsigned long *)0x80000294)
141 #define TC32IRQ (*(volatile unsigned long *)0x80000298)
143 /* TIREQ flags */
144 #define TF0 (1<<8) /* Timer 0 reference value reached */
145 #define TF1 (1<<9) /* Timer 1 reference value reached */
146 #define TI0 (1<<0) /* Timer 0 IRQ flag */
147 #define TI1 (1<<1) /* Timer 1 IRQ flag */
149 /* NAND Flash Controller */
151 #define NFC_CMD (*(volatile unsigned long *)0x90000000)
152 #define NFC_SADDR (*(volatile unsigned long *)0x9000000C)
153 #define NFC_SDATA (*(volatile unsigned long *)0x90000040)
154 #define NFC_WDATA (*(volatile unsigned long *)0x90000010)
155 #define NFC_CTRL (*(volatile unsigned long *)0x90000050)
156 #define NFC_16BIT (1<<26)
157 #define NFC_CS0 (1<<23)
158 #define NFC_CS1 (1<<22)
159 #define NFC_READY (1<<20)
160 #define NFC_IREQ (*(volatile unsigned long *)0x90000060)
161 #define NFC_RST (*(volatile unsigned long *)0x90000064)
163 #endif