summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2006-11-08 16:13:04 +0000
committerMichael Sevakis <jethead71@rockbox.org>2006-11-08 16:13:04 +0000
commite89a3940f9f8c6c6c437354ed49070649976f10e (patch)
tree4abca9ca6a4483791d8a25a49a08c348234b4dd4
parentf9c8a891af12fdb76c6e6ff0bec3ce47d8a47e9f (diff)
downloadrockbox-e89a3940f9f8c6c6c437354ed49070649976f10e.tar.gz
rockbox-e89a3940f9f8c6c6c437354ed49070649976f10e.zip
More exodus to the target tree for ColdFire and a bonus sorting of firmware/SOURCES.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11468 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/SOURCES497
-rwxr-xr-xfirmware/drivers/lcd.S238
-rw-r--r--firmware/drivers/power.c68
-rw-r--r--firmware/export/config.h5
-rw-r--r--firmware/target/coldfire/i2c-coldfire.c (renamed from firmware/drivers/i2c-coldfire.c)0
-rw-r--r--firmware/target/coldfire/iriver/h100/lcd-h100.c (renamed from firmware/drivers/lcd-h100.c)0
-rw-r--r--firmware/target/coldfire/iriver/h300/lcd-h300.c (renamed from firmware/drivers/lcd-h300.c)0
-rw-r--r--firmware/target/coldfire/system-target.h4
8 files changed, 372 insertions, 440 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 43e48780c9..2b3e632ed7 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -1,24 +1,43 @@
1common/unicode.c 1ata_idle_notify.c
2#ifdef ROCKBOX_HAS_LOGF
3logf.c
4#endif
5backlight.c 2backlight.c
6buffer.c 3buffer.c
7general.c 4id3.c
5powermgmt.c
6system.c
7usb.c
8#ifdef ROCKBOX_HAS_LOGF
9logf.c
10#endif /* ROCKBOX_HAS_LOGF */
11#ifndef SIMULATOR
12#ifdef RB_PROFILE
13profile.c
14#endif /* RB_PROFILE */
15hwcompat.c
16kernel.c
17rolo.c
18thread.c
19timer.c
20#endif /* SIMULATOR */
21#if !defined(WIN32) || defined(SDL)
22panic.c
23debug.c
24#endif /* !defined(WIN32) || defined(SDL) */
25
26/* Common */
8common/atoi.c 27common/atoi.c
9common/crc32.c 28common/crc32.c
10common/ctype.c 29common/ctype.c
11#ifndef SIMULATOR 30#ifndef SIMULATOR
12common/dir.c 31common/dir.c
13common/file.c 32common/file.c
14#endif 33#endif /* SIMULATOR */
15#ifdef HAVE_DIRCACHE 34#ifdef HAVE_DIRCACHE
16common/dircache.c 35common/dircache.c
17#endif 36#endif /* HAVE_DIRCACHE */
18common/disk.c 37common/disk.c
19#if !defined(SIMULATOR) || defined(__MINGW32__) || defined(__CYGWIN__) 38#if !defined(SIMULATOR) || defined(__MINGW32__) || defined(__CYGWIN__)
20common/errno.c 39common/errno.c
21#endif 40#endif /* !defined(SIMULATOR) || defined(__MINGW32__) || defined(__CYGWIN__) */
22common/memcmp.c 41common/memcmp.c
23common/memchr.c 42common/memchr.c
24common/qsort.c 43common/qsort.c
@@ -30,190 +49,114 @@ common/strcat.c
30common/strchr.c 49common/strchr.c
31common/strcmp.c 50common/strcmp.c
32common/strcpy.c 51common/strcpy.c
33#if (CONFIG_CPU == SH7034) && !defined(SIMULATOR)
34target/sh/strlen-sh.S
35#else
36common/strlen.c
37#endif
38common/strncmp.c 52common/strncmp.c
39common/strncpy.c 53common/strncpy.c
40common/strrchr.c 54common/strrchr.c
41common/strtok.c 55common/strtok.c
42common/timefuncs.c 56common/timefuncs.c
57common/unicode.c
43 58
44#ifdef CPU_COLDFIRE 59/* Display */
45target/coldfire/memcpy-coldfire.S
46target/coldfire/memmove-coldfire.S
47target/coldfire/memset-coldfire.S
48target/coldfire/memset16-coldfire.S
49#ifndef SIMULATOR
50#ifndef BOOTLOADER
51target/coldfire/pcm-coldfire.c
52#endif
53target/coldfire/system-coldfire.c
54#endif
55#elif (CONFIG_CPU == SH7034)
56target/sh/memcpy-sh.S
57target/sh/memmove-sh.S
58target/sh/memset-sh.S
59#elif defined(CPU_ARM)
60common/memcpy.c
61common/memmove.c
62target/arm/memset-arm.S
63target/arm/memset16-arm.S
64#else
65common/memcpy.c
66common/memmove.c
67common/memset.c
68common/memset16.c
69#endif
70#ifdef HAVE_LCD_CHARCELLS 60#ifdef HAVE_LCD_CHARCELLS
71drivers/lcd-player-charset.c 61drivers/lcd-player-charset.c
72drivers/lcd-player.c 62drivers/lcd-player.c
73#endif 63#endif /* HAVE_LCD_CHARCELLS */
64
74#ifdef HAVE_LCD_BITMAP 65#ifdef HAVE_LCD_BITMAP
75arabjoin.c 66arabjoin.c
76bidi.c 67bidi.c
68font_cache.c
69font.c
77hangul.c 70hangul.c
71lru.c
78#if LCD_DEPTH == 1 72#if LCD_DEPTH == 1
79drivers/lcd-recorder.c 73drivers/lcd-recorder.c
80#elif LCD_DEPTH == 2 74#elif LCD_DEPTH == 2
81#if (LCD_PIXELFORMAT == HORIZONTAL_PACKING) 75#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
82drivers/lcd-2bit-horz.c 76drivers/lcd-2bit-horz.c
83#else 77#endif /* LCD_PIXELFORMAT == HORIZONTAL_PACKING */
84drivers/lcd-h100.c
85#endif
86#elif LCD_DEPTH == 16 78#elif LCD_DEPTH == 16
87drivers/lcd-16bit.c 79drivers/lcd-16bit.c
88#endif 80#endif /* LCD_DEPTH */
89#endif 81#endif /* HAVE_LCD_BITMAP */
82
90#ifdef HAVE_REMOTE_LCD 83#ifdef HAVE_REMOTE_LCD
91#if LCD_REMOTE_DEPTH == 1 84#if LCD_REMOTE_DEPTH == 1
92drivers/lcd-h100-remote.c 85drivers/lcd-h100-remote.c
93#elif LCD_REMOTE_DEPTH == 2 86#elif LCD_REMOTE_DEPTH == 2
94drivers/lcd-remote-2bit-vi.c 87drivers/lcd-remote-2bit-vi.c
95#endif 88#endif /* LCD_REMOTE_DEPTH */
96#endif 89#endif /* HAVE_REMOTE_LCD */
97#if CONFIG_LCD==LCD_H300 90
98drivers/lcd-h300.c 91/* Misc. */
99#endif
100#ifndef TARGET_TREE
101drivers/power.c
102#endif
103drivers/led.c 92drivers/led.c
104#ifndef SIMULATOR
105#ifndef TARGET_TREE 93#ifndef TARGET_TREE
106drivers/adc.c 94drivers/adc.c
107#endif 95drivers/power.c
96#endif /* TARGET_TREE */
97#ifndef SIMULATOR
98drivers/button.c
99drivers/dac.c
100drivers/serial.c
101#endif /* SIMULATOR */
102
103/* Storage */
104#ifndef SIMULATOR
108#ifdef HAVE_MMC 105#ifdef HAVE_MMC
109drivers/ata_mmc.c 106drivers/ata_mmc.c
110#else 107#else /* !HAVE_MMC */
111#ifdef HAVE_FLASH_DISK 108#ifdef HAVE_FLASH_DISK
112drivers/ata_flash.c 109drivers/ata_flash.c
113#else 110#else /* !HAVE_FLASH_DISK */
114#ifndef SANSA_E200 111#ifndef SANSA_E200
115drivers/ata.c 112drivers/ata.c
116#endif 113#endif /* SANSA_E200 */
117#endif 114#endif /* HAVE_FLASH_DISK */
118#endif 115#endif /* HAVE_MMC */
119drivers/button.c
120drivers/dac.c
121drivers/fat.c 116drivers/fat.c
117#endif /* SIMULATOR */
118
119/* EEPROM */
120#ifdef HAVE_EEPROM
121drivers/eeprom_24cxx.c
122#ifdef HAVE_EEPROM_SETTINGS
123eeprom_settings.c
124#endif /* HAVE_EEPROM_SETTINGS */
125#endif /* HAVE_EEPROM */
126
127/* RTC */
128#if (CONFIG_RTC == RTC_M41ST84W) \
129 || (CONFIG_RTC == RTC_PCF50606) \
130 || (CONFIG_RTC == RTC_PCF50605) \
131 || (CONFIG_RTC == RTC_E8564)
132#ifndef SIMULATOR
133drivers/rtc.c
134#endif /* SIMULATOR */
135#endif /* (CONFIG_RTC == RTC_*)
136
137/* Tuner */
122#ifdef CONFIG_TUNER 138#ifdef CONFIG_TUNER
139#ifndef SIMULATOR
123#if (CONFIG_TUNER & S1A0903X01) 140#if (CONFIG_TUNER & S1A0903X01)
124drivers/fmradio.c 141drivers/fmradio.c
125tuner_samsung.c 142tuner_samsung.c
126#endif 143#endif /* (CONFIG_TUNER & S1A0903X01) */
127#if (CONFIG_TUNER & TEA5767) 144#if (CONFIG_TUNER & TEA5767)
128drivers/fmradio_i2c.c 145drivers/fmradio_i2c.c
129tuner_philips.c 146tuner_philips.c
130#endif 147#endif /* (CONFIG_TUNER & TEA5767) */
131#endif 148#endif /*SIMULATOR */
132#if CONFIG_I2C == I2C_COLDFIRE 149#endif /* CONFIG_TUNER */
133drivers/i2c-coldfire.c 150
134#elif CONFIG_I2C == I2C_PP5020 151/* Sound */
135drivers/i2c-pp5020.c
136#elif CONFIG_I2C == I2C_PP5002
137drivers/i2c-pp5002.c
138#elif CONFIG_I2C == I2C_PNX0101
139drivers/i2c-pnx0101.c
140#elif CONFIG_I2C == I2C_S3C2440
141/* no i2c driver yet */
142#else
143drivers/i2c.c
144#endif
145#if CONFIG_CODEC != SWCODEC
146drivers/mas.c
147#endif
148#ifdef HAVE_EEPROM
149drivers/eeprom_24cxx.c
150#ifdef HAVE_EEPROM_SETTINGS
151eeprom_settings.c
152#endif
153#endif
154#if (CONFIG_RTC == RTC_M41ST84W) || (CONFIG_RTC == RTC_PCF50606) \
155 || (CONFIG_RTC == RTC_PCF50605) || (CONFIG_RTC == RTC_E8564)
156drivers/rtc.c
157#endif
158drivers/serial.c
159#endif /* !SIMULATOR */
160#ifdef HAVE_LCD_BITMAP
161lru.c
162font_cache.c
163font.c
164#endif
165id3.c
166ata_idle_notify.c
167#ifndef SIMULATOR
168#ifdef RB_PROFILE
169profile.c
170#endif /* RB_PROFILE */
171hwcompat.c
172kernel.c
173rolo.c
174thread.c
175timer.c
176#ifdef CPU_PP
177target/arm/crt0-pp.S
178#elif defined(CPU_ARM)
179target/arm/crt0.S
180#elif defined(CPU_COLDFIRE)
181target/coldfire/crt0.S
182#elif CONFIG_CPU == SH7034
183target/sh/crt0.S
184#else
185crt0.S
186#endif
187drivers/lcd.S
188#endif
189mp3_playback.c 152mp3_playback.c
190mp3data.c 153mp3data.c
191#if CONFIG_CODEC != SWCODEC 154sound.c
192mpeg.c 155
193#endif 156#if CONFIG_CODEC == SWCODEC
194#if !defined(WIN32) || defined(SDL) 157
195panic.c 158#ifndef BOOTLOADER
196debug.c 159general.c
197#endif
198powermgmt.c
199system.c
200usb.c
201#if (CONFIG_CPU == SH7034) && !defined(SIMULATOR)
202bitswap.S
203descramble.S
204#endif
205#if defined(HAVE_UDA1380) && !defined(SIMULATOR)
206drivers/uda1380.c
207#elif (defined(HAVE_WM8975) || defined(HAVE_WM8751)) && !defined(SIMULATOR)
208drivers/wm8975.c
209#elif defined(HAVE_WM8758) && !defined(SIMULATOR)
210drivers/wm8758.c
211#elif (defined(HAVE_WM8731) || defined(HAVE_WM8721)) && !defined(SIMULATOR)
212drivers/wm8731l.c
213#elif defined(HAVE_TLV320) && !defined(SIMULATOR)
214drivers/tlv320.c
215#endif
216#if (CONFIG_CODEC == SWCODEC) && !defined(BOOTLOADER)
217pcm_sampr.c 160pcm_sampr.c
218replaygain.c 161replaygain.c
219#ifndef SIMULATOR 162#ifndef SIMULATOR
@@ -221,51 +164,155 @@ pcm_playback.c
221#endif /* SIMULATOR */ 164#endif /* SIMULATOR */
222#ifdef HAVE_RECORDING 165#ifdef HAVE_RECORDING
223enc_base.c 166enc_base.c
224#if defined(CPU_COLDFIRE)
225#ifndef SIMULATOR 167#ifndef SIMULATOR
226pcm_record.c 168pcm_record.c
227#endif /* SIMULATOR */ 169#endif /* SIMULATOR */
228#endif /* CPU_COLDFIRE */
229#endif /* HAVE_RECORDING */ 170#endif /* HAVE_RECORDING */
230#endif /* SWCODEC && !BOOTLOADER */ 171#endif /* BOOTLOADER */
231sound.c 172
232#if defined(IRIVER_IFP7XX_SERIES) && defined(STUB) 173#else /* !SWCODEC */
233common/sscanf.c 174
234usb_serial.c 175#ifndef BOOTLOADER
235#endif 176mpeg.c
177#ifndef SIMULATOR
178drivers/mas.c
179#endif /* SIMULATOR */
180#endif /* BOOTLOADER */
181
182#endif /* SWCODEC */
183
184/* Audio codec */
185#ifndef SIMULATOR
186#if defined(HAVE_UDA1380)
187drivers/uda1380.c
188#elif defined(HAVE_WM8975) || defined(HAVE_WM8751)
189drivers/wm8975.c
190#elif defined(HAVE_WM8758)
191drivers/wm8758.c
192#elif defined(HAVE_WM8731) || defined(HAVE_WM8721)
193drivers/wm8731l.c
194#elif defined(HAVE_TLV320)
195drivers/tlv320.c
196#endif /* defined(HAVE_*) */
197#endif /* SIMULATOR */
198
199/* USBOTG */
200#if !defined(SIMULATOR) && !defined(BOOTLOADER)
236#if CONFIG_USBOTG == USBOTG_ISP1362 201#if CONFIG_USBOTG == USBOTG_ISP1362
237drivers/isp1362.c 202drivers/isp1362.c
238#endif 203#elif CONFIG_USBOTG == USBOTG_M5636
239#if CONFIG_USBOTG == USBOTG_M5636
240drivers/m5636.c 204drivers/m5636.c
205#endif /* CONFIG_USBOTG */
206#endif /* !defined(SIMULATOR) && !defined(BOOTLOADER) */
207
208/* CPU Specific - By class then particular chip if applicable */
209#if defined(CPU_SH)
210
211#ifndef SIMULATOR
212bitswap.S
213crt0.S
214descramble.S
215drivers/i2c.c
216drivers/lcd.S
217target/sh/crt0.S
218target/sh/memcpy-sh.S
219target/sh/memmove-sh.S
220target/sh/memset-sh.S
221target/sh/strlen-sh.S
222#endif /* SIMULATOR */
223
224#elif defined(CPU_COLDFIRE)
225
226common/strlen.c
227#ifndef SIMULATOR
228target/coldfire/crt0.S
229target/coldfire/memcpy-coldfire.S
230target/coldfire/memmove-coldfire.S
231target/coldfire/memset-coldfire.S
232#ifdef HAVE_LCD_COLOR
233target/coldfire/memset16-coldfire.S
234#endif /* HAVE_LCD_COLOR */
235target/coldfire/system-coldfire.c
236#ifndef BOOTLOADER
237target/coldfire/pcm-coldfire.c
238#endif /* BOOTLOADER */
239#if CONFIG_I2C == I2C_COLDFIRE
240target/coldfire/i2c-coldfire.c
241#endif /* CONFIG_I2C == I2C_COLDFIRE */
242#endif /* SIMULATOR */
243
244#elif defined(CPU_PP) || defined(CPU_ARM)
245/* CPU_PP => CPU_ARM, CPU_ARM !=> CPU_PP */
246common/memcpy.c
247common/memmove.c
248common/strlen.c
249drivers/lcd.S
250#ifndef SIMULATOR
251target/arm/memset-arm.S
252target/arm/memset16-arm.S
253#if CONFIG_I2C == I2C_PP5020
254drivers/i2c-pp5020.c
255#elif CONFIG_I2C == I2C_PP5002
256drivers/i2c-pp5002.c
257#elif CONFIG_I2C == I2C_PNX0101
258drivers/i2c-pnx0101.c
259#elif CONFIG_I2C == I2C_S3C2440
260/* no i2c driver yet */
241#endif 261#endif
262#if defined(CPU_PP)
263target/arm/crt0-pp.S
264#elif defined(CPU_ARM)
265target/arm/crt0.S
266#endif /* defined(CPU_*) */
267#endif /* SIMULATOR */
268
269#else
270
271common/memcpy.c
272common/memmove.c
273common/memset.c
274common/memset16.c
275common/strlen.c
276#ifndef SIMULATOR
277crt0.S
278drivers/i2c.c
279#endif /* SIMULATOR */
280
281#endif /* defined(CPU_*) */
242 282
243#ifdef SANSA_E200 283#ifdef SANSA_E200
244#ifndef SIMULATOR 284#ifndef SIMULATOR
285target/arm/wmcodec-pp.c
245target/arm/sandisk/sansa-e200/ata-e200.c 286target/arm/sandisk/sansa-e200/ata-e200.c
246target/arm/sandisk/sansa-e200/lcd-e200.c 287target/arm/sandisk/sansa-e200/lcd-e200.c
247target/arm/sandisk/sansa-e200/adc-e200.c 288target/arm/sandisk/sansa-e200/adc-e200.c
248target/arm/wmcodec-pp.c 289#endif /* SIMULATOR */
249#endif 290#endif /* SANSA_E200 */
250#endif
251 291
252#ifdef IAUDIO_X5 292#ifdef IAUDIO_X5
253target/coldfire/iaudio/x5/power-x5.c 293target/coldfire/iaudio/x5/power-x5.c
254#ifndef SIMULATOR 294#ifndef SIMULATOR
295target/coldfire/pcf50606-coldfire.c
296target/coldfire/iaudio/x5/adc-x5.c
297target/coldfire/iaudio/x5/ata-x5.c
298target/coldfire/iaudio/x5/backlight-x5.c
255target/coldfire/iaudio/x5/button-x5.c 299target/coldfire/iaudio/x5/button-x5.c
256target/coldfire/iaudio/x5/lcd-as-x5.S 300target/coldfire/iaudio/x5/lcd-as-x5.S
301target/coldfire/iaudio/x5/lcd-remote-x5.c
257target/coldfire/iaudio/x5/lcd-x5.c 302target/coldfire/iaudio/x5/lcd-x5.c
258target/coldfire/pcf50606-coldfire.c 303target/coldfire/iaudio/x5/m5636-x5.c
259target/coldfire/iaudio/x5/pcf50606-x5.c 304target/coldfire/iaudio/x5/pcf50606-x5.c
260target/coldfire/iaudio/x5/adc-x5.c
261target/coldfire/iaudio/x5/ata-x5.c
262target/coldfire/iaudio/x5/system-x5.c 305target/coldfire/iaudio/x5/system-x5.c
263target/coldfire/iaudio/x5/usb-x5.c 306target/coldfire/iaudio/x5/usb-x5.c
264target/coldfire/iaudio/x5/backlight-x5.c 307#endif /* SIMULATOR */
265target/coldfire/iaudio/x5/m5636-x5.c 308#endif /* IAUDIO_X5 */
266target/coldfire/iaudio/x5/lcd-remote-x5.c 309
267#endif 310#ifdef IRIVER_IFP7XX_SERIES
268#endif 311#ifdef STUB
312usb_serial.c
313common/sscanf.c
314#endif /* STUB */
315#endif /* IRIVER_IFP7XX_SERIES */
269 316
270#ifdef IRIVER_H300_SERIES 317#ifdef IRIVER_H300_SERIES
271target/coldfire/iriver/h300/power-h300.c 318target/coldfire/iriver/h300/power-h300.c
@@ -276,13 +323,15 @@ target/coldfire/iriver/system-iriver.c
276target/coldfire/iriver/h300/adc-h300.c 323target/coldfire/iriver/h300/adc-h300.c
277target/coldfire/iriver/h300/backlight-h300.c 324target/coldfire/iriver/h300/backlight-h300.c
278target/coldfire/iriver/h300/button-h300.c 325target/coldfire/iriver/h300/button-h300.c
279target/coldfire/iriver/h300/lcd-as-h300.S
280target/coldfire/iriver/h300/pcf50606-h300.c 326target/coldfire/iriver/h300/pcf50606-h300.c
327target/coldfire/iriver/h300/lcd-as-h300.S
328target/coldfire/iriver/h300/lcd-h300.c
281target/coldfire/iriver/h300/usb-h300.c 329target/coldfire/iriver/h300/usb-h300.c
282#endif 330#endif /* SIMULATOR */
283#endif 331#endif /* IRIVER_H300_SERIES */
284 332
285#ifdef IRIVER_H100_SERIES 333#ifdef IRIVER_H100_SERIES
334target/coldfire/iriver/h100/lcd-h100.c
286target/coldfire/iriver/h100/power-h100.c 335target/coldfire/iriver/h100/power-h100.c
287#ifndef SIMULATOR 336#ifndef SIMULATOR
288target/coldfire/iriver/ata-iriver.c 337target/coldfire/iriver/ata-iriver.c
@@ -290,160 +339,160 @@ target/coldfire/iriver/system-iriver.c
290target/coldfire/iriver/h100/adc-h100.c 339target/coldfire/iriver/h100/adc-h100.c
291target/coldfire/iriver/h100/backlight-h100.c 340target/coldfire/iriver/h100/backlight-h100.c
292target/coldfire/iriver/h100/button-h100.c 341target/coldfire/iriver/h100/button-h100.c
342target/coldfire/iriver/h100/lcd-as-h100.S
293target/coldfire/iriver/h100/usb-h100.c 343target/coldfire/iriver/h100/usb-h100.c
294#endif 344#endif /* SIMULATOR */
295#endif 345#endif /* IRIVER_H100_SERIES */
296 346
297#ifdef IRIVER_H10 347#ifdef IRIVER_H10
298#ifndef SIMULATOR 348#ifndef SIMULATOR
349target/arm/ata-pp5020.c
350target/arm/wmcodec-pp.c
351target/arm/iriver/h10/adc-h10.c
299target/arm/iriver/h10/backlight-h10.c 352target/arm/iriver/h10/backlight-h10.c
300target/arm/iriver/h10/button-h10.c 353target/arm/iriver/h10/button-h10.c
301target/arm/ata-pp5020.c 354target/arm/iriver/h10/lcd-h10_20gb.c
302target/arm/iriver/h10/power-h10.c 355target/arm/iriver/h10/power-h10.c
303target/arm/iriver/h10/usb-h10.c 356target/arm/iriver/h10/usb-h10.c
304target/arm/iriver/h10/lcd-h10_20gb.c 357#endif /* SIMULATOR */
305target/arm/iriver/h10/adc-h10.c 358#endif /* IRIVER_H10 */
306target/arm/wmcodec-pp.c
307#endif
308#endif
309 359
310#ifdef IRIVER_H10_5GB 360#ifdef IRIVER_H10_5GB
311#ifndef SIMULATOR 361#ifndef SIMULATOR
362target/arm/ata-pp5020.c
363target/arm/wmcodec-pp.c
364target/arm/iriver/h10/adc-h10.c
312target/arm/iriver/h10/backlight-h10.c 365target/arm/iriver/h10/backlight-h10.c
313target/arm/iriver/h10/button-h10.c 366target/arm/iriver/h10/button-h10.c
314target/arm/ata-pp5020.c 367target/arm/iriver/h10/lcd-h10_5gb.c
315target/arm/iriver/h10/power-h10.c 368target/arm/iriver/h10/power-h10.c
316target/arm/iriver/h10/usb-h10.c 369target/arm/iriver/h10/usb-h10.c
317target/arm/iriver/h10/lcd-h10_5gb.c 370#endif /* SIMULATOR */
318target/arm/iriver/h10/adc-h10.c 371#endif /* IRIVER_H10_5GB */
319target/arm/wmcodec-pp.c
320#endif
321#endif
322 372
323#ifdef GIGABEAT_F 373#ifdef GIGABEAT_F
324#ifndef SIMULATOR 374#ifndef SIMULATOR
375drivers/generic_i2c.c
376target/arm/gigabeat/meg-fx/adc-meg-fx.c
377target/arm/gigabeat/meg-fx/ata-meg-fx.c
325target/arm/gigabeat/meg-fx/backlight-meg-fx.c 378target/arm/gigabeat/meg-fx/backlight-meg-fx.c
326target/arm/gigabeat/meg-fx/button-meg-fx.c 379target/arm/gigabeat/meg-fx/button-meg-fx.c
327target/arm/gigabeat/meg-fx/ata-meg-fx.c 380target/arm/gigabeat/meg-fx/i2c-meg-fx.c
328target/arm/gigabeat/meg-fx/power-meg-fx.c
329target/arm/gigabeat/meg-fx/usb-meg-fx.c
330target/arm/gigabeat/meg-fx/lcd-meg-fx.c 381target/arm/gigabeat/meg-fx/lcd-meg-fx.c
382target/arm/gigabeat/meg-fx/power-meg-fx.c
331target/arm/gigabeat/meg-fx/sc606-meg-fx.c 383target/arm/gigabeat/meg-fx/sc606-meg-fx.c
332target/arm/gigabeat/meg-fx/adc-meg-fx.c 384target/arm/gigabeat/meg-fx/usb-meg-fx.c
333drivers/generic_i2c.c
334target/arm/gigabeat/meg-fx/i2c-meg-fx.c
335target/arm/gigabeat/meg-fx/wmcodec-meg-fx.c 385target/arm/gigabeat/meg-fx/wmcodec-meg-fx.c
336#endif 386#endif /* SIMULATOR */
337#endif 387#endif /* GIGABEAT_F */
338 388
339#ifdef ELIO_TPJ1022 389#ifdef ELIO_TPJ1022
340#ifndef SIMULATOR 390#ifndef SIMULATOR
391target/arm/ata-pp5020.c
392target/arm/wmcodec-pp.c
393target/arm/tatung/tpj1022/adc-tpj1022.c
341target/arm/tatung/tpj1022/backlight-tpj1022.c 394target/arm/tatung/tpj1022/backlight-tpj1022.c
342target/arm/tatung/tpj1022/button-tpj1022.c 395target/arm/tatung/tpj1022/button-tpj1022.c
343target/arm/ata-pp5020.c 396target/arm/tatung/tpj1022/lcd-tpj1022.c
344target/arm/tatung/tpj1022/power-tpj1022.c 397target/arm/tatung/tpj1022/power-tpj1022.c
345target/arm/tatung/tpj1022/usb-tpj1022.c 398target/arm/tatung/tpj1022/usb-tpj1022.c
346target/arm/tatung/tpj1022/lcd-tpj1022.c 399#endif /* SIMULATOR */
347target/arm/tatung/tpj1022/adc-tpj1022.c 400#endif /* ELIO_TPJ1022 */
348target/arm/wmcodec-pp.c
349#endif
350#endif
351 401
352#ifdef IPOD_4G 402#ifdef IPOD_4G
353#ifndef SIMULATOR 403#ifndef SIMULATOR
354drivers/lcd-ipod.c 404drivers/lcd-ipod.c
355drivers/pcf50605.c 405drivers/pcf50605.c
406target/arm/wmcodec-pp.c
356target/arm/ata-pp5020.c 407target/arm/ata-pp5020.c
357target/arm/ipod/adc-ipod.c 408target/arm/ipod/adc-ipod.c
358target/arm/ipod/backlight-4g_color.c 409target/arm/ipod/backlight-4g_color.c
359target/arm/ipod/button-clickwheel.c 410target/arm/ipod/button-clickwheel.c
360target/arm/ipod/power-ipod.c 411target/arm/ipod/power-ipod.c
361target/arm/ipod/usb-ipod.c 412target/arm/ipod/usb-ipod.c
362target/arm/wmcodec-pp.c 413#endif /* SIMULATOR */
363#endif 414#endif /* IPOD_4G */
364#endif
365 415
366#ifdef IPOD_COLOR 416#ifdef IPOD_COLOR
367#ifndef SIMULATOR 417#ifndef SIMULATOR
368drivers/lcd-ipod.c 418drivers/lcd-ipod.c
369drivers/pcf50605.c 419drivers/pcf50605.c
370target/arm/ata-pp5020.c 420target/arm/ata-pp5020.c
421target/arm/wmcodec-pp.c
371target/arm/ipod/adc-ipod.c 422target/arm/ipod/adc-ipod.c
372target/arm/ipod/backlight-4g_color.c 423target/arm/ipod/backlight-4g_color.c
373target/arm/ipod/button-clickwheel.c 424target/arm/ipod/button-clickwheel.c
374target/arm/ipod/power-ipod.c 425target/arm/ipod/power-ipod.c
375target/arm/ipod/usb-ipod.c 426target/arm/ipod/usb-ipod.c
376target/arm/wmcodec-pp.c 427#endif /* SIMULATOR */
377#endif 428#endif /* IPOD_COLOR */
378#endif
379 429
380#ifdef IPOD_NANO 430#ifdef IPOD_NANO
381#ifndef SIMULATOR 431#ifndef SIMULATOR
382drivers/lcd-ipod.c 432drivers/lcd-ipod.c
383drivers/pcf50605.c 433drivers/pcf50605.c
384target/arm/ata-pp5020.c 434target/arm/ata-pp5020.c
435target/arm/wmcodec-pp.c
385target/arm/ipod/adc-ipod.c 436target/arm/ipod/adc-ipod.c
386target/arm/ipod/backlight-nano_video.c 437target/arm/ipod/backlight-nano_video.c
387target/arm/ipod/button-clickwheel.c 438target/arm/ipod/button-clickwheel.c
388target/arm/ipod/power-ipod.c 439target/arm/ipod/power-ipod.c
389target/arm/ipod/usb-ipod.c 440target/arm/ipod/usb-ipod.c
390target/arm/wmcodec-pp.c 441#endif /* SIMULATOR */
391#endif 442#endif /* IPOD_NANO */
392#endif
393 443
394#ifdef IPOD_VIDEO 444#ifdef IPOD_VIDEO
395#ifndef SIMULATOR 445#ifndef SIMULATOR
446drivers/lcd-ipodvideo.c
396drivers/pcf50605.c 447drivers/pcf50605.c
397target/arm/ata-pp5020.c 448target/arm/ata-pp5020.c
449target/arm/wmcodec-pp.c
398target/arm/ipod/adc-ipod.c 450target/arm/ipod/adc-ipod.c
399target/arm/ipod/backlight-nano_video.c 451target/arm/ipod/backlight-nano_video.c
400target/arm/ipod/button-clickwheel.c 452target/arm/ipod/button-clickwheel.c
401target/arm/ipod/power-ipod.c 453target/arm/ipod/power-ipod.c
402target/arm/ipod/usb-ipod.c 454target/arm/ipod/usb-ipod.c
403drivers/lcd-ipodvideo.c 455#endif /* SIMULATOR */
404target/arm/wmcodec-pp.c 456#endif /* IPOD_VIDEO */
405#endif
406#endif
407 457
408#ifdef IPOD_3G 458#ifdef IPOD_3G
409#ifndef SIMULATOR 459#ifndef SIMULATOR
410drivers/lcd-ipod.c 460drivers/lcd-ipod.c
411drivers/pcf50605.c 461drivers/pcf50605.c
412target/arm/ata-pp5002.c 462target/arm/ata-pp5002.c
463target/arm/wmcodec-pp.c
413target/arm/ipod/adc-ipod.c 464target/arm/ipod/adc-ipod.c
414target/arm/ipod/3g/backlight-3g.c 465target/arm/ipod/3g/backlight-3g.c
415target/arm/ipod/3g/button-3g.c 466target/arm/ipod/3g/button-3g.c
416target/arm/ipod/power-ipod.c 467target/arm/ipod/power-ipod.c
417target/arm/ipod/usb-ipod.c 468target/arm/ipod/usb-ipod.c
418target/arm/wmcodec-pp.c 469#endif /* SIMULATOR */
419#endif 470#endif /* IPOD_3G */
420#endif
421 471
422#ifdef IPOD_MINI 472#ifdef IPOD_MINI
423#ifndef SIMULATOR 473#ifndef SIMULATOR
424drivers/lcd-ipod.c 474drivers/lcd-ipod.c
425drivers/pcf50605.c 475drivers/pcf50605.c
426target/arm/ata-pp5020.c 476target/arm/ata-pp5020.c
477target/arm/wmcodec-pp.c
427target/arm/ipod/adc-ipod.c 478target/arm/ipod/adc-ipod.c
428target/arm/ipod/backlight-mini1g_mini2g.c 479target/arm/ipod/backlight-mini1g_mini2g.c
429target/arm/ipod/button-mini1g.c 480target/arm/ipod/button-mini1g.c
430target/arm/ipod/power-ipod.c 481target/arm/ipod/power-ipod.c
431target/arm/ipod/usb-ipod.c 482target/arm/ipod/usb-ipod.c
432target/arm/wmcodec-pp.c 483#endif /* SIMULATOR */
433#endif 484#endif /* IPOD_MINI */
434#endif
435
436 485
437#ifdef IPOD_MINI2G 486#ifdef IPOD_MINI2G
438#ifndef SIMULATOR 487#ifndef SIMULATOR
439drivers/lcd-ipod.c 488drivers/lcd-ipod.c
440drivers/pcf50605.c 489drivers/pcf50605.c
441target/arm/ata-pp5020.c 490target/arm/ata-pp5020.c
491target/arm/wmcodec-pp.c
442target/arm/ipod/adc-ipod.c 492target/arm/ipod/adc-ipod.c
443target/arm/ipod/backlight-mini1g_mini2g.c 493target/arm/ipod/backlight-mini1g_mini2g.c
444target/arm/ipod/button-clickwheel.c 494target/arm/ipod/button-clickwheel.c
445target/arm/ipod/power-ipod.c 495target/arm/ipod/power-ipod.c
446target/arm/ipod/usb-ipod.c 496target/arm/ipod/usb-ipod.c
447target/arm/wmcodec-pp.c 497#endif /* SIMULATOR */
448#endif 498#endif /* IPOD_MINI2G */
449#endif
diff --git a/firmware/drivers/lcd.S b/firmware/drivers/lcd.S
index d9e7092c94..ed0bc8d15b 100755
--- a/firmware/drivers/lcd.S
+++ b/firmware/drivers/lcd.S
@@ -48,23 +48,23 @@
48 * - DS -> Data Selection line, latched at the rising edge 48 * - DS -> Data Selection line, latched at the rising edge
49 * of the 8th serial clock (*) : 49 * of the 8th serial clock (*) :
50 * 0 : instruction register, 50 * 0 : instruction register,
51 * 1 : data register; 51 * 1 : data register;
52 * - SC -> Serial Clock line (SDA). 52 * - SC -> Serial Clock line (SDA).
53 * - SD -> Serial Data line (SCK), latched at the rising edge 53 * - SD -> Serial Data line (SCK), latched at the rising edge
54 * of each serial clock (*). 54 * of each serial clock (*).
55 * 55 *
56 * _ _ 56 * _ _
57 * /CS \ / 57 * /CS \ /
58 * \______________________________________________________/ 58 * \______________________________________________________/
59 * _____ ____ ____ ____ ____ ____ ____ ____ ____ _____ 59 * _____ ____ ____ ____ ____ ____ ____ ____ ____ _____
60 * SD \/ D7 \/ D6 \/ D5 \/ D4 \/ D3 \/ D2 \/ D1 \/ D0 \/ 60 * SD \/ D7 \/ D6 \/ D5 \/ D4 \/ D3 \/ D2 \/ D1 \/ D0 \/
61 * _____/\____/\____/\____/\____/\____/\____/\____/\____/\_____ 61 * _____/\____/\____/\____/\____/\____/\____/\____/\____/\_____
62 * 62 *
63 * _____ _ _ _ _ _ _ _ ________ 63 * _____ _ _ _ _ _ _ _ ________
64 * SC \ * \ * \ * \ * \ * \ * \ * \ * 64 * SC \ * \ * \ * \ * \ * \ * \ * \ *
65 * \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ 65 * \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
66 * _ _________________________________________________________ 66 * _ _________________________________________________________
67 * DS \/ 67 * DS \/
68 * _/\_________________________________________________________ 68 * _/\_________________________________________________________
69 * 69 *
70 */ 70 */
@@ -93,14 +93,14 @@ _lcd_write_command:
93 mov.l .lcdr,r3 /* put lcd data port address in r3 */ 93 mov.l .lcdr,r3 /* put lcd data port address in r3 */
94 mov r4,r1 /* copy data byte to r1 */ 94 mov r4,r1 /* copy data byte to r1 */
95 mov #1,r5 /* set byte count to 1 (!) */ 95 mov #1,r5 /* set byte count to 1 (!) */
96 96
97 /* This code will fail if an interrupt changes the contents of PBDRL. 97 /* This code will fail if an interrupt changes the contents of PBDRL.
98 * If so, we must disable the interrupt here. */ 98 * If so, we must disable the interrupt here. */
99 99
100 mov.b @r3,r0 /* r0 = PBDRL */ 100 mov.b @r3,r0 /* r0 = PBDRL */
101 or #(LCD_SD),r0 /* r0 |= LCD_SD */ 101 or #(LCD_SD),r0 /* r0 |= LCD_SD */
102 and #(~(LCD_CS|LCD_DS|LCD_SC)),r0 /* r0 &= ~(LCD_CS|LCD_DS|LCD_SC) */ 102 and #(~(LCD_CS|LCD_DS|LCD_SC)),r0 /* r0 &= ~(LCD_CS|LCD_DS|LCD_SC) */
103 103
104 bra .single_transfer /* jump into the transfer loop */ 104 bra .single_transfer /* jump into the transfer loop */
105 neg r0,r2 /* r2 = 0 - r0 */ 105 neg r0,r2 /* r2 = 0 - r0 */
106 106
@@ -131,7 +131,7 @@ _lcd_write_data:
131 131
132 /* This code will fail if an interrupt changes the contents of PBDRL. 132 /* This code will fail if an interrupt changes the contents of PBDRL.
133 * If so, we must disable the interrupt here. If disabling interrupts 133 * If so, we must disable the interrupt here. If disabling interrupts
134 * for a long time (~9200 clks = ~830 µs for transferring 112 bytes on 134 * for a long time (~9200 clks = ~830 µs for transferring 112 bytes on
135 * recorders)is undesirable, the loop has to be rewritten to 135 * recorders)is undesirable, the loop has to be rewritten to
136 * disable/precalculate/transfer/enable for each iteration. However, 136 * disable/precalculate/transfer/enable for each iteration. However,
137 * this would significantly decrease performance. */ 137 * this would significantly decrease performance. */
@@ -148,7 +148,7 @@ _lcd_write_data:
148.multi_transfer: 148.multi_transfer:
149 mov.b @r4+,r1 /* load data byte from memory */ 149 mov.b @r4+,r1 /* load data byte from memory */
150 150
151.single_transfer: 151.single_transfer:
152 shll16 r1 /* shift data to most significant byte */ 152 shll16 r1 /* shift data to most significant byte */
153 shll8 r1 153 shll8 r1
154 154
@@ -157,85 +157,85 @@ _lcd_write_data:
157 /* uses neg here for compatibility with recorder version */ 157 /* uses neg here for compatibility with recorder version */
158 bt 1f /* data bit = 1? */ 158 bt 1f /* data bit = 1? */
159 and #(~LCD_SD),r0 /* no: r0 &= ~LCD_SD */ 159 and #(~LCD_SD),r0 /* no: r0 &= ~LCD_SD */
160 1: 160 1:
161 shll r1 /* next shift here for alignment */ 161 shll r1 /* next shift here for alignment */
162 mov.b r0,@r3 /* set data to port */ 162 mov.b r0,@r3 /* set data to port */
163 or #(LCD_SC),r0 /* rise SC (independent of SD level) */ 163 or #(LCD_SC),r0 /* rise SC (independent of SD level) */
164 mov.b r0,@r3 /* set to port */ 164 mov.b r0,@r3 /* set to port */
165 165
166 neg r2,r0 166 neg r2,r0
167 bt 1f 167 bt 1f
168 and #(~LCD_SD),r0 168 and #(~LCD_SD),r0
169 1: 169 1:
170 mov.b r0,@r3 170 mov.b r0,@r3
171 or #(LCD_SC),r0 171 or #(LCD_SC),r0
172 mov.b r0,@r3 172 mov.b r0,@r3
173 173
174 shll r1 174 shll r1
175 neg r2,r0 175 neg r2,r0
176 bt 1f 176 bt 1f
177 and #(~LCD_SD),r0 177 and #(~LCD_SD),r0
178 1: 178 1:
179 shll r1 179 shll r1
180 mov.b r0,@r3 180 mov.b r0,@r3
181 or #(LCD_SC),r0 181 or #(LCD_SC),r0
182 mov.b r0,@r3 182 mov.b r0,@r3
183 183
184 neg r2,r0 184 neg r2,r0
185 bt 1f 185 bt 1f
186 and #(~LCD_SD),r0 186 and #(~LCD_SD),r0
187 1: 187 1:
188 mov.b r0,@r3 188 mov.b r0,@r3
189 or #(LCD_SC),r0 189 or #(LCD_SC),r0
190 mov.b r0,@r3 190 mov.b r0,@r3
191 191
192 shll r1 192 shll r1
193 neg r2,r0 193 neg r2,r0
194 bt 1f 194 bt 1f
195 and #(~LCD_SD),r0 195 and #(~LCD_SD),r0
196 1: 196 1:
197 shll r1 197 shll r1
198 mov.b r0,@r3 198 mov.b r0,@r3
199 or #(LCD_SC),r0 199 or #(LCD_SC),r0
200 mov.b r0,@r3 200 mov.b r0,@r3
201 201
202 neg r2,r0 202 neg r2,r0
203 bt 1f 203 bt 1f
204 and #(~LCD_SD),r0 204 and #(~LCD_SD),r0
205 1: 205 1:
206 mov.b r0,@r3 206 mov.b r0,@r3
207 or #(LCD_SC),r0 207 or #(LCD_SC),r0
208 mov.b r0,@r3 208 mov.b r0,@r3
209 209
210 shll r1 210 shll r1
211 neg r2,r0 211 neg r2,r0
212 bt 1f 212 bt 1f
213 and #(~LCD_SD),r0 213 and #(~LCD_SD),r0
214 1: 214 1:
215 shll r1 215 shll r1
216 mov.b r0,@r3 216 mov.b r0,@r3
217 or #(LCD_SC),r0 217 or #(LCD_SC),r0
218 mov.b r0,@r3 218 mov.b r0,@r3
219 219
220 neg r2,r0 220 neg r2,r0
221 bt 1f 221 bt 1f
222 and #(~LCD_SD),r0 222 and #(~LCD_SD),r0
223 1: 223 1:
224 mov.b r0,@r3 224 mov.b r0,@r3
225 or #(LCD_SC),r0 225 or #(LCD_SC),r0
226 mov.b r0,@r3 226 mov.b r0,@r3
227 227
228#else /* HAVE_LCD_CHARCELLS */ 228#else /* HAVE_LCD_CHARCELLS */
229/* further optimized version, exploits that SD is on bit 0 for recorders */ 229/* further optimized version, exploits that SD is on bit 0 for recorders */
230 230
231 .align 2 231 .align 2
232.multi_transfer: 232.multi_transfer:
233 mov.b @r4+,r1 /* load data byte from memory */ 233 mov.b @r4+,r1 /* load data byte from memory */
234 nop 234 nop
235 235
236.single_transfer: 236.single_transfer:
237 shll16 r1 /* shift data to most significant byte */ 237 shll16 r1 /* shift data to most significant byte */
238 shll8 r1 238 shll8 r1
239 not r1,r1 /* and invert for use with negc */ 239 not r1,r1 /* and invert for use with negc */
240 240
241 shll r1 /* shift the MSB into carry */ 241 shll r1 /* shift the MSB into carry */
@@ -245,46 +245,46 @@ _lcd_write_data:
245 or #(LCD_SC),r0 /* rise SC (independent of SD level) */ 245 or #(LCD_SC),r0 /* rise SC (independent of SD level) */
246 mov.b r0,@r3 /* set to port */ 246 mov.b r0,@r3 /* set to port */
247 247
248 negc r2,r0 248 negc r2,r0
249 mov.b r0,@r3 249 mov.b r0,@r3
250 or #(LCD_SC),r0 250 or #(LCD_SC),r0
251 mov.b r0,@r3 251 mov.b r0,@r3
252 252
253 shll r1 253 shll r1
254 negc r2,r0 254 negc r2,r0
255 shll r1 255 shll r1
256 mov.b r0,@r3 256 mov.b r0,@r3
257 or #(LCD_SC),r0 257 or #(LCD_SC),r0
258 mov.b r0,@r3 258 mov.b r0,@r3
259 259
260 negc r2,r0 260 negc r2,r0
261 mov.b r0,@r3 261 mov.b r0,@r3
262 or #(LCD_SC),r0 262 or #(LCD_SC),r0
263 mov.b r0,@r3 263 mov.b r0,@r3
264 264
265 shll r1 265 shll r1
266 negc r2,r0 266 negc r2,r0
267 shll r1 267 shll r1
268 mov.b r0,@r3 268 mov.b r0,@r3
269 or #(LCD_SC),r0 269 or #(LCD_SC),r0
270 mov.b r0,@r3 270 mov.b r0,@r3
271 271
272 negc r2,r0 272 negc r2,r0
273 mov.b r0,@r3 273 mov.b r0,@r3
274 or #(LCD_SC),r0 274 or #(LCD_SC),r0
275 mov.b r0,@r3 275 mov.b r0,@r3
276 276
277 shll r1 277 shll r1
278 negc r2,r0 278 negc r2,r0
279 shll r1 279 shll r1
280 mov.b r0,@r3 280 mov.b r0,@r3
281 or #(LCD_SC),r0 281 or #(LCD_SC),r0
282 mov.b r0,@r3 282 mov.b r0,@r3
283 283
284 negc r2,r0 284 negc r2,r0
285 mov.b r0,@r3 285 mov.b r0,@r3
286 or #(LCD_SC),r0 286 or #(LCD_SC),r0
287 mov.b r0,@r3 287 mov.b r0,@r3
288 288
289#endif /* HAVE_LCD_CHARCELLS */ 289#endif /* HAVE_LCD_CHARCELLS */
290 290
@@ -293,7 +293,7 @@ _lcd_write_data:
293 bf .multi_transfer /* no: next iteration */ 293 bf .multi_transfer /* no: next iteration */
294 294
295 or #(LCD_CS|LCD_DS|LCD_SD|LCD_SC),r0 /* restore port */ 295 or #(LCD_CS|LCD_DS|LCD_SD|LCD_SC),r0 /* restore port */
296 rts 296 rts
297 mov.b r0,@r3 297 mov.b r0,@r3
298 298
299 /* This is the place to reenable the interrupts, if we have disabled 299 /* This is the place to reenable the interrupts, if we have disabled
@@ -305,70 +305,4 @@ _lcd_write_data:
305 305
306.end: 306.end:
307 .size _lcd_write_command,.end-_lcd_write_command 307 .size _lcd_write_command,.end-_lcd_write_command
308#elif defined(IRIVER_H100_SERIES)
309 .section .icode,"ax",@progbits
310
311 .align 2
312 .global lcd_write_command
313 .type lcd_write_command,@function
314
315lcd_write_command:
316 move.l (4,%sp),%d0
317 lea MBAR2,%a1
318 move.l #~8,%d1
319 and.l %d1,(0xb4,%a1)
320 move.w %d0,0xf0000000
321 rts
322
323 .align 2
324 .global lcd_write_command_ex
325 .type lcd_write_command_ex,@function
326
327lcd_write_command_ex:
328 lea MBAR2,%a1
329
330 move.l (4,%sp),%d0 /* Command */
331
332 move.l #~8,%d1 /* Set A0 = 0 */
333 and.l %d1,(0xb4,%a1)
334 move.w %d0,0xf0000000 /* Write to LCD */
335
336 not.l %d1 /* Set A0 = 1 */
337 or.l %d1,(0xb4,%a1)
338
339 move.l (8,%sp),%d0 /* Data */
340 cmp.l #0xffffffff,%d0 /* -1? */
341 beq.b .last
342 move.w %d0,0xf0000000 /* Write to LCD */
343
344 move.l (12,%sp),%d0 /* Data */
345 cmp.l #0xffffffff,%d0 /* -1? */
346 beq.b .last
347 move.w %d0,0xf0000000 /* Write to LCD */
348
349.last:
350 rts
351
352 .align 2
353 .global lcd_write_data
354 .type lcd_write_data,@function
355
356lcd_write_data:
357 move.l (4,%sp),%a0 /* Data pointer */
358 move.l (8,%sp),%d0 /* Length */
359 lea MBAR2,%a1
360 moveq #8,%d1
361 or.l %d1,(0xb4,%a1)
362
363 lea 0xf0000000,%a1
364.loop:
365 /* When running in IRAM, this loop takes 7 cycles plus the LCD write.
366 The 7 cycles are necessary to follow the LCD timing specs
367 at 140MHz */
368 move.b (%a0)+,%d1 /* 3(1/0) */
369 move.w %d1,(%a1) /* 1(0/1) */
370 subq.l #1,%d0 /* 1(0/0) */
371 nop /* 1(0/0) */
372 bne .loop /* 2(0/0) */
373 rts
374#endif 308#endif
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c
index af70ac8ef2..e48993c2aa 100644
--- a/firmware/drivers/power.c
+++ b/firmware/drivers/power.c
@@ -65,26 +65,6 @@ bool radio_power(bool status)
65 65
66void power_init(void) 66void power_init(void)
67{ 67{
68#if CONFIG_CPU == MCF5249
69#if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES)
70 or_l(0x00080000, &GPIO1_OUT);
71 or_l(0x00080000, &GPIO1_ENABLE);
72 or_l(0x00080000, &GPIO1_FUNCTION);
73
74#ifndef BOOTLOADER
75 /* The boot loader controls the power */
76 ide_power_enable(true);
77#endif
78 or_l(0x80000000, &GPIO_ENABLE);
79 or_l(0x80000000, &GPIO_FUNCTION);
80#ifdef HAVE_SPDIF_POWER
81 spdif_power_enable(false);
82#endif
83#ifdef IRIVER_H300_SERIES
84 pcf50606_init();
85#endif
86#endif
87#else
88#ifdef HAVE_POWEROFF_ON_PB5 68#ifdef HAVE_POWEROFF_ON_PB5
89 PBCR2 &= ~0x0c00; /* GPIO for PB5 */ 69 PBCR2 &= ~0x0c00; /* GPIO for PB5 */
90 or_b(0x20, &PBIORL); 70 or_b(0x20, &PBIORL);
@@ -100,19 +80,14 @@ void power_init(void)
100 or_b(0x04, &PADRL); /* drive PA2 high for tuner disable */ 80 or_b(0x04, &PADRL); /* drive PA2 high for tuner disable */
101 or_b(0x04, &PAIORL); /* output for PA2 */ 81 or_b(0x04, &PAIORL); /* output for PA2 */
102#endif 82#endif
103#endif
104} 83}
105 84
106 85
107#ifdef CONFIG_CHARGING 86#ifdef CONFIG_CHARGING
108bool charger_inserted(void) 87bool charger_inserted(void)
109{ 88{
110#if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES) 89#if defined(GMINI_ARCH)
111 return (GPIO1_READ & 0x00400000)?true:false;
112#elif defined(GMINI_ARCH)
113 return (P7 & 0x80) == 0; 90 return (P7 & 0x80) == 0;
114#elif defined(IAUDIO_X5)
115 return (GPIO1_READ & 0x01000000)?true:false;
116#elif CONFIG_CHARGING == CHARGING_CONTROL 91#elif CONFIG_CHARGING == CHARGING_CONTROL
117 /* Recorder */ 92 /* Recorder */
118 return adc_read(ADC_EXT_POWER) > 0x100; 93 return adc_read(ADC_EXT_POWER) > 0x100;
@@ -155,28 +130,7 @@ bool charging_state(void) {
155 charge. My tests show that ADC readings below about 0x80 means 130 charge. My tests show that ADC readings below about 0x80 means
156 that the LTC1734 is only maintaining the charge. */ 131 that the LTC1734 is only maintaining the charge. */
157 return adc_read(ADC_EXT_POWER) >= 0x80; 132 return adc_read(ADC_EXT_POWER) >= 0x80;
158#elif defined(IRIVER_H100_SERIES) /* FIXME */
159 return charger_inserted();
160#elif defined IRIVER_H300_SERIES
161 return (GPIO_READ & 0x00800000)?true:false;
162#endif
163}
164#endif
165
166#ifdef HAVE_SPDIF_POWER
167void spdif_power_enable(bool on)
168{
169 or_l(0x01000000, &GPIO1_FUNCTION);
170 or_l(0x01000000, &GPIO1_ENABLE);
171
172#ifdef SPDIF_POWER_INVERTED
173 if(!on)
174#else
175 if(on)
176#endif 133#endif
177 and_l(~0x01000000, &GPIO1_OUT);
178 else
179 or_l(0x01000000, &GPIO1_OUT);
180} 134}
181#endif 135#endif
182 136
@@ -185,14 +139,7 @@ void ide_power_enable(bool on)
185{ 139{
186 (void)on; 140 (void)on;
187 141
188#if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES) 142#if defined(GMINI_ARCH)
189 if(on)
190 and_l(~0x80000000, &GPIO_OUT);
191 else
192 or_l(0x80000000, &GPIO_OUT);
193#elif defined(IAUDIO_X5)
194 /* X5 TODO */
195#elif defined(GMINI_ARCH)
196 if(on) 143 if(on)
197 P1 |= 0x08; 144 P1 |= 0x08;
198 else 145 else
@@ -244,11 +191,7 @@ void ide_power_enable(bool on)
244 191
245bool ide_powered(void) 192bool ide_powered(void)
246{ 193{
247#if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES) 194#if defined(GMINI_ARCH)
248 return (GPIO_OUT & 0x80000000)?false:true;
249#elif defined(IAUDIO_X5)
250 return false; /* X5 TODO */
251#elif defined(GMINI_ARCH)
252 return (P1 & 0x08?true:false); 195 return (P1 & 0x08?true:false);
253#elif defined(TOSHIBA_GIGABEAT_F) 196#elif defined(TOSHIBA_GIGABEAT_F)
254 return false; 197 return false;
@@ -279,10 +222,7 @@ bool ide_powered(void)
279void power_off(void) 222void power_off(void)
280{ 223{
281 set_irq_level(HIGHEST_IRQ_LEVEL); 224 set_irq_level(HIGHEST_IRQ_LEVEL);
282#if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES) 225#if CONFIG_CPU == PNX0101
283 and_l(~0x00080000, &GPIO1_OUT);
284 asm("halt");
285#elif CONFIG_CPU == PNX0101
286 GPIO1_CLR = 1 << 16; 226 GPIO1_CLR = 1 << 16;
287 GPIO2_SET = 1; 227 GPIO2_SET = 1;
288#elif defined(GMINI_ARCH) 228#elif defined(GMINI_ARCH)
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 765bcfdb07..18c0ef7d17 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -228,6 +228,11 @@
228#define HAVE_SCHEDULER_BOOSTCTRL 228#define HAVE_SCHEDULER_BOOSTCTRL
229#endif 229#endif
230 230
231/* define for all cpus from SH family */
232#if (CONFIG_CPU == SH7034)
233#define CPU_SH
234#endif
235
231/* define for all cpus from coldfire family */ 236/* define for all cpus from coldfire family */
232#if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == MCF5250) 237#if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == MCF5250)
233#define CPU_COLDFIRE 238#define CPU_COLDFIRE
diff --git a/firmware/drivers/i2c-coldfire.c b/firmware/target/coldfire/i2c-coldfire.c
index a628ce5f0e..a628ce5f0e 100644
--- a/firmware/drivers/i2c-coldfire.c
+++ b/firmware/target/coldfire/i2c-coldfire.c
diff --git a/firmware/drivers/lcd-h100.c b/firmware/target/coldfire/iriver/h100/lcd-h100.c
index 9ed63661a0..9ed63661a0 100644
--- a/firmware/drivers/lcd-h100.c
+++ b/firmware/target/coldfire/iriver/h100/lcd-h100.c
diff --git a/firmware/drivers/lcd-h300.c b/firmware/target/coldfire/iriver/h300/lcd-h300.c
index 3e5642e35d..3e5642e35d 100644
--- a/firmware/drivers/lcd-h300.c
+++ b/firmware/target/coldfire/iriver/h300/lcd-h300.c
diff --git a/firmware/target/coldfire/system-target.h b/firmware/target/coldfire/system-target.h
index 24e3fb8705..d885e7551d 100644
--- a/firmware/target/coldfire/system-target.h
+++ b/firmware/target/coldfire/system-target.h
@@ -147,6 +147,10 @@ static inline void invalidate_icache(void)
147#endif 147#endif
148void coldfire_set_pllcr_audio_bits(long bits); 148void coldfire_set_pllcr_audio_bits(long bits);
149 149
150#ifdef HRIVER_H100_SERIES
151bool detect_flashed_rockbox(void);
152#endif
153
150/* 11.2896 MHz */ 154/* 11.2896 MHz */
151#define CPUFREQ_DEFAULT_MULT 1 155#define CPUFREQ_DEFAULT_MULT 1
152#define CPUFREQ_DEFAULT (CPUFREQ_DEFAULT_MULT * CPU_FREQ) 156#define CPUFREQ_DEFAULT (CPUFREQ_DEFAULT_MULT * CPU_FREQ)