summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-05-14 18:55:19 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-05-14 18:55:19 +0000
commite031db4b87609ab11e62f44166058df1ac790fb3 (patch)
tree3a8867dcf1d8f1106beeed9016943cfe540c2ab9
parent727a8059d7f4d04fb938f14a564ea954256ef72d (diff)
downloadrockbox-e031db4b87609ab11e62f44166058df1ac790fb3.zip
rockbox-e031db4b87609ab11e62f44166058df1ac790fb3.tar.gz
rockbox-e031db4b87609ab11e62f44166058df1ac790fb3.tar.bz2
rockbox-e031db4b87609ab11e62f44166058df1ac790fb3.tar.xz
1) Use a separate config-<target>.h for Zen Vision(:M) (60GB)
2) Other unrelated cleanups git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17503 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/debug_menu.c4
-rw-r--r--firmware/SOURCES4
-rw-r--r--firmware/common/disk.c4
-rw-r--r--firmware/drivers/audio/tlv320.c6
-rw-r--r--firmware/export/config-creativezv.h166
-rw-r--r--firmware/export/config-creativezvm.h16
-rw-r--r--firmware/export/config-creativezvm60gb.h168
-rw-r--r--firmware/export/config.h4
-rw-r--r--firmware/export/tlv320.h2
-rw-r--r--firmware/kernel.c4
-rw-r--r--firmware/panic.c2
-rw-r--r--firmware/target/arm/ata-as-arm.S2
-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
-rw-r--r--firmware/usb.c2
-rw-r--r--tools/checkwps/targets.txt2
-rwxr-xr-xtools/configure6
21 files changed, 382 insertions, 47 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 17a5ddb..7408608 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -2426,7 +2426,7 @@ static bool dbg_isp1583(void)
}
#endif
-#ifdef CREATIVE_ZVM
+#ifdef CREATIVE_ZVx
extern int pic_dbg_num_items(void);
extern char* pic_dbg_item(int selected_item, void *data, char *buffer, size_t buffer_len);
@@ -2527,7 +2527,7 @@ static const struct the_menu_item menuitems[] = {
#if CONFIG_USBOTG == USBOTG_ISP1583
{ "View ISP1583 info", dbg_isp1583 },
#endif
-#ifdef CREATIVE_ZVM
+#ifdef CREATIVE_ZVx
{ "View PIC info", dbg_pic },
#endif
#ifdef ROCKBOX_HAS_LOGF
diff --git a/firmware/SOURCES b/firmware/SOURCES
index b577110..0d72616 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -716,7 +716,7 @@ target/arm/tms320dm320/mrobe-500/usb-mr500.c
#endif /* SIMULATOR */
#endif /* MROBE_500 */
-#ifdef CREATIVE_ZVM
+#ifdef CREATIVE_ZVx
#ifndef SIMULATOR
target/arm/ata-as-arm.S
target/arm/lcd-as-memframe.S
@@ -731,7 +731,7 @@ target/arm/tms320dm320/creative-zvm/power-creativezvm.c
target/arm/tms320dm320/creative-zvm/powermgmt-creativezvm.c
target/arm/tms320dm320/creative-zvm/usb-creativezvm.c
#endif /* SIMULATOR */
-#endif /* CREATIVE_ZVM */
+#endif /* CREATIVE_ZVx */
#ifdef MROBE_100
#ifndef SIMULATOR
diff --git a/firmware/common/disk.c b/firmware/common/disk.c
index 653f17e..27b7975 100644
--- a/firmware/common/disk.c
+++ b/firmware/common/disk.c
@@ -68,7 +68,7 @@ struct partinfo* disk_init(IF_MV_NONVOID(int drive))
#endif
ata_read_sectors(IF_MV2(drive,) 0,1, &sector);
-#ifndef CREATIVE_ZVM
+#ifndef CREATIVE_ZVx
/* check that the boot sector is initialized */
if ( (sector[510] != 0x55) ||
(sector[511] != 0xaa)) {
@@ -187,7 +187,7 @@ int disk_mount(int drive)
{
return 0;
}
-#if defined(TOSHIBA_GIGABEAT_S) ||defined(CREATIVE_ZVM)
+#if defined(TOSHIBA_GIGABEAT_S) || defined(CREATIVE_ZVx)
int i = 1; /* For the Gigabeat S, we mount the second partition */
#else
int i = 0;
diff --git a/firmware/drivers/audio/tlv320.c b/firmware/drivers/audio/tlv320.c
index de83704..8839078 100644
--- a/firmware/drivers/audio/tlv320.c
+++ b/firmware/drivers/audio/tlv320.c
@@ -59,7 +59,7 @@ int tenthdb2master(int db)
}
/* local functions and definations */
-#ifndef CREATIVE_ZVM
+#ifndef CREATIVE_ZVx
#define TLV320_ADDR 0x34
#else
#define TLV320_ADDR 0x1A
@@ -118,10 +118,10 @@ void audiohw_init(void)
audiohw_mute(true);
tlv320_write_reg(REG_AAP, AAP_DAC | AAP_MICM);
tlv320_write_reg(REG_DAP, 0x00); /* No deemphasis */
-#ifndef CREATIVE_ZVM
+#ifndef CREATIVE_ZVx
tlv320_write_reg(REG_DAIF, DAIF_IWL_16 | DAIF_FOR_I2S);
#else
- tlv320_write_reg(REG_DAIF, DAIF_IWL_16 | DAIF_FOR_DSP);
+ tlv320_write_reg(REG_DAIF, DAIF_IWL_32 | DAIF_FOR_DSP);
#endif
tlv320_write_reg(REG_DIA, DIA_ACT);
audiohw_set_frequency(-1); /* default */
diff --git a/firmware/export/config-creativezv.h b/firmware/export/config-creativezv.h
new file mode 100644
index 0000000..af9bedf
--- /dev/null
+++ b/firmware/export/config-creativezv.h
@@ -0,0 +1,166 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2008 by Maurus Cuelenaere
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+/*
+ * This config file is for the Creative Zen Vision
+ */
+#define TARGET_TREE /* this target is using the target tree system */
+
+#define CONFIG_SDRAM_START 0x00900000
+
+#define CREATIVE_ZV 1
+
+/* This makes it part of the Creative Zen Vision family :) */
+#define CREATIVE_ZVx 1
+
+/* For Rolo and boot loader */
+#define MODEL_NUMBER 28
+
+/* define this if you use an ATA controller */
+#define HAVE_ATA
+
+/* define this if you have a bitmap LCD display */
+#define HAVE_LCD_BITMAP
+
+/* define this if you have a colour LCD */
+#define HAVE_LCD_COLOR
+
+/* define this if you have access to the quickscreen */
+#define HAVE_QUICKSCREEN
+
+/* define this if you have access to the pitchscreen */
+#define HAVE_PITCHSCREEN
+
+/* define this if you would like tagcache to build on this target */
+#define HAVE_TAGCACHE
+
+/* define this if the target has volume keys which can be used in the lists */
+//#define HAVE_VOLUME_IN_LIST
+
+/* LCD dimensions */
+#define CONFIG_LCD LCD_CREATIVEZVM
+
+/* choose the lcd orientation. both work */
+#define CONFIG_ORIENTATION SCREEN_PORTRAIT
+
+#define LCD_WIDTH 640
+#define LCD_HEIGHT 480
+
+#define LCD_DEPTH 16 /* 65k colours */
+#define LCD_PIXELFORMAT RGB565 /* rgb565 */
+
+/* Define this if your LCD can be enabled/disabled */
+#define HAVE_LCD_ENABLE
+
+#define CONFIG_KEYPAD CREATIVEZVM_PAD
+#define HAS_BUTTON_HOLD
+#define HAVE_HEADPHONE_DETECTION
+//#define HAVE_TOUCHPAD
+
+#define CONFIG_I2C I2C_DM320
+
+/* Define this if you do software codec */
+#define CONFIG_CODEC SWCODEC
+
+/* define this if you have a real-time clock */
+//#define CONFIG_RTC RTC_RX5X348AB
+
+/* Define this for LCD backlight available */
+//#define HAVE_BACKLIGHT
+
+//#define HAVE_BACKLIGHT_BRIGHTNESS
+
+/* Main LCD backlight brightness range and defaults */
+//#define MIN_BRIGHTNESS_SETTING 0
+//#define MAX_BRIGHTNESS_SETTING 127
+//#define DEFAULT_BRIGHTNESS_SETTING 85 /* OF "full brightness" */
+//#define DEFAULT_DIMNESS_SETTING 22 /* OF "most dim" */
+
+/* Define this if you have a software controlled poweroff */
+//#define HAVE_SW_POWEROFF
+//TODO: enable this back
+
+/* The number of bytes reserved for loadable codecs */
+#define CODEC_SIZE 0x80000
+
+/* The number of bytes reserved for loadable plugins */
+#define PLUGIN_BUFFER_SIZE 0x100000
+
+/* Define this if you have the TLV320 audio codec -> controlled by the DSP */
+#define HAVE_TLV320
+
+#define CONFIG_I2C I2C_DM320
+
+/* TLV320 has no tone controls, so we use the software ones */
+#define HAVE_SW_TONE_CONTROLS
+
+/*#define HW_SAMPR_CAPS (SAMPR_CAP_88 | SAMPR_CAP_44 | SAMPR_CAP_22 | \
+ SAMPR_CAP_11)*/
+
+#define BATTERY_CAPACITY_DEFAULT 1250 /* default battery capacity */
+#define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */
+#define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */
+#define BATTERY_CAPACITY_INC 100 /* capacity increment */
+#define BATTERY_TYPES_COUNT 1 /* only one type */
+
+/* Hardware controlled charging with monitoring */
+//#define CONFIG_CHARGING CHARGING_MONITOR
+
+#ifndef SIMULATOR
+
+/* Define this if you have a TI TMS320DM320 */
+#define CONFIG_CPU DM320
+
+/* define this if the hardware can be powered off while charging */
+#define HAVE_POWEROFF_WHILE_CHARGING
+
+/* The size of the flash ROM */
+#define FLASH_SIZE 0x400000
+
+/* Define this to the CPU frequency */
+#define CPU_FREQ 16934400
+
+/* Define this if you have ATA power-off control */
+#define HAVE_ATA_POWER_OFF
+
+/* Virtual LED (icon) */
+#define CONFIG_LED LED_VIRTUAL
+
+/* define this if the backlight can be set to a brightness */
+//#define __BACKLIGHT_INIT
+
+/* Offset ( in the firmware file's header ) to the file CRC */
+#define FIRMWARE_OFFSET_FILE_CRC 0
+
+/* Offset ( in the firmware file's header ) to the real data */
+#define FIRMWARE_OFFSET_FILE_DATA 8
+
+/* Define this if you have adjustable CPU frequency */
+/* #define HAVE_ADJUSTABLE_CPU_FREQ */
+
+#define BOOTFILE_EXT "zv"
+#define BOOTFILE "rockbox." BOOTFILE_EXT
+#define BOOTDIR "/.rockbox"
+
+#define CONFIG_USBOTG USBOTG_ISP1583
+#define HAVE_USBSTACK
+#define USB_VENDOR_ID 0x041e
+#define USB_PRODUCT_ID 0x4133
+
+#endif /* SIMULATOR */
diff --git a/firmware/export/config-creativezvm.h b/firmware/export/config-creativezvm.h
index 33a5105..ec5e113 100644
--- a/firmware/export/config-creativezvm.h
+++ b/firmware/export/config-creativezvm.h
@@ -26,6 +26,9 @@
#define CREATIVE_ZVM 1
+/* This makes it part of the Creative Zen Vision family :) */
+#define CREATIVE_ZVx 1
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 26
@@ -56,13 +59,8 @@
/* choose the lcd orientation. both work */
#define CONFIG_ORIENTATION SCREEN_PORTRAIT
-#ifdef ZEN_VISION
-#define LCD_WIDTH 640
-#define LCD_HEIGHT 480
-#else
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
-#endif
#define LCD_DEPTH 16 /* 65k colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
@@ -156,13 +154,7 @@
/* Define this if you have adjustable CPU frequency */
/* #define HAVE_ADJUSTABLE_CPU_FREQ */
-#ifdef ZEN_VISION
- #define BOOTFILE_EXT "zv"
-#elseif defined(ZVM_60GB)
- #define BOOTFILE_EXT "zvm60"
-#else
- #define BOOTFILE_EXT "zvm"
-#endif
+#define BOOTFILE_EXT "zvm"
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/.rockbox"
diff --git a/firmware/export/config-creativezvm60gb.h b/firmware/export/config-creativezvm60gb.h
new file mode 100644
index 0000000..f8a7125
--- /dev/null
+++ b/firmware/export/config-creativezvm60gb.h
@@ -0,0 +1,168 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2008 by Maurus Cuelenaere
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+/*
+ * This config file is for the Creative Zen Vision:M 60GB
+ */
+#define TARGET_TREE /* this target is using the target tree system */
+
+#define CONFIG_SDRAM_START 0x00900000
+
+#define CREATIVE_ZVM60GB 1
+
+/* This makes it part of the Creative Zen Vision family :) */
+#define CREATIVE_ZVx 1
+
+/* For Rolo and boot loader */
+#define MODEL_NUMBER 27
+
+/* define this if you use an ATA controller */
+#define HAVE_ATA
+
+/* define this if you have a bitmap LCD display */
+#define HAVE_LCD_BITMAP
+
+/* define this if you have a colour LCD */
+#define HAVE_LCD_COLOR
+
+/* define this if you have access to the quickscreen */
+#define HAVE_QUICKSCREEN
+
+/* define this if you have access to the pitchscreen */
+#define HAVE_PITCHSCREEN
+
+/* define this if you would like tagcache to build on this target */
+#define HAVE_TAGCACHE
+
+/* define this if the target has volume keys which can be used in the lists */
+//#define HAVE_VOLUME_IN_LIST
+
+/* LCD dimensions */
+#define CONFIG_LCD LCD_CREATIVEZVM
+
+/* choose the lcd orientation. both work */
+#define CONFIG_ORIENTATION SCREEN_PORTRAIT
+
+#define LCD_WIDTH 320
+#define LCD_HEIGHT 240
+
+#define LCD_DEPTH 16 /* 65k colours */
+#define LCD_PIXELFORMAT RGB565 /* rgb565 */
+
+/* Define this if your LCD can be enabled/disabled */
+#define HAVE_LCD_ENABLE
+
+#define CONFIG_KEYPAD CREATIVEZVM_PAD
+#define HAS_BUTTON_HOLD
+#define HAVE_HEADPHONE_DETECTION
+//#define HAVE_TOUCHPAD
+
+#define CONFIG_I2C I2C_DM320
+
+/* Define this if you do software codec */
+#define CONFIG_CODEC SWCODEC
+
+/* define this if you have a real-time clock */
+//#define CONFIG_RTC RTC_RX5X348AB
+
+/* Define this for LCD backlight available */
+//#define HAVE_BACKLIGHT
+
+//#define HAVE_BACKLIGHT_BRIGHTNESS
+
+/* Main LCD backlight brightness range and defaults */
+//#define MIN_BRIGHTNESS_SETTING 0
+//#define MAX_BRIGHTNESS_SETTING 127
+//#define DEFAULT_BRIGHTNESS_SETTING 85 /* OF "full brightness" */
+//#define DEFAULT_DIMNESS_SETTING 22 /* OF "most dim" */
+
+/* Define this if you have a software controlled poweroff */
+//#define HAVE_SW_POWEROFF
+//TODO: enable this back
+
+/* The number of bytes reserved for loadable codecs */
+#define CODEC_SIZE 0x80000
+
+/* The number of bytes reserved for loadable plugins */
+#define PLUGIN_BUFFER_SIZE 0x100000
+
+/* Define this if you have the TLV320 audio codec -> controlled by the DSP */
+#define HAVE_TLV320
+
+#define CONFIG_I2C I2C_DM320
+
+/* TLV320 has no tone controls, so we use the software ones */
+#define HAVE_SW_TONE_CONTROLS
+
+/*#define HW_SAMPR_CAPS (SAMPR_CAP_88 | SAMPR_CAP_44 | SAMPR_CAP_22 | \
+ SAMPR_CAP_11)*/
+
+#define BATTERY_CAPACITY_DEFAULT 1250 /* default battery capacity */
+#define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */
+#define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */
+#define BATTERY_CAPACITY_INC 100 /* capacity increment */
+#define BATTERY_TYPES_COUNT 1 /* only one type */
+
+/* Hardware controlled charging with monitoring */
+//#define CONFIG_CHARGING CHARGING_MONITOR
+
+#ifndef SIMULATOR
+
+/* Define this if you have a TI TMS320DM320 */
+#define CONFIG_CPU DM320
+
+/* define this if the hardware can be powered off while charging */
+#define HAVE_POWEROFF_WHILE_CHARGING
+
+/* The size of the flash ROM */
+#define FLASH_SIZE 0x400000
+
+/* Define this to the CPU frequency */
+#define CPU_FREQ 16934400
+
+/* Define this if you have ATA power-off control */
+#define HAVE_ATA_POWER_OFF
+
+/* Virtual LED (icon) */
+#define CONFIG_LED LED_VIRTUAL
+
+/* define this if the backlight can be set to a brightness */
+//#define __BACKLIGHT_INIT
+
+/* Offset ( in the firmware file's header ) to the file CRC */
+#define FIRMWARE_OFFSET_FILE_CRC 0
+
+/* Offset ( in the firmware file's header ) to the real data */
+#define FIRMWARE_OFFSET_FILE_DATA 8
+
+/* Define this if you have adjustable CPU frequency */
+/* #define HAVE_ADJUSTABLE_CPU_FREQ */
+
+#define BOOTFILE_EXT "zvm60"
+#define BOOTFILE "rockbox." BOOTFILE_EXT
+#define BOOTDIR "/.rockbox"
+
+#if 0
+#define CONFIG_USBOTG USBOTG_ISP1761
+#define HAVE_USBSTACK
+#define USB_VENDOR_ID 0x041e
+#define USB_PRODUCT_ID 0x4133
+#endif
+
+#endif /* SIMULATOR */
diff --git a/firmware/export/config.h b/firmware/export/config.h
index e6b84f9..595b731 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -253,6 +253,10 @@
#include "config-cowond2.h"
#elif defined(CREATIVE_ZVM)
#include "config-creativezvm.h"
+#elif defined(CREATIVE_ZVM60GB)
+#include "config-creativezvm60gb.h"
+#elif defined(CREATIVE_ZV)
+#include "config-creativezv.h"
#else
/* no known platform */
#endif
diff --git a/firmware/export/tlv320.h b/firmware/export/tlv320.h
index 6d9f858..3aed992 100644
--- a/firmware/export/tlv320.h
+++ b/firmware/export/tlv320.h
@@ -111,7 +111,7 @@ extern void audiohw_set_headphone_vol(int vol_l, int vol_r);
/* REG_SRC: Sample Rate Control */
#define REG_SRC 0x8
-#define SRC_CLKIN (1 << 6) /* Clock input divider */
+#define SRC_CLKIN (1 << 6) /* Clock input divider */
#define SRC_CLKOUT (1 << 7) /* Clock output divider */
/*#define SRC_SR ()*/
#define SRC_BOSR (1 << 1) /* Base oversampling rate, depends on SRC_USB */
diff --git a/firmware/kernel.c b/firmware/kernel.c
index 0dec870..728b5ce 100644
--- a/firmware/kernel.c
+++ b/firmware/kernel.c
@@ -435,8 +435,8 @@ void sleep(int ticks)
unsigned stop = USEC_TIMER + ticks * (1000000/HZ);
while (TIME_BEFORE(USEC_TIMER, stop))
switch_thread();
-#elif defined(CREATIVE_ZVM) && defined(BOOTLOADER)
- // hacky..
+#elif defined(CREATIVE_ZVx) && defined(BOOTLOADER)
+ /* hacky.. */
long sleep_ticks = current_tick + ticks + 1;
while (sleep_ticks > current_tick)
switch_thread();
diff --git a/firmware/panic.c b/firmware/panic.c
index 781345e..5f6ae93 100644
--- a/firmware/panic.c
+++ b/firmware/panic.c
@@ -123,7 +123,7 @@ void panicf( const char *fmt, ...)
#elif CONFIG_KEYPAD == ONDIO_PAD
if (!(PCDR & 0x0008))
#endif /* CONFIG_KEYPAD */
-#elif defined(CREATIVE_ZVM)
+#elif defined(CREATIVE_ZVx)
if(false)
#endif /* CPU */
system_reboot();
diff --git a/firmware/target/arm/ata-as-arm.S b/firmware/target/arm/ata-as-arm.S
index 5de6ddb..275b905 100644
--- a/firmware/target/arm/ata-as-arm.S
+++ b/firmware/target/arm/ata-as-arm.S
@@ -33,7 +33,7 @@
/* Untested */
.text
.equ .ata_port, 0x18000000
-#elif defined(CREATIVE_ZVM)
+#elif defined(CREATIVE_ZVx) /* Zen Vision could have an other address */
.text
.equ .ata_port, 0x50FEE000
#endif
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c
index 76c8869..1d71dad 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 @@
#include "button-target.h"
#include "i2c-dm320.h"
+#define BUTTON_DEBUG
+
+#ifdef BUTTON_DEBUG
#include "lcd-target.h"
#include "lcd.h"
#include "sprintf.h"
#include "font.h"
+#endif
#ifndef ZEN_VISION
/* Creative Zen Vision:M */
@@ -189,7 +193,6 @@ void GIO0(void)
if(tick_diff >= TICK_MIN && tick_diff <= TICK_MAX)
{
/* Ignore this, as it is a hold event */
- IO_INTC_IRQ1 = INTR_IRQ1_EXT0;
return;
}
last_btn = btn_press;
@@ -271,8 +274,8 @@ void GIO0(void)
#endif
}
-void send_command_to_pic(unsigned char in, unsigned char* out,
- unsigned int length)
+void send_command_to_pic(const unsigned char in, unsigned char* out,
+ const unsigned int length)
{
/* Disable GIO0 interrupt */
IO_INTC_EINT1 &= ~INTR_EINT1_EXT0;
diff --git a/firmware/target/arm/tms320dm320/crt0.S b/firmware/target/arm/tms320dm320/crt0.S
index 5729357..a0b5a5a 100755
--- a/firmware/target/arm/tms320dm320/crt0.S
+++ b/firmware/target/arm/tms320dm320/crt0.S
@@ -153,7 +153,7 @@ start:
msr cpsr_c, #0xd3
ldr sp, =stackend
-#if defined(BOOTLOADER) && !defined(CREATIVE_ZVM)
+#if defined(BOOTLOADER) && !defined(CREATIVE_ZVx)
/* get the high part of our execute address */
ldr r2, =0xffffff00
and r4, pc, r2
diff --git a/firmware/target/arm/tms320dm320/debug-dm320.c b/firmware/target/arm/tms320dm320/debug-dm320.c
index 23257dd..894f99c 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)
return false;
}
-#ifndef CREATIVE_ZVM
+#ifndef CREATIVE_ZVx
extern char r_buffer[5];
extern int r_button;
#endif
@@ -42,7 +42,7 @@ bool __dbg_hw_info(void)
{
int line = 0, oldline;
int button;
-#ifndef CREATIVE_ZVM
+#ifndef CREATIVE_ZVx
int *address=0x0;
#endif
bool done=false;
@@ -103,14 +103,14 @@ bool __dbg_hw_info(void)
lcd_puts(0, line++, " Unknown DM320 Chip ID");
}
-#ifndef CREATIVE_ZVM
+#ifndef CREATIVE_ZVx
line++;
#endif
oldline=line;
while(!done)
{
line = oldline;
-#ifndef CREATIVE_ZVM
+#ifndef CREATIVE_ZVx
button = button_get(false);
button&=~BUTTON_REPEAT;
if (button == BUTTON_POWER)
@@ -145,7 +145,7 @@ bool __dbg_hw_info(void)
lcd_puts(0, line++, "[Rockbox info]");
snprintf(buf, sizeof(buf), "current tick: %08x Seconds running: %08d",
(unsigned int)current_tick, (unsigned int)current_tick/100); lcd_puts(0, line++, buf);
-#ifndef CREATIVE_ZVM
+#ifndef CREATIVE_ZVx
snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x",
(unsigned int)address, *address); lcd_puts(0, line++, buf);
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 a7b4fc6..6375298 100644
--- a/firmware/target/arm/tms320dm320/spi-dm320.c
+++ b/firmware/target/arm/tms320dm320/spi-dm320.c
@@ -43,7 +43,7 @@ struct SPI_info {
struct SPI_info spi_targets[] =
{
-#ifndef CREATIVE_ZVM
+#ifndef CREATIVE_ZVx
[SPI_target_TSC2100] = { &IO_GIO_BITCLR1, &IO_GIO_BITSET1, GIO_TS_ENABLE },
[SPI_target_RX5X348AB] = { &IO_GIO_BITSET0, &IO_GIO_BITCLR0, GIO_RTC_ENABLE},
[SPI_target_BACKLIGHT] = { &IO_GIO_BITCLR1, &IO_GIO_BITSET1, GIO_BL_ENABLE },
@@ -106,7 +106,7 @@ void spi_init(void)
IO_SERIAL0_MODE |= IO_SERIAL0_MODE_SCLK;
/* Enable TX */
IO_SERIAL0_TX_ENABLE = 0x0001;
-#ifndef CREATIVE_ZVM
+#ifndef CREATIVE_ZVx
/* Set GIO 18 to output for touch screen slave enable */
IO_GIO_DIR1 &= ~GIO_TS_ENABLE;
/* 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 704867d..10da048 100644
--- a/firmware/target/arm/tms320dm320/spi-target.h
+++ b/firmware/target/arm/tms320dm320/spi-target.h
@@ -24,7 +24,7 @@
#include <stdbool.h>
enum SPI_target {
-#ifndef CREATIVE_ZVM
+#ifndef CREATIVE_ZVx
SPI_target_TSC2100 = 0,
SPI_target_RX5X348AB,
SPI_target_BACKLIGHT,
diff --git a/firmware/target/arm/tms320dm320/system-dm320.c b/firmware/target/arm/tms320dm320/system-dm320.c
index 234d13c..ac7df30 100644
--- a/firmware/target/arm/tms320dm320/system-dm320.c
+++ b/firmware/target/arm/tms320dm320/system-dm320.c
@@ -24,7 +24,7 @@
#include "uart-target.h"
#include "system-arm.h"
#include "spi.h"
-#ifdef CREATIVE_ZVM
+#ifdef CREATIVE_ZVx
#include "dma-target.h"
#endif
@@ -224,7 +224,7 @@ void system_init(void)
IO_TIMER2_TMMD = CONFIG_TIMER2_TMMD_STOP;
IO_TIMER3_TMMD = CONFIG_TIMER3_TMMD_STOP;
-#ifndef CREATIVE_ZVM
+#ifndef CREATIVE_ZVx
/* set GIO26 (reset pin) to output and low */
IO_GIO_BITCLR1=(1<<10);
IO_GIO_DIR1&=~(1<<10);
@@ -233,7 +233,7 @@ void system_init(void)
uart_init();
spi_init();
-#ifdef CREATIVE_ZVM
+#ifdef CREATIVE_ZVx
dma_init();
#endif
@@ -245,8 +245,8 @@ void system_init(void)
map_section(CONFIG_SDRAM_START, CONFIG_SDRAM_START, MEM, CACHE_ALL);
/* enable buffered writing for the framebuffer */
map_section((int)FRAME, (int)FRAME, 1, BUFFERED);
-#ifdef CREATIVE_ZVM
- //mimic OF
+#ifdef CREATIVE_ZVx
+ /* mimic OF */
map_section(0x00100000, 0x00100000, 4, CACHE_NONE);
map_section(0x04700000, 0x04700000, 2, BUFFERED);
map_section(0x40000000, 0x40000000, 16, CACHE_NONE);
diff --git a/firmware/usb.c b/firmware/usb.c
index 90991e2..d7a54d9 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -48,7 +48,7 @@
/* Conditions under which we want the entire driver */
#if !defined(BOOTLOADER) || \
(defined(TOSHIBA_GIGABEAT_S) && defined(USE_ROCKBOX_USB) && defined(USB_STORAGE)) || \
- (defined(CREATIVE_ZVM) && defined(HAVE_USBSTACK))
+ (defined(CREATIVE_ZVx) && defined(HAVE_USBSTACK))
#define USB_FULL_INIT
#endif
diff --git a/tools/checkwps/targets.txt b/tools/checkwps/targets.txt
index c530ad4..9583109 100644
--- a/tools/checkwps/targets.txt
+++ b/tools/checkwps/targets.txt
@@ -27,6 +27,8 @@ MROBE_500 mrobe500
MROBE_100 mrobe100
LOGIK_DAX logikdax
CREATIVE_ZVM creativezvm
+CREATIVE_ZVM60GB creativezvm60
+CREATIVE_ZV creativezv
SANSA_E200 e200
SANSA_E200 e200r
SANSA_C200 c200
diff --git a/tools/configure b/tools/configure
index 02f014d..315e81d 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1453,7 +1453,7 @@ fi
t_model="logikdax"
;;
- 90|creativezvm)
+ 90|creativezvm30gb)
target_id=35
modelname="creativezvm"
target="-DCREATIVE_ZVM"
@@ -1480,7 +1480,7 @@ fi
91|creativezvm60gb)
target_id=40
modelname="creativezvm"
- target="-DCREATIVE_ZVM -DZVM_60GB"
+ target="-DCREATIVE_ZVM60GB"
memory=64
arm926ejscc
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
@@ -1504,7 +1504,7 @@ fi
92|creativezenvision)
target_id=39
modelname="creativezm"
- target="-DCREATIVE_ZVM -DZEN_VISION"
+ target="-DCREATIVE_ZV"
memory=64
arm926ejscc
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"