summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tms320dm320
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/tms320dm320')
-rw-r--r--firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c9
-rwxr-xr-xfirmware/target/arm/tms320dm320/crt0.S2
-rwxr-xr-xfirmware/target/arm/tms320dm320/debug-dm320.c10
-rw-r--r--firmware/target/arm/tms320dm320/spi-dm320.c4
-rw-r--r--firmware/target/arm/tms320dm320/spi-target.h2
-rw-r--r--firmware/target/arm/tms320dm320/system-dm320.c10
6 files changed, 20 insertions, 17 deletions
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c
index 76c8869f50..1d71dadc37 100644
--- a/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c
+++ b/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c
@@ -25,10 +25,14 @@
25#include "button-target.h" 25#include "button-target.h"
26#include "i2c-dm320.h" 26#include "i2c-dm320.h"
27 27
28#define BUTTON_DEBUG
29
30#ifdef BUTTON_DEBUG
28#include "lcd-target.h" 31#include "lcd-target.h"
29#include "lcd.h" 32#include "lcd.h"
30#include "sprintf.h" 33#include "sprintf.h"
31#include "font.h" 34#include "font.h"
35#endif
32 36
33#ifndef ZEN_VISION 37#ifndef ZEN_VISION
34/* Creative Zen Vision:M */ 38/* Creative Zen Vision:M */
@@ -189,7 +193,6 @@ void GIO0(void)
189 if(tick_diff >= TICK_MIN && tick_diff <= TICK_MAX) 193 if(tick_diff >= TICK_MIN && tick_diff <= TICK_MAX)
190 { 194 {
191 /* Ignore this, as it is a hold event */ 195 /* Ignore this, as it is a hold event */
192 IO_INTC_IRQ1 = INTR_IRQ1_EXT0;
193 return; 196 return;
194 } 197 }
195 last_btn = btn_press; 198 last_btn = btn_press;
@@ -271,8 +274,8 @@ void GIO0(void)
271#endif 274#endif
272} 275}
273 276
274void send_command_to_pic(unsigned char in, unsigned char* out, 277void send_command_to_pic(const unsigned char in, unsigned char* out,
275 unsigned int length) 278 const unsigned int length)
276{ 279{
277 /* Disable GIO0 interrupt */ 280 /* Disable GIO0 interrupt */
278 IO_INTC_EINT1 &= ~INTR_EINT1_EXT0; 281 IO_INTC_EINT1 &= ~INTR_EINT1_EXT0;
diff --git a/firmware/target/arm/tms320dm320/crt0.S b/firmware/target/arm/tms320dm320/crt0.S
index 5729357f12..a0b5a5abfb 100755
--- a/firmware/target/arm/tms320dm320/crt0.S
+++ b/firmware/target/arm/tms320dm320/crt0.S
@@ -153,7 +153,7 @@ start:
153 msr cpsr_c, #0xd3 153 msr cpsr_c, #0xd3
154 ldr sp, =stackend 154 ldr sp, =stackend
155 155
156#if defined(BOOTLOADER) && !defined(CREATIVE_ZVM) 156#if defined(BOOTLOADER) && !defined(CREATIVE_ZVx)
157 /* get the high part of our execute address */ 157 /* get the high part of our execute address */
158 ldr r2, =0xffffff00 158 ldr r2, =0xffffff00
159 and r4, pc, r2 159 and r4, pc, r2
diff --git a/firmware/target/arm/tms320dm320/debug-dm320.c b/firmware/target/arm/tms320dm320/debug-dm320.c
index 23257ddcc6..894f99c88d 100755
--- a/firmware/target/arm/tms320dm320/debug-dm320.c
+++ b/firmware/target/arm/tms320dm320/debug-dm320.c
@@ -34,7 +34,7 @@ bool __dbg_ports(void)
34 return false; 34 return false;
35} 35}
36 36
37#ifndef CREATIVE_ZVM 37#ifndef CREATIVE_ZVx
38extern char r_buffer[5]; 38extern char r_buffer[5];
39extern int r_button; 39extern int r_button;
40#endif 40#endif
@@ -42,7 +42,7 @@ bool __dbg_hw_info(void)
42{ 42{
43 int line = 0, oldline; 43 int line = 0, oldline;
44 int button; 44 int button;
45#ifndef CREATIVE_ZVM 45#ifndef CREATIVE_ZVx
46 int *address=0x0; 46 int *address=0x0;
47#endif 47#endif
48 bool done=false; 48 bool done=false;
@@ -103,14 +103,14 @@ bool __dbg_hw_info(void)
103 lcd_puts(0, line++, " Unknown DM320 Chip ID"); 103 lcd_puts(0, line++, " Unknown DM320 Chip ID");
104 } 104 }
105 105
106#ifndef CREATIVE_ZVM 106#ifndef CREATIVE_ZVx
107 line++; 107 line++;
108#endif 108#endif
109 oldline=line; 109 oldline=line;
110 while(!done) 110 while(!done)
111 { 111 {
112 line = oldline; 112 line = oldline;
113#ifndef CREATIVE_ZVM 113#ifndef CREATIVE_ZVx
114 button = button_get(false); 114 button = button_get(false);
115 button&=~BUTTON_REPEAT; 115 button&=~BUTTON_REPEAT;
116 if (button == BUTTON_POWER) 116 if (button == BUTTON_POWER)
@@ -145,7 +145,7 @@ bool __dbg_hw_info(void)
145 lcd_puts(0, line++, "[Rockbox info]"); 145 lcd_puts(0, line++, "[Rockbox info]");
146 snprintf(buf, sizeof(buf), "current tick: %08x Seconds running: %08d", 146 snprintf(buf, sizeof(buf), "current tick: %08x Seconds running: %08d",
147 (unsigned int)current_tick, (unsigned int)current_tick/100); lcd_puts(0, line++, buf); 147 (unsigned int)current_tick, (unsigned int)current_tick/100); lcd_puts(0, line++, buf);
148#ifndef CREATIVE_ZVM 148#ifndef CREATIVE_ZVx
149 snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", 149 snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x",
150 (unsigned int)address, *address); lcd_puts(0, line++, buf); 150 (unsigned int)address, *address); lcd_puts(0, line++, buf);
151 snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", 151 snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x",
diff --git a/firmware/target/arm/tms320dm320/spi-dm320.c b/firmware/target/arm/tms320dm320/spi-dm320.c
index a7b4fc678e..6375298c0f 100644
--- a/firmware/target/arm/tms320dm320/spi-dm320.c
+++ b/firmware/target/arm/tms320dm320/spi-dm320.c
@@ -43,7 +43,7 @@ struct SPI_info {
43 43
44struct SPI_info spi_targets[] = 44struct SPI_info spi_targets[] =
45{ 45{
46#ifndef CREATIVE_ZVM 46#ifndef CREATIVE_ZVx
47 [SPI_target_TSC2100] = { &IO_GIO_BITCLR1, &IO_GIO_BITSET1, GIO_TS_ENABLE }, 47 [SPI_target_TSC2100] = { &IO_GIO_BITCLR1, &IO_GIO_BITSET1, GIO_TS_ENABLE },
48 [SPI_target_RX5X348AB] = { &IO_GIO_BITSET0, &IO_GIO_BITCLR0, GIO_RTC_ENABLE}, 48 [SPI_target_RX5X348AB] = { &IO_GIO_BITSET0, &IO_GIO_BITCLR0, GIO_RTC_ENABLE},
49 [SPI_target_BACKLIGHT] = { &IO_GIO_BITCLR1, &IO_GIO_BITSET1, GIO_BL_ENABLE }, 49 [SPI_target_BACKLIGHT] = { &IO_GIO_BITCLR1, &IO_GIO_BITSET1, GIO_BL_ENABLE },
@@ -106,7 +106,7 @@ void spi_init(void)
106 IO_SERIAL0_MODE |= IO_SERIAL0_MODE_SCLK; 106 IO_SERIAL0_MODE |= IO_SERIAL0_MODE_SCLK;
107 /* Enable TX */ 107 /* Enable TX */
108 IO_SERIAL0_TX_ENABLE = 0x0001; 108 IO_SERIAL0_TX_ENABLE = 0x0001;
109#ifndef CREATIVE_ZVM 109#ifndef CREATIVE_ZVx
110 /* Set GIO 18 to output for touch screen slave enable */ 110 /* Set GIO 18 to output for touch screen slave enable */
111 IO_GIO_DIR1 &= ~GIO_TS_ENABLE; 111 IO_GIO_DIR1 &= ~GIO_TS_ENABLE;
112 /* Set GIO 12 to output for rtc slave enable */ 112 /* Set GIO 12 to output for rtc slave enable */
diff --git a/firmware/target/arm/tms320dm320/spi-target.h b/firmware/target/arm/tms320dm320/spi-target.h
index 704867d92b..10da048792 100644
--- a/firmware/target/arm/tms320dm320/spi-target.h
+++ b/firmware/target/arm/tms320dm320/spi-target.h
@@ -24,7 +24,7 @@
24#include <stdbool.h> 24#include <stdbool.h>
25 25
26enum SPI_target { 26enum SPI_target {
27#ifndef CREATIVE_ZVM 27#ifndef CREATIVE_ZVx
28 SPI_target_TSC2100 = 0, 28 SPI_target_TSC2100 = 0,
29 SPI_target_RX5X348AB, 29 SPI_target_RX5X348AB,
30 SPI_target_BACKLIGHT, 30 SPI_target_BACKLIGHT,
diff --git a/firmware/target/arm/tms320dm320/system-dm320.c b/firmware/target/arm/tms320dm320/system-dm320.c
index 234d13c743..ac7df30121 100644
--- a/firmware/target/arm/tms320dm320/system-dm320.c
+++ b/firmware/target/arm/tms320dm320/system-dm320.c
@@ -24,7 +24,7 @@
24#include "uart-target.h" 24#include "uart-target.h"
25#include "system-arm.h" 25#include "system-arm.h"
26#include "spi.h" 26#include "spi.h"
27#ifdef CREATIVE_ZVM 27#ifdef CREATIVE_ZVx
28#include "dma-target.h" 28#include "dma-target.h"
29#endif 29#endif
30 30
@@ -224,7 +224,7 @@ void system_init(void)
224 IO_TIMER2_TMMD = CONFIG_TIMER2_TMMD_STOP; 224 IO_TIMER2_TMMD = CONFIG_TIMER2_TMMD_STOP;
225 IO_TIMER3_TMMD = CONFIG_TIMER3_TMMD_STOP; 225 IO_TIMER3_TMMD = CONFIG_TIMER3_TMMD_STOP;
226 226
227#ifndef CREATIVE_ZVM 227#ifndef CREATIVE_ZVx
228 /* set GIO26 (reset pin) to output and low */ 228 /* set GIO26 (reset pin) to output and low */
229 IO_GIO_BITCLR1=(1<<10); 229 IO_GIO_BITCLR1=(1<<10);
230 IO_GIO_DIR1&=~(1<<10); 230 IO_GIO_DIR1&=~(1<<10);
@@ -233,7 +233,7 @@ void system_init(void)
233 uart_init(); 233 uart_init();
234 spi_init(); 234 spi_init();
235 235
236#ifdef CREATIVE_ZVM 236#ifdef CREATIVE_ZVx
237 dma_init(); 237 dma_init();
238#endif 238#endif
239 239
@@ -245,8 +245,8 @@ void system_init(void)
245 map_section(CONFIG_SDRAM_START, CONFIG_SDRAM_START, MEM, CACHE_ALL); 245 map_section(CONFIG_SDRAM_START, CONFIG_SDRAM_START, MEM, CACHE_ALL);
246 /* enable buffered writing for the framebuffer */ 246 /* enable buffered writing for the framebuffer */
247 map_section((int)FRAME, (int)FRAME, 1, BUFFERED); 247 map_section((int)FRAME, (int)FRAME, 1, BUFFERED);
248#ifdef CREATIVE_ZVM 248#ifdef CREATIVE_ZVx
249 //mimic OF 249 /* mimic OF */
250 map_section(0x00100000, 0x00100000, 4, CACHE_NONE); 250 map_section(0x00100000, 0x00100000, 4, CACHE_NONE);
251 map_section(0x04700000, 0x04700000, 2, BUFFERED); 251 map_section(0x04700000, 0x04700000, 2, BUFFERED);
252 map_section(0x40000000, 0x40000000, 16, CACHE_NONE); 252 map_section(0x40000000, 0x40000000, 16, CACHE_NONE);