diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/FILES | 4 | ||||
-rw-r--r-- | firmware/SOURCES | 16 | ||||
-rw-r--r-- | firmware/app.lds | 9 | ||||
-rw-r--r-- | firmware/export/dm320.h | 4 | ||||
-rw-r--r-- | firmware/pcm_playback.c | 5 | ||||
-rwxr-xr-x | firmware/target/arm/tms320dm320/crt0.S (renamed from firmware/target/arm/tms320dm320/mrobe-500/crt0.S) | 2 | ||||
-rwxr-xr-x | firmware/target/arm/tms320dm320/i2c-dm320.c | 50 | ||||
-rwxr-xr-x | firmware/target/arm/tms320dm320/i2c-dm320.h | 44 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/kernel-mr500.c (renamed from firmware/target/arm/tms320dm320/mrobe-500/kernel-mr500.c) | 0 | ||||
-rwxr-xr-x | firmware/target/arm/tms320dm320/mrobe-500/dm320codec-mr500.c | 39 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c | 3 | ||||
-rwxr-xr-x | firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c | 85 | ||||
-rwxr-xr-x | firmware/target/arm/tms320dm320/mrobe-500/powermgmt-mr500.c | 51 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/spi-mr500.c (renamed from firmware/target/arm/tms320dm320/mrobe-500/spi-mr500.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/spi-target.h (renamed from firmware/target/arm/tms320dm320/mrobe-500/spi-target.h) | 0 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/system-mr500.c (renamed from firmware/target/arm/tms320dm320/mrobe-500/system-mr500.c) | 0 | ||||
-rwxr-xr-x | firmware/target/arm/tms320dm320/system-target.h (renamed from firmware/target/arm/tms320dm320/mrobe-500/system-target.h) | 0 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/timer-mr500.c (renamed from firmware/target/arm/tms320dm320/mrobe-500/timer-mr500.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/timer-target.h (renamed from firmware/target/arm/tms320dm320/mrobe-500/timer-target.h) | 0 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/uart-mr500.c (renamed from firmware/target/arm/tms320dm320/mrobe-500/uart-mr500.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/uart-target.h (renamed from firmware/target/arm/tms320dm320/mrobe-500/uart-target.h) | 0 |
21 files changed, 297 insertions, 15 deletions
diff --git a/firmware/FILES b/firmware/FILES index 8b2f3d11ab..a3cfc0c8c2 100644 --- a/firmware/FILES +++ b/firmware/FILES @@ -25,8 +25,8 @@ target/arm/archos/av300/*.[chS] target/arm/s3c2440/gigabeat-fx/*.[chS] target/arm/iriver/*.[chS] target/arm/iriver/h10/*.[chS] -target/arm/olympus/*.[chS] -target/arm/olympus/mrobe-500/*.[chS] +target/arm/tms320dm320/*.[chS] +target/arm/tms320dm320/mrobe-500/*.[chS] target/arm/pnx0101/*.[chS] target/arm/pnx0101/iriver-ifp7xx/*.[chS] target/arm/ipod/*.[chS] diff --git a/firmware/SOURCES b/firmware/SOURCES index 7e2d328c72..bc0c83f293 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -333,7 +333,7 @@ target/arm/crt0-pp.S #elif CONFIG_CPU == PNX0101 target/arm/pnx0101/crt0-pnx0101.S #elif defined(OLYMPUS_MROBE_500) -target/arm/tms320dm320/mrobe-500/crt0.S +target/arm/tms320dm320/crt0.S #elif defined(CPU_ARM) target/arm/crt0.S #endif /* defined(CPU_*) */ @@ -626,14 +626,18 @@ target/arm/tms320dm320/mrobe-500/adc-mr500.c target/arm/tms320dm320/mrobe-500/ata-mr500.c target/arm/tms320dm320/mrobe-500/backlight-mr500.c target/arm/tms320dm320/mrobe-500/button-mr500.c -target/arm/tms320dm320/mrobe-500/kernel-mr500.c +target/arm/tms320dm320/mrobe-500/dm320codec-mr500.c target/arm/tms320dm320/mrobe-500/lcd-mr500.c +target/arm/tms320dm320/mrobe-500/pcm-mr500.c +target/arm/tms320dm320/mrobe-500/powermgmt-mr500.c target/arm/tms320dm320/mrobe-500/power-mr500.c -target/arm/tms320dm320/mrobe-500/system-mr500.c -target/arm/tms320dm320/mrobe-500/timer-mr500.c target/arm/tms320dm320/mrobe-500/usb-mr500.c -target/arm/tms320dm320/mrobe-500/uart-mr500.c -target/arm/tms320dm320/mrobe-500/spi-mr500.c +target/arm/tms320dm320/i2c-dm320.c +target/arm/tms320dm320/kernel-mr500.c +target/arm/tms320dm320/spi-mr500.c +target/arm/tms320dm320/system-mr500.c +target/arm/tms320dm320/timer-mr500.c +target/arm/tms320dm320/uart-mr500.c #ifndef BOOTLOADER #endif diff --git a/firmware/app.lds b/firmware/app.lds index 6ffd33e453..fdd15b32cd 100644 --- a/firmware/app.lds +++ b/firmware/app.lds @@ -9,6 +9,8 @@ OUTPUT_FORMAT(elf32-littlearm) OUTPUT_ARCH(arm) #ifdef CPU_PP INPUT(target/arm/crt0-pp.o) +#elif defined(OLYMPUS_MROBE_500) +INPUT(target/arm/tms320dm320/crt0.o) #elif CONFIG_CPU == PNX0101 INPUT(target/arm/pnx0101/crt0-pnx0101.o) #elif defined(CPU_ARM) @@ -31,6 +33,9 @@ INPUT(target/sh/crt0.o) #if CONFIG_CPU==S3C2440 #include "s3c2440.h" #define DRAMSIZE (MEMORYSIZE * 0x100000) - 0x100 - PLUGINSIZE - STUBOFFSET - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE +#elif CONFIG_CPU==DM320 +#include "dm320.h" +#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE - LCD_BUFFER_SIZE #else #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE #endif @@ -58,8 +63,8 @@ INPUT(target/sh/crt0.o) #define IRAM DRAM #elif CONFIG_CPU==DM320 #define DRAMORIG 0x00900000 + STUBOFFSET -#define IRAMORIG 0x00000000 -#define IRAMSIZE 0x4000 +#define IRAMORIG 0x00000100 +#define IRAMSIZE 0x4000-0x100 #elif CONFIG_CPU==IMX31L #define DRAMORIG (0x80000000 + STUBOFFSET) #define IRAMORIG 0x1FFFC000 diff --git a/firmware/export/dm320.h b/firmware/export/dm320.h index 93f2f3affc..0c84444a66 100644 --- a/firmware/export/dm320.h +++ b/firmware/export/dm320.h @@ -24,7 +24,8 @@ #ifndef __DM320_H__ #define __DM320_H__ -#define FRAME ((short *) (0x4470000)) +#define LCD_BUFFER_SIZE (640*480*4) +#define FRAME ((short *) (0x4900000-LCD_BUFFER_SIZE)) /* Put the buffer at the end of mem */ #define PHY_IO_BASE 0x00030000 #define DM320_REG(addr) (*(volatile unsigned short *)(PHY_IO_BASE + (addr))) @@ -314,7 +315,6 @@ #define IO_CCD_BLKCMP0 0x0728 #define IO_CCD_BLKCMP1 0x072A #define IO_CCD_MEDFILT 0x072C -#define IO_CCD_RYEGAN 0x072E /* this is kept on the odd chance that some code is using the misspelled reg */ #define IO_CCD_RYEGAIN 0x072E #define IO_CCD_GRCYGAIN 0x0730 #define IO_CCD_GBGGAIN 0x0732 diff --git a/firmware/pcm_playback.c b/firmware/pcm_playback.c index 123b7e3505..d317b3708e 100644 --- a/firmware/pcm_playback.c +++ b/firmware/pcm_playback.c @@ -50,7 +50,8 @@ void pcm_play_pause_unpause(void); /** Functions that require targeted implementation **/ -#if defined(CPU_COLDFIRE) || (CONFIG_CPU == S3C2440) || (CONFIG_CPU == IMX31L) +#if defined(CPU_COLDFIRE) || (CONFIG_CPU == S3C2440) || (CONFIG_CPU == IMX31L) \ + || (CONFIG_CPU == DM320) /* Implemented in target/... */ #else /* dummy functions for those not actually supporting all this yet */ @@ -71,7 +72,7 @@ void pcm_mute(bool mute) #endif /* defined(CPU_COLDFIRE) || (CONFIG_CPU == S3C2440) */ #if defined(CPU_COLDFIRE) || (CONFIG_CPU == S3C2440) || defined(CPU_PP) \ - || (CONFIG_CPU == IMX31L) + || (CONFIG_CPU == IMX31L) || (CONFIG_CPU == DM320) /* Implemented in target/... */ #else static int pcm_freq = HW_SAMPR_DEFAULT; /* 44.1 is default */ diff --git a/firmware/target/arm/tms320dm320/mrobe-500/crt0.S b/firmware/target/arm/tms320dm320/crt0.S index 193470fd4a..e54e56d06a 100755 --- a/firmware/target/arm/tms320dm320/mrobe-500/crt0.S +++ b/firmware/target/arm/tms320dm320/crt0.S @@ -194,8 +194,10 @@ data_abort_handler: mov r1, #2 b UIE +#if defined(STUB) || defined(BOOTLOADER) UIE: b UIE +#endif /* 256 words of IRQ stack */ .space 256*4 diff --git a/firmware/target/arm/tms320dm320/i2c-dm320.c b/firmware/target/arm/tms320dm320/i2c-dm320.c new file mode 100755 index 0000000000..f1383fee05 --- /dev/null +++ b/firmware/target/arm/tms320dm320/i2c-dm320.c @@ -0,0 +1,50 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2007 by Karl Kurbjun + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#include "system.h" +#include "i2c-dm320.h" + +static int i2c_getack(void) +{ + +} + +static int i2c_start(void) +{ + +} + +static void i2c_stop(void) +{ + +} + +static int i2c_outb(unsigned char byte) +{ + +} + +void i2c_write(int addr, const unsigned char *buf, int count) +{ + +} + +void i2c_init(void) +{ + +} diff --git a/firmware/target/arm/tms320dm320/i2c-dm320.h b/firmware/target/arm/tms320dm320/i2c-dm320.h new file mode 100755 index 0000000000..aa7ced1119 --- /dev/null +++ b/firmware/target/arm/tms320dm320/i2c-dm320.h @@ -0,0 +1,44 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: i2c-meg-fx.h 13720 2007-06-26 02:11:30Z jethead71 $ + * + * Copyright (C) 2007 by Michael Sevakis + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +/* chip-specific i2c functions */ + +/* IICCON */ +#define I2C_ACKGEN (1 << 7) +#define I2C_TXCLK_512 (1 << 6) +#define I2C_TXRX_INTENB (1 << 5) +#define I2C_TXRX_INTPND (1 << 4) + +/* IICSTAT */ +#define I2C_MODE_MASTER (2 << 6) +#define I2C_MODE_TX (1 << 6) +#define I2C_BUSY (1 << 5) +#define I2C_START (1 << 5) +#define I2C_RXTX_ENB (1 << 4) +#define I2C_BUS_ARB_FAILED (1 << 3) +#define I2C_S_ADDR_STAT (1 << 2) +#define I2C_S_ADDR_MATCH (1 << 1) +#define I2C_ACK_L (1 << 0) + +/* IICLC */ +#define I2C_FLT_ENB (1 << 2) + +void i2c_init(void); +void i2c_write(int addr, const unsigned char *data, int count); + diff --git a/firmware/target/arm/tms320dm320/mrobe-500/kernel-mr500.c b/firmware/target/arm/tms320dm320/kernel-mr500.c index be2b14b3cb..be2b14b3cb 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/kernel-mr500.c +++ b/firmware/target/arm/tms320dm320/kernel-mr500.c diff --git a/firmware/target/arm/tms320dm320/mrobe-500/dm320codec-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/dm320codec-mr500.c new file mode 100755 index 0000000000..eed1f8d3a0 --- /dev/null +++ b/firmware/target/arm/tms320dm320/mrobe-500/dm320codec-mr500.c @@ -0,0 +1,39 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (c) 2007 by Karl Kurbjun + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#include "cpu.h" +#include "kernel.h" +#include "sound.h" + +const struct sound_settings_info audiohw_settings[] = { + [SOUND_VOLUME] = {"dB", 0, 1, -74, 6, -25}, + [SOUND_BASS] = {"dB", 1, 15, -60, 90, 0}, + [SOUND_TREBLE] = {"dB", 1, 15, -60, 90, 0}, + [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, + [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, + [SOUND_STEREO_WIDTH] = {"%", 0, 1, 0, 255, 100}, +}; + + +void audiohw_init(void) +{ +} + +void audiohw_close(void) +{ +} diff --git a/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c index 6c06e070f9..aad7733154 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c +++ b/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c @@ -167,8 +167,9 @@ void lcd_yuv_blit(unsigned char * const src[3], do { - lcd_write_yuv420_lines(dst, chroma_buf, yuv_src, width, +/* lcd_write_yuv420_lines(dst, chroma_buf, yuv_src, width, stride); + */ yuv_src[0] += stride << 1; /* Skip down two luma lines */ yuv_src[1] += stride >> 1; /* Skip down one chroma line */ yuv_src[2] += stride >> 1; diff --git a/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c new file mode 100755 index 0000000000..3bc9124674 --- /dev/null +++ b/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c @@ -0,0 +1,85 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2007 by Karl Kurbjun + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#include <stdlib.h> +#include "system.h" +#include "kernel.h" +#include "logf.h" +#include "audio.h" +#include "sound.h" +#include "file.h" + +static void _pcm_apply_settings(void) +{ +} + +void pcm_apply_settings(void) +{ +} + +void pcm_init(void) +{ +} + +void pcm_postinit(void) +{ +} + +void pcm_play_dma_start(const void *addr, size_t size) +{ + +} + +static void pcm_play_dma_stop_fiq(void) +{ + +} + +void pcm_play_dma_stop(void) +{ + +} + +void pcm_play_pause_pause(void) +{ +} + +void pcm_play_pause_unpause(void) +{ +} + +void pcm_set_frequency(unsigned int frequency) +{ +} + +size_t pcm_get_bytes_waiting(void) +{ +} + +void pcm_mute(bool mute) +{ +} + +/** + * Return playback peaks - Peaks ahead in the DMA buffer based upon the + * calling period to attempt to compensate for + * delay. + */ +void pcm_calculate_peaks(int *left, int *right) +{ +} /* pcm_calculate_peaks */ diff --git a/firmware/target/arm/tms320dm320/mrobe-500/powermgmt-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/powermgmt-mr500.c new file mode 100755 index 0000000000..20ca4bb509 --- /dev/null +++ b/firmware/target/arm/tms320dm320/mrobe-500/powermgmt-mr500.c @@ -0,0 +1,51 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2007 by Karl Kurbjun + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#include "config.h" +#include "adc.h" +#include "powermgmt.h" + +const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = +{ + 3450 +}; + +const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = +{ + 3400 +}; + +/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ +const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = +{ + { 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 }, +}; + +/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ +const unsigned short percent_to_volt_charge[11] = +{ + 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 +}; + +/* Returns battery voltage from ADC [millivolts] */ +unsigned int battery_adc_voltage(void) +{ + return 3500; +} + diff --git a/firmware/target/arm/tms320dm320/mrobe-500/spi-mr500.c b/firmware/target/arm/tms320dm320/spi-mr500.c index c47ab8f6ed..c47ab8f6ed 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/spi-mr500.c +++ b/firmware/target/arm/tms320dm320/spi-mr500.c diff --git a/firmware/target/arm/tms320dm320/mrobe-500/spi-target.h b/firmware/target/arm/tms320dm320/spi-target.h index 866919dc27..866919dc27 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/spi-target.h +++ b/firmware/target/arm/tms320dm320/spi-target.h diff --git a/firmware/target/arm/tms320dm320/mrobe-500/system-mr500.c b/firmware/target/arm/tms320dm320/system-mr500.c index fad2d4331e..fad2d4331e 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/system-mr500.c +++ b/firmware/target/arm/tms320dm320/system-mr500.c diff --git a/firmware/target/arm/tms320dm320/mrobe-500/system-target.h b/firmware/target/arm/tms320dm320/system-target.h index 7adfda6f7d..7adfda6f7d 100755 --- a/firmware/target/arm/tms320dm320/mrobe-500/system-target.h +++ b/firmware/target/arm/tms320dm320/system-target.h diff --git a/firmware/target/arm/tms320dm320/mrobe-500/timer-mr500.c b/firmware/target/arm/tms320dm320/timer-mr500.c index 21449ed19f..21449ed19f 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/timer-mr500.c +++ b/firmware/target/arm/tms320dm320/timer-mr500.c diff --git a/firmware/target/arm/tms320dm320/mrobe-500/timer-target.h b/firmware/target/arm/tms320dm320/timer-target.h index 4abe75ad82..4abe75ad82 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/timer-target.h +++ b/firmware/target/arm/tms320dm320/timer-target.h diff --git a/firmware/target/arm/tms320dm320/mrobe-500/uart-mr500.c b/firmware/target/arm/tms320dm320/uart-mr500.c index 66e59eaaac..66e59eaaac 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/uart-mr500.c +++ b/firmware/target/arm/tms320dm320/uart-mr500.c diff --git a/firmware/target/arm/tms320dm320/mrobe-500/uart-target.h b/firmware/target/arm/tms320dm320/uart-target.h index f077dc1025..f077dc1025 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/uart-target.h +++ b/firmware/target/arm/tms320dm320/uart-target.h |