diff options
author | Rob Purchase <shotofadds@rockbox.org> | 2008-01-14 22:04:48 +0000 |
---|---|---|
committer | Rob Purchase <shotofadds@rockbox.org> | 2008-01-14 22:04:48 +0000 |
commit | 47ea030e2e68a51f91a2c2302b7ea4d3ee1a2a07 (patch) | |
tree | 0a48ce653e22ec9a2673474f718217d9659e0c6b /firmware/export/tcc780x.h | |
parent | b30ca8ca5ab6c8ea27b8fe1f5fb38ebad09b7e62 (diff) | |
download | rockbox-47ea030e2e68a51f91a2c2302b7ea4d3ee1a2a07.tar.gz rockbox-47ea030e2e68a51f91a2c2302b7ea4d3ee1a2a07.zip |
Initial Cowon D2 commit:
* bootloader test program (basic LCD & button drivers, reads touchscreen)
* work-in-progress stubs for main build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16090 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/tcc780x.h')
-rw-r--r-- | firmware/export/tcc780x.h | 156 |
1 files changed, 156 insertions, 0 deletions
diff --git a/firmware/export/tcc780x.h b/firmware/export/tcc780x.h new file mode 100644 index 0000000000..df55c6f03d --- /dev/null +++ b/firmware/export/tcc780x.h | |||
@@ -0,0 +1,156 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2007 Rob Purchase | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | #ifndef __TCC780X_H__ | ||
20 | #define __TCC780X_H__ | ||
21 | |||
22 | /* General-purpose IO */ | ||
23 | |||
24 | #define PORTCFG0 (*(volatile unsigned long *)0xF005A000) | ||
25 | #define PORTCFG1 (*(volatile unsigned long *)0xF005A004) | ||
26 | #define PORTCFG2 (*(volatile unsigned long *)0xF005A008) | ||
27 | #define PORTCFG3 (*(volatile unsigned long *)0xF005A00C) | ||
28 | |||
29 | #define GPIOA (*(volatile unsigned long *)0xF005A020) | ||
30 | #define GPIOB (*(volatile unsigned long *)0xF005A040) | ||
31 | #define GPIOC (*(volatile unsigned long *)0xF005A060) | ||
32 | #define GPIOD (*(volatile unsigned long *)0xF005A080) | ||
33 | #define GPIOE (*(volatile unsigned long *)0xF005A0A0) | ||
34 | |||
35 | #define GPIOA_DIR (*(volatile unsigned long *)0xF005A024) | ||
36 | #define GPIOB_DIR (*(volatile unsigned long *)0xF005A044) | ||
37 | #define GPIOC_DIR (*(volatile unsigned long *)0xF005A064) | ||
38 | #define GPIOD_DIR (*(volatile unsigned long *)0xF005A084) | ||
39 | #define GPIOE_DIR (*(volatile unsigned long *)0xF005A0A4) | ||
40 | |||
41 | #define GPIOA_SET (*(volatile unsigned long *)0xF005A028) | ||
42 | #define GPIOB_SET (*(volatile unsigned long *)0xF005A048) | ||
43 | #define GPIOC_SET (*(volatile unsigned long *)0xF005A068) | ||
44 | #define GPIOD_SET (*(volatile unsigned long *)0xF005A088) | ||
45 | #define GPIOE_SET (*(volatile unsigned long *)0xF005A0A8) | ||
46 | |||
47 | #define GPIOA_CLEAR (*(volatile unsigned long *)0xF005A02C) | ||
48 | #define GPIOB_CLEAR (*(volatile unsigned long *)0xF005A04C) | ||
49 | #define GPIOC_CLEAR (*(volatile unsigned long *)0xF005A06C) | ||
50 | #define GPIOD_CLEAR (*(volatile unsigned long *)0xF005A08C) | ||
51 | #define GPIOE_CLEAR (*(volatile unsigned long *)0xF005A0AC) | ||
52 | |||
53 | /* Clock Generator */ | ||
54 | |||
55 | #define CLKCTRL (*(volatile unsigned long *)0xF3000000) | ||
56 | #define PLL0CFG (*(volatile unsigned long *)0xF3000004) | ||
57 | #define PLL1CFG (*(volatile unsigned long *)0xF3000008) | ||
58 | #define CLKDIVC (*(volatile unsigned long *)0xF300000C) | ||
59 | #define CLKDIVC1 (*(volatile unsigned long *)0xF3000010) | ||
60 | #define MODECTR (*(volatile unsigned long *)0xF3000014) | ||
61 | #define BCLKCTR (*(volatile unsigned long *)0xF3000018) | ||
62 | #define SWRESET (*(volatile unsigned long *)0xF300001C) | ||
63 | #define PCLKCFG0 (*(volatile unsigned long *)0xF3000020) | ||
64 | #define PCLKCFG1 (*(volatile unsigned long *)0xF3000024) | ||
65 | #define PCLKCFG2 (*(volatile unsigned long *)0xF3000028) | ||
66 | #define PCLKCFG3 (*(volatile unsigned long *)0xF300002C) | ||
67 | #define PCLK_LCD (*(volatile unsigned long *)0xF3000030) | ||
68 | #define PCLKCFG5 (*(volatile unsigned long *)0xF3000034) | ||
69 | #define PCLKCFG6 (*(volatile unsigned long *)0xF3000038) | ||
70 | #define PCLKCFG7 (*(volatile unsigned long *)0xF300003C) | ||
71 | #define PCLKCFG8 (*(volatile unsigned long *)0xF3000040) | ||
72 | #define PCLK_TCT (*(volatile unsigned long *)0xF3000044) | ||
73 | #define PCLKCFG10 (*(volatile unsigned long *)0xF3000048) | ||
74 | #define PCLKCFG11 (*(volatile unsigned long *)0xF300004C) | ||
75 | #define PCLK_ADC (*(volatile unsigned long *)0xF3000050) | ||
76 | #define PCLKCFG13 (*(volatile unsigned long *)0xF3000054) | ||
77 | #define PCLKCFG14 (*(volatile unsigned long *)0xF3000058) | ||
78 | #define PCLK_RFREQ (*(volatile unsigned long *)0xF300005C) | ||
79 | #define PCLKCFG16 (*(volatile unsigned long *)0xF3000060) | ||
80 | #define PCLKCFG17 (*(volatile unsigned long *)0xF3000064) | ||
81 | |||
82 | #define PCK_EN (1<<28) | ||
83 | |||
84 | #define CKSEL_PLL0 0 | ||
85 | #define CKSEL_PLL1 1 | ||
86 | #define CKSEL_XIN 4 | ||
87 | |||
88 | /* IRQ Controller */ | ||
89 | |||
90 | #define IEN (*(volatile unsigned long *)0xF3001000) | ||
91 | #define CREQ (*(volatile unsigned long *)0xF3001004) | ||
92 | #define IRQSEL (*(volatile unsigned long *)0xF300100C) | ||
93 | #define MREQ (*(volatile unsigned long *)0xF3001014) | ||
94 | #define MIRQ (*(volatile unsigned long *)0xF3001028) | ||
95 | #define MFIQ (*(volatile unsigned long *)0xF300102C) | ||
96 | #define ALLMASK (*(volatile unsigned long *)0xF3001044) | ||
97 | #define VAIRQ (*(volatile unsigned long *)0xF3001080) | ||
98 | #define VAFIQ (*(volatile unsigned long *)0xF3001084) | ||
99 | #define VNIRQ (*(volatile unsigned long *)0xF3001088) | ||
100 | #define VNFIQ (*(volatile unsigned long *)0xF300108C) | ||
101 | |||
102 | #define TIMER_IRQ_MASK (1<<6) | ||
103 | |||
104 | /* Timer / Counters */ | ||
105 | |||
106 | #define TCFG0 (*(volatile unsigned long *)0xF3003000) | ||
107 | #define TCNT0 (*(volatile unsigned long *)0xF3003004) | ||
108 | #define TREF0 (*(volatile unsigned long *)0xF3003008) | ||
109 | #define TCFG1 (*(volatile unsigned long *)0xF3003010) | ||
110 | #define TCNT1 (*(volatile unsigned long *)0xF3003014) | ||
111 | #define TREF1 (*(volatile unsigned long *)0xF3003018) | ||
112 | |||
113 | #define TIREQ (*(volatile unsigned long *)0xF3003060) | ||
114 | /* ref. value reached */ | ||
115 | #define TF0 (1<<8) | ||
116 | #define TF1 (1<<9) | ||
117 | /* irq. status */ | ||
118 | #define TI0 (1<<0) | ||
119 | #define TI1 (1<<1) | ||
120 | |||
121 | #define TC32EN (*(volatile unsigned long *)0xF3003080) | ||
122 | #define TC32LDV (*(volatile unsigned long *)0xF3003084) | ||
123 | #define TC32MCNT (*(volatile unsigned long *)0xF3003094) | ||
124 | #define TC32IRQ (*(volatile unsigned long *)0xF3003098) | ||
125 | |||
126 | /* ADC */ | ||
127 | |||
128 | #define ADCCON (*(volatile unsigned long *)0xF3004000) | ||
129 | #define ADCDATA (*(volatile unsigned long *)0xF3004004) | ||
130 | #define ADCCONA (*(volatile unsigned long *)0xF3004080) | ||
131 | #define ADCSTATUS (*(volatile unsigned long *)0xF3004084) | ||
132 | #define ADCCFG (*(volatile unsigned long *)0xF3004088) | ||
133 | |||
134 | /* Memory Controller */ | ||
135 | |||
136 | #define SDCFG (*(volatile unsigned long *)0xF1000000) | ||
137 | #define SDFSM (*(volatile unsigned long *)0xF1000004) | ||
138 | #define MCFG (*(volatile unsigned long *)0xF1000008) | ||
139 | #define CSCFG0 (*(volatile unsigned long *)0xF1000010) | ||
140 | #define CSCFG1 (*(volatile unsigned long *)0xF1000014) | ||
141 | #define CSCFG2 (*(volatile unsigned long *)0xF1000018) | ||
142 | #define CSCFG3 (*(volatile unsigned long *)0xF100001C) | ||
143 | #define CLKCFG (*(volatile unsigned long *)0xF1000020) | ||
144 | #define SDCMD (*(volatile unsigned long *)0xF1000024) | ||
145 | |||
146 | #define SDCFG1 (*(volatile unsigned long *)0xF1001000) | ||
147 | #define MCFG1 (*(volatile unsigned long *)0xF1001008) | ||
148 | |||
149 | /* Misc */ | ||
150 | |||
151 | #define ECFG0 (*(volatile unsigned long *)0xF300500C) | ||
152 | #define MBCFG (*(volatile unsigned long *)0xF3005020) | ||
153 | |||
154 | #define TCC780_VER (*(volatile unsigned long *)0xE0001FFC) | ||
155 | |||
156 | #endif | ||