summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/SOURCES2
-rw-r--r--apps/plugins/SUBDIRS2
-rw-r--r--firmware/SOURCES4
-rw-r--r--firmware/drivers/serial.c72
-rw-r--r--firmware/pcm_playback.c3
-rw-r--r--firmware/timer.c4
-rwxr-xr-xtools/configure4
7 files changed, 82 insertions, 9 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index fe71c1f967..8479cd8b9b 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -1,4 +1,3 @@
1#ifndef GIGABEAT_S
2/* plugins common to all models */ 1/* plugins common to all models */
3battery_bench.c 2battery_bench.c
4chessclock.c 3chessclock.c
@@ -145,4 +144,3 @@ iriver_flash.c
145/* Built for bitmap targets except H10 5/6gb, Archoses, iPod mini and ifp */ 144/* Built for bitmap targets except H10 5/6gb, Archoses, iPod mini and ifp */
146superdom.c 145superdom.c
147#endif 146#endif
148#endif /* GIGABEAT_S */
diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS
index 24333be3b9..f537fb8965 100644
--- a/apps/plugins/SUBDIRS
+++ b/apps/plugins/SUBDIRS
@@ -1,5 +1,4 @@
1#ifndef IRIVER_IFP7XX_SERIES 1#ifndef IRIVER_IFP7XX_SERIES
2#ifndef GIGABEAT_S
3 2
4/* For all targets */ 3/* For all targets */
5shortcuts 4shortcuts
@@ -46,5 +45,4 @@ doom
46mpegplayer 45mpegplayer
47#endif 46#endif
48 47
49#endif /* GIGABEAT_S */
50#endif /* IRIVER_IFP7XX_SERIES */ 48#endif /* IRIVER_IFP7XX_SERIES */
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 92e2c1d8c5..9dd617b5d5 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -208,7 +208,7 @@ drivers/mas.c
208drivers/audio/uda1380.c 208drivers/audio/uda1380.c
209#elif defined(HAVE_WM8751) 209#elif defined(HAVE_WM8751)
210drivers/audio/wm8751.c 210drivers/audio/wm8751.c
211#elif defined(HAVE_WM8975) 211#elif defined(HAVE_WM8975) || defined(HAVE_WM8978)
212drivers/audio/wm8975.c 212drivers/audio/wm8975.c
213#elif defined(HAVE_WM8758) 213#elif defined(HAVE_WM8758)
214drivers/audio/wm8758.c 214drivers/audio/wm8758.c
@@ -608,7 +608,7 @@ target/arm/imx31/gigabeat-s/mmu-imx31.c
608target/arm/imx31/gigabeat-s/avic-imx31.c 608target/arm/imx31/gigabeat-s/avic-imx31.c
609target/arm/imx31/gigabeat-s/spi-imx31.c 609target/arm/imx31/gigabeat-s/spi-imx31.c
610#ifndef BOOTLOADER 610#ifndef BOOTLOADER
611target/arm/imx31/gigabeat-fx/pcm-imx31.c 611target/arm/imx31/gigabeat-s/pcm-imx31.c
612#endif 612#endif
613#endif /* SIMULATOR */ 613#endif /* SIMULATOR */
614#endif /* GIGABEAT_S */ 614#endif /* GIGABEAT_S */
diff --git a/firmware/drivers/serial.c b/firmware/drivers/serial.c
index 142f67e609..6ed539b780 100644
--- a/firmware/drivers/serial.c
+++ b/firmware/drivers/serial.c
@@ -27,6 +27,9 @@
27#include "lcd.h" 27#include "lcd.h"
28#include "serial.h" 28#include "serial.h"
29 29
30#if CONFIG_CPU == IMX31L
31#include "serial-imx31.h"
32#endif
30 33
31#if CONFIG_CPU == SH7034 34#if CONFIG_CPU == SH7034
32 35
@@ -166,6 +169,75 @@ void serial_setup (void)
166 UCR0 = 0x04; /* Tx enable */ 169 UCR0 = 0x04; /* Tx enable */
167} 170}
168 171
172#elif (CONFIG_CPU == IMX31L)
173
174void serial_setup(void)
175{
176#ifdef UART_INT /*enable UART Interrupts */
177 UCR1_1 |= (EUartUCR1_TRDYEN | EUartUCR1_RRDYEN | EUartUCR1_TXMPTYEN);
178 UCR4_1 |= (EUartUCR4_TCEN);
179#else /*disable UART Interrupts*/
180 UCR1_1 &= ~(EUartUCR1_TRDYEN | EUartUCR1_RRDYEN | EUartUCR1_TXMPTYEN);
181 UCR4_1 &= ~(EUartUCR4_TCEN);
182#endif
183 UCR1_1 |= EUartUCR1_UARTEN;
184 UCR2_1 |= (EUartUCR2_TXEN | EUartUCR2_RXEN | EUartUCR2_IRTS);
185
186 /* Tx,Rx Interrupt Trigger levels, Disable for now*/
187 /*UFCR1 |= (UFCR1_TXTL_32 | UFCR1_RXTL_32);*/
188}
189
190int Tx_Rdy(void)
191{
192 if((UTS1 & EUartUTS_TXEMPTY))
193 return 1;
194 else return 0;
195}
196
197/*Not ready...After first Rx, UTS1 & UTS1_RXEMPTY
198 keeps returning true*/
199int Rx_Rdy(void)
200{
201 if(!(UTS1 & EUartUTS_RXEMPTY))
202 return 1;
203 else return 0;
204}
205
206void Tx_Writec(char c)
207{
208 UTXD1=(int) c;
209}
210
211void dprintf(const char * str, ... )
212{
213 char dprintfbuff[256];
214 unsigned char * ptr;
215
216 va_list ap;
217 va_start(ap, str);
218
219 ptr = dprintfbuff;
220 vsnprintf(ptr,sizeof(dprintfbuff),str,ap);
221 va_end(ap);
222
223 serial_tx(ptr);
224}
225
226void serial_tx(const unsigned char * buf)
227{
228 /*Tx*/
229 for(;;) {
230 if(Tx_Rdy()) {
231 if(*buf == '\0')
232 return;
233 if(*buf == '\n')
234 Tx_Writec('\r');
235 Tx_Writec(*buf);
236 buf++;
237 }
238 }
239}
240
169#else /* Other targets */ 241#else /* Other targets */
170void serial_setup (void) 242void serial_setup (void)
171{ 243{
diff --git a/firmware/pcm_playback.c b/firmware/pcm_playback.c
index 1b16eb47db..123b7e3505 100644
--- a/firmware/pcm_playback.c
+++ b/firmware/pcm_playback.c
@@ -70,7 +70,8 @@ void pcm_mute(bool mute)
70} 70}
71#endif /* defined(CPU_COLDFIRE) || (CONFIG_CPU == S3C2440) */ 71#endif /* defined(CPU_COLDFIRE) || (CONFIG_CPU == S3C2440) */
72 72
73#if defined(CPU_COLDFIRE) || (CONFIG_CPU == S3C2440) || defined(CPU_PP) 73#if defined(CPU_COLDFIRE) || (CONFIG_CPU == S3C2440) || defined(CPU_PP) \
74 || (CONFIG_CPU == IMX31L)
74/* Implemented in target/... */ 75/* Implemented in target/... */
75#else 76#else
76static int pcm_freq = HW_SAMPR_DEFAULT; /* 44.1 is default */ 77static int pcm_freq = HW_SAMPR_DEFAULT; /* 44.1 is default */
diff --git a/firmware/timer.c b/firmware/timer.c
index b86d4493a3..c08e8348d9 100644
--- a/firmware/timer.c
+++ b/firmware/timer.c
@@ -208,6 +208,8 @@ static bool timer_set(long cycles, bool start)
208 cycles_new = cycles; 208 cycles_new = cycles;
209 209
210 return true; 210 return true;
211#elif (CONFIG_CPU == IMX31L)
212 /* TODO */
211#else 213#else
212 return __TIMER_SET(cycles, start); 214 return __TIMER_SET(cycles, start);
213#endif /* CONFIG_CPU */ 215#endif /* CONFIG_CPU */
@@ -268,6 +270,8 @@ bool timer_register(int reg_prio, void (*unregister_callback)(void),
268 irq_set_int_handler(IRQ_TIMER1, TIMER1_ISR); 270 irq_set_int_handler(IRQ_TIMER1, TIMER1_ISR);
269 irq_enable_int(IRQ_TIMER1); 271 irq_enable_int(IRQ_TIMER1);
270 return true; 272 return true;
273#elif CONFIG_CPU == IMX31L
274 /* TODO */
271#else 275#else
272 return __TIMER_REGISTER(reg_prio, unregister_callback, cycles, 276 return __TIMER_REGISTER(reg_prio, unregister_callback, cycles,
273 int_prio, timer_callback); 277 int_prio, timer_callback);
diff --git a/tools/configure b/tools/configure
index caaa34db28..a7375fec3c 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1270,8 +1270,8 @@ EOF
1270 appextra="recorder:gui" 1270 appextra="recorder:gui"
1271 archosrom="" 1271 archosrom=""
1272 flash="" 1272 flash=""
1273 plugins="yes" 1273 plugins=""
1274 codecs="libmad liba52 libffmpegFLAC libwma libTremor libwavpack libmusepack libalac libfaad libm4a libspeex libdemac" 1274 swcodec="yes"
1275 toolset=$gigabeatbitmaptools 1275 toolset=$gigabeatbitmaptools
1276 boottool="$rootdir/tools/scramble -gigabeats" 1276 boottool="$rootdir/tools/scramble -gigabeats"
1277 bootoutput="nk.bin" 1277 bootoutput="nk.bin"