diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-05-14 18:55:19 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-05-14 18:55:19 +0000 |
commit | e031db4b87609ab11e62f44166058df1ac790fb3 (patch) | |
tree | 3a8867dcf1d8f1106beeed9016943cfe540c2ab9 /firmware | |
parent | 727a8059d7f4d04fb938f14a564ea954256ef72d (diff) | |
download | rockbox-e031db4b87609ab11e62f44166058df1ac790fb3.tar.gz rockbox-e031db4b87609ab11e62f44166058df1ac790fb3.zip |
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
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/SOURCES | 4 | ||||
-rw-r--r-- | firmware/common/disk.c | 4 | ||||
-rw-r--r-- | firmware/drivers/audio/tlv320.c | 6 | ||||
-rw-r--r-- | firmware/export/config-creativezv.h | 166 | ||||
-rw-r--r-- | firmware/export/config-creativezvm.h | 16 | ||||
-rw-r--r-- | firmware/export/config-creativezvm60gb.h | 168 | ||||
-rw-r--r-- | firmware/export/config.h | 4 | ||||
-rw-r--r-- | firmware/export/tlv320.h | 2 | ||||
-rw-r--r-- | firmware/kernel.c | 4 | ||||
-rw-r--r-- | firmware/panic.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/ata-as-arm.S | 2 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c | 9 | ||||
-rwxr-xr-x | firmware/target/arm/tms320dm320/crt0.S | 2 | ||||
-rwxr-xr-x | firmware/target/arm/tms320dm320/debug-dm320.c | 10 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/spi-dm320.c | 4 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/spi-target.h | 2 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/system-dm320.c | 10 | ||||
-rw-r--r-- | firmware/usb.c | 2 |
18 files changed, 375 insertions, 42 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES index b577110109..0d7261632d 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -716,7 +716,7 @@ target/arm/tms320dm320/mrobe-500/usb-mr500.c | |||
716 | #endif /* SIMULATOR */ | 716 | #endif /* SIMULATOR */ |
717 | #endif /* MROBE_500 */ | 717 | #endif /* MROBE_500 */ |
718 | 718 | ||
719 | #ifdef CREATIVE_ZVM | 719 | #ifdef CREATIVE_ZVx |
720 | #ifndef SIMULATOR | 720 | #ifndef SIMULATOR |
721 | target/arm/ata-as-arm.S | 721 | target/arm/ata-as-arm.S |
722 | target/arm/lcd-as-memframe.S | 722 | target/arm/lcd-as-memframe.S |
@@ -731,7 +731,7 @@ target/arm/tms320dm320/creative-zvm/power-creativezvm.c | |||
731 | target/arm/tms320dm320/creative-zvm/powermgmt-creativezvm.c | 731 | target/arm/tms320dm320/creative-zvm/powermgmt-creativezvm.c |
732 | target/arm/tms320dm320/creative-zvm/usb-creativezvm.c | 732 | target/arm/tms320dm320/creative-zvm/usb-creativezvm.c |
733 | #endif /* SIMULATOR */ | 733 | #endif /* SIMULATOR */ |
734 | #endif /* CREATIVE_ZVM */ | 734 | #endif /* CREATIVE_ZVx */ |
735 | 735 | ||
736 | #ifdef MROBE_100 | 736 | #ifdef MROBE_100 |
737 | #ifndef SIMULATOR | 737 | #ifndef SIMULATOR |
diff --git a/firmware/common/disk.c b/firmware/common/disk.c index 653f17e946..27b79755e7 100644 --- a/firmware/common/disk.c +++ b/firmware/common/disk.c | |||
@@ -68,7 +68,7 @@ struct partinfo* disk_init(IF_MV_NONVOID(int drive)) | |||
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | ata_read_sectors(IF_MV2(drive,) 0,1, §or); | 70 | ata_read_sectors(IF_MV2(drive,) 0,1, §or); |
71 | #ifndef CREATIVE_ZVM | 71 | #ifndef CREATIVE_ZVx |
72 | /* check that the boot sector is initialized */ | 72 | /* check that the boot sector is initialized */ |
73 | if ( (sector[510] != 0x55) || | 73 | if ( (sector[510] != 0x55) || |
74 | (sector[511] != 0xaa)) { | 74 | (sector[511] != 0xaa)) { |
@@ -187,7 +187,7 @@ int disk_mount(int drive) | |||
187 | { | 187 | { |
188 | return 0; | 188 | return 0; |
189 | } | 189 | } |
190 | #if defined(TOSHIBA_GIGABEAT_S) ||defined(CREATIVE_ZVM) | 190 | #if defined(TOSHIBA_GIGABEAT_S) || defined(CREATIVE_ZVx) |
191 | int i = 1; /* For the Gigabeat S, we mount the second partition */ | 191 | int i = 1; /* For the Gigabeat S, we mount the second partition */ |
192 | #else | 192 | #else |
193 | int i = 0; | 193 | int i = 0; |
diff --git a/firmware/drivers/audio/tlv320.c b/firmware/drivers/audio/tlv320.c index de837040ff..8839078c82 100644 --- a/firmware/drivers/audio/tlv320.c +++ b/firmware/drivers/audio/tlv320.c | |||
@@ -59,7 +59,7 @@ int tenthdb2master(int db) | |||
59 | } | 59 | } |
60 | 60 | ||
61 | /* local functions and definations */ | 61 | /* local functions and definations */ |
62 | #ifndef CREATIVE_ZVM | 62 | #ifndef CREATIVE_ZVx |
63 | #define TLV320_ADDR 0x34 | 63 | #define TLV320_ADDR 0x34 |
64 | #else | 64 | #else |
65 | #define TLV320_ADDR 0x1A | 65 | #define TLV320_ADDR 0x1A |
@@ -118,10 +118,10 @@ void audiohw_init(void) | |||
118 | audiohw_mute(true); | 118 | audiohw_mute(true); |
119 | tlv320_write_reg(REG_AAP, AAP_DAC | AAP_MICM); | 119 | tlv320_write_reg(REG_AAP, AAP_DAC | AAP_MICM); |
120 | tlv320_write_reg(REG_DAP, 0x00); /* No deemphasis */ | 120 | tlv320_write_reg(REG_DAP, 0x00); /* No deemphasis */ |
121 | #ifndef CREATIVE_ZVM | 121 | #ifndef CREATIVE_ZVx |
122 | tlv320_write_reg(REG_DAIF, DAIF_IWL_16 | DAIF_FOR_I2S); | 122 | tlv320_write_reg(REG_DAIF, DAIF_IWL_16 | DAIF_FOR_I2S); |
123 | #else | 123 | #else |
124 | tlv320_write_reg(REG_DAIF, DAIF_IWL_16 | DAIF_FOR_DSP); | 124 | tlv320_write_reg(REG_DAIF, DAIF_IWL_32 | DAIF_FOR_DSP); |
125 | #endif | 125 | #endif |
126 | tlv320_write_reg(REG_DIA, DIA_ACT); | 126 | tlv320_write_reg(REG_DIA, DIA_ACT); |
127 | audiohw_set_frequency(-1); /* default */ | 127 | audiohw_set_frequency(-1); /* default */ |
diff --git a/firmware/export/config-creativezv.h b/firmware/export/config-creativezv.h new file mode 100644 index 0000000000..af9bedf307 --- /dev/null +++ b/firmware/export/config-creativezv.h | |||
@@ -0,0 +1,166 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Maurus Cuelenaere | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | /* | ||
21 | * This config file is for the Creative Zen Vision | ||
22 | */ | ||
23 | #define TARGET_TREE /* this target is using the target tree system */ | ||
24 | |||
25 | #define CONFIG_SDRAM_START 0x00900000 | ||
26 | |||
27 | #define CREATIVE_ZV 1 | ||
28 | |||
29 | /* This makes it part of the Creative Zen Vision family :) */ | ||
30 | #define CREATIVE_ZVx 1 | ||
31 | |||
32 | /* For Rolo and boot loader */ | ||
33 | #define MODEL_NUMBER 28 | ||
34 | |||
35 | /* define this if you use an ATA controller */ | ||
36 | #define HAVE_ATA | ||
37 | |||
38 | /* define this if you have a bitmap LCD display */ | ||
39 | #define HAVE_LCD_BITMAP | ||
40 | |||
41 | /* define this if you have a colour LCD */ | ||
42 | #define HAVE_LCD_COLOR | ||
43 | |||
44 | /* define this if you have access to the quickscreen */ | ||
45 | #define HAVE_QUICKSCREEN | ||
46 | |||
47 | /* define this if you have access to the pitchscreen */ | ||
48 | #define HAVE_PITCHSCREEN | ||
49 | |||
50 | /* define this if you would like tagcache to build on this target */ | ||
51 | #define HAVE_TAGCACHE | ||
52 | |||
53 | /* define this if the target has volume keys which can be used in the lists */ | ||
54 | //#define HAVE_VOLUME_IN_LIST | ||
55 | |||
56 | /* LCD dimensions */ | ||
57 | #define CONFIG_LCD LCD_CREATIVEZVM | ||
58 | |||
59 | /* choose the lcd orientation. both work */ | ||
60 | #define CONFIG_ORIENTATION SCREEN_PORTRAIT | ||
61 | |||
62 | #define LCD_WIDTH 640 | ||
63 | #define LCD_HEIGHT 480 | ||
64 | |||
65 | #define LCD_DEPTH 16 /* 65k colours */ | ||
66 | #define LCD_PIXELFORMAT RGB565 /* rgb565 */ | ||
67 | |||
68 | /* Define this if your LCD can be enabled/disabled */ | ||
69 | #define HAVE_LCD_ENABLE | ||
70 | |||
71 | #define CONFIG_KEYPAD CREATIVEZVM_PAD | ||
72 | #define HAS_BUTTON_HOLD | ||
73 | #define HAVE_HEADPHONE_DETECTION | ||
74 | //#define HAVE_TOUCHPAD | ||
75 | |||
76 | #define CONFIG_I2C I2C_DM320 | ||
77 | |||
78 | /* Define this if you do software codec */ | ||
79 | #define CONFIG_CODEC SWCODEC | ||
80 | |||
81 | /* define this if you have a real-time clock */ | ||
82 | //#define CONFIG_RTC RTC_RX5X348AB | ||
83 | |||
84 | /* Define this for LCD backlight available */ | ||
85 | //#define HAVE_BACKLIGHT | ||
86 | |||
87 | //#define HAVE_BACKLIGHT_BRIGHTNESS | ||
88 | |||
89 | /* Main LCD backlight brightness range and defaults */ | ||
90 | //#define MIN_BRIGHTNESS_SETTING 0 | ||
91 | //#define MAX_BRIGHTNESS_SETTING 127 | ||
92 | //#define DEFAULT_BRIGHTNESS_SETTING 85 /* OF "full brightness" */ | ||
93 | //#define DEFAULT_DIMNESS_SETTING 22 /* OF "most dim" */ | ||
94 | |||
95 | /* Define this if you have a software controlled poweroff */ | ||
96 | //#define HAVE_SW_POWEROFF | ||
97 | //TODO: enable this back | ||
98 | |||
99 | /* The number of bytes reserved for loadable codecs */ | ||
100 | #define CODEC_SIZE 0x80000 | ||
101 | |||
102 | /* The number of bytes reserved for loadable plugins */ | ||
103 | #define PLUGIN_BUFFER_SIZE 0x100000 | ||
104 | |||
105 | /* Define this if you have the TLV320 audio codec -> controlled by the DSP */ | ||
106 | #define HAVE_TLV320 | ||
107 | |||
108 | #define CONFIG_I2C I2C_DM320 | ||
109 | |||
110 | /* TLV320 has no tone controls, so we use the software ones */ | ||
111 | #define HAVE_SW_TONE_CONTROLS | ||
112 | |||
113 | /*#define HW_SAMPR_CAPS (SAMPR_CAP_88 | SAMPR_CAP_44 | SAMPR_CAP_22 | \ | ||
114 | SAMPR_CAP_11)*/ | ||
115 | |||
116 | #define BATTERY_CAPACITY_DEFAULT 1250 /* default battery capacity */ | ||
117 | #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ | ||
118 | #define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ | ||
119 | #define BATTERY_CAPACITY_INC 100 /* capacity increment */ | ||
120 | #define BATTERY_TYPES_COUNT 1 /* only one type */ | ||
121 | |||
122 | /* Hardware controlled charging with monitoring */ | ||
123 | //#define CONFIG_CHARGING CHARGING_MONITOR | ||
124 | |||
125 | #ifndef SIMULATOR | ||
126 | |||
127 | /* Define this if you have a TI TMS320DM320 */ | ||
128 | #define CONFIG_CPU DM320 | ||
129 | |||
130 | /* define this if the hardware can be powered off while charging */ | ||
131 | #define HAVE_POWEROFF_WHILE_CHARGING | ||
132 | |||
133 | /* The size of the flash ROM */ | ||
134 | #define FLASH_SIZE 0x400000 | ||
135 | |||
136 | /* Define this to the CPU frequency */ | ||
137 | #define CPU_FREQ 16934400 | ||
138 | |||
139 | /* Define this if you have ATA power-off control */ | ||
140 | #define HAVE_ATA_POWER_OFF | ||
141 | |||
142 | /* Virtual LED (icon) */ | ||
143 | #define CONFIG_LED LED_VIRTUAL | ||
144 | |||
145 | /* define this if the backlight can be set to a brightness */ | ||
146 | //#define __BACKLIGHT_INIT | ||
147 | |||
148 | /* Offset ( in the firmware file's header ) to the file CRC */ | ||
149 | #define FIRMWARE_OFFSET_FILE_CRC 0 | ||
150 | |||
151 | /* Offset ( in the firmware file's header ) to the real data */ | ||
152 | #define FIRMWARE_OFFSET_FILE_DATA 8 | ||
153 | |||
154 | /* Define this if you have adjustable CPU frequency */ | ||
155 | /* #define HAVE_ADJUSTABLE_CPU_FREQ */ | ||
156 | |||
157 | #define BOOTFILE_EXT "zv" | ||
158 | #define BOOTFILE "rockbox." BOOTFILE_EXT | ||
159 | #define BOOTDIR "/.rockbox" | ||
160 | |||
161 | #define CONFIG_USBOTG USBOTG_ISP1583 | ||
162 | #define HAVE_USBSTACK | ||
163 | #define USB_VENDOR_ID 0x041e | ||
164 | #define USB_PRODUCT_ID 0x4133 | ||
165 | |||
166 | #endif /* SIMULATOR */ | ||
diff --git a/firmware/export/config-creativezvm.h b/firmware/export/config-creativezvm.h index 33a5105df7..ec5e1138e4 100644 --- a/firmware/export/config-creativezvm.h +++ b/firmware/export/config-creativezvm.h | |||
@@ -26,6 +26,9 @@ | |||
26 | 26 | ||
27 | #define CREATIVE_ZVM 1 | 27 | #define CREATIVE_ZVM 1 |
28 | 28 | ||
29 | /* This makes it part of the Creative Zen Vision family :) */ | ||
30 | #define CREATIVE_ZVx 1 | ||
31 | |||
29 | /* For Rolo and boot loader */ | 32 | /* For Rolo and boot loader */ |
30 | #define MODEL_NUMBER 26 | 33 | #define MODEL_NUMBER 26 |
31 | 34 | ||
@@ -56,13 +59,8 @@ | |||
56 | /* choose the lcd orientation. both work */ | 59 | /* choose the lcd orientation. both work */ |
57 | #define CONFIG_ORIENTATION SCREEN_PORTRAIT | 60 | #define CONFIG_ORIENTATION SCREEN_PORTRAIT |
58 | 61 | ||
59 | #ifdef ZEN_VISION | ||
60 | #define LCD_WIDTH 640 | ||
61 | #define LCD_HEIGHT 480 | ||
62 | #else | ||
63 | #define LCD_WIDTH 320 | 62 | #define LCD_WIDTH 320 |
64 | #define LCD_HEIGHT 240 | 63 | #define LCD_HEIGHT 240 |
65 | #endif | ||
66 | 64 | ||
67 | #define LCD_DEPTH 16 /* 65k colours */ | 65 | #define LCD_DEPTH 16 /* 65k colours */ |
68 | #define LCD_PIXELFORMAT RGB565 /* rgb565 */ | 66 | #define LCD_PIXELFORMAT RGB565 /* rgb565 */ |
@@ -156,13 +154,7 @@ | |||
156 | /* Define this if you have adjustable CPU frequency */ | 154 | /* Define this if you have adjustable CPU frequency */ |
157 | /* #define HAVE_ADJUSTABLE_CPU_FREQ */ | 155 | /* #define HAVE_ADJUSTABLE_CPU_FREQ */ |
158 | 156 | ||
159 | #ifdef ZEN_VISION | 157 | #define BOOTFILE_EXT "zvm" |
160 | #define BOOTFILE_EXT "zv" | ||
161 | #elseif defined(ZVM_60GB) | ||
162 | #define BOOTFILE_EXT "zvm60" | ||
163 | #else | ||
164 | #define BOOTFILE_EXT "zvm" | ||
165 | #endif | ||
166 | #define BOOTFILE "rockbox." BOOTFILE_EXT | 158 | #define BOOTFILE "rockbox." BOOTFILE_EXT |
167 | #define BOOTDIR "/.rockbox" | 159 | #define BOOTDIR "/.rockbox" |
168 | 160 | ||
diff --git a/firmware/export/config-creativezvm60gb.h b/firmware/export/config-creativezvm60gb.h new file mode 100644 index 0000000000..f8a71254fe --- /dev/null +++ b/firmware/export/config-creativezvm60gb.h | |||
@@ -0,0 +1,168 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Maurus Cuelenaere | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | /* | ||
21 | * This config file is for the Creative Zen Vision:M 60GB | ||
22 | */ | ||
23 | #define TARGET_TREE /* this target is using the target tree system */ | ||
24 | |||
25 | #define CONFIG_SDRAM_START 0x00900000 | ||
26 | |||
27 | #define CREATIVE_ZVM60GB 1 | ||
28 | |||
29 | /* This makes it part of the Creative Zen Vision family :) */ | ||
30 | #define CREATIVE_ZVx 1 | ||
31 | |||
32 | /* For Rolo and boot loader */ | ||
33 | #define MODEL_NUMBER 27 | ||
34 | |||
35 | /* define this if you use an ATA controller */ | ||
36 | #define HAVE_ATA | ||
37 | |||
38 | /* define this if you have a bitmap LCD display */ | ||
39 | #define HAVE_LCD_BITMAP | ||
40 | |||
41 | /* define this if you have a colour LCD */ | ||
42 | #define HAVE_LCD_COLOR | ||
43 | |||
44 | /* define this if you have access to the quickscreen */ | ||
45 | #define HAVE_QUICKSCREEN | ||
46 | |||
47 | /* define this if you have access to the pitchscreen */ | ||
48 | #define HAVE_PITCHSCREEN | ||
49 | |||
50 | /* define this if you would like tagcache to build on this target */ | ||
51 | #define HAVE_TAGCACHE | ||
52 | |||
53 | /* define this if the target has volume keys which can be used in the lists */ | ||
54 | //#define HAVE_VOLUME_IN_LIST | ||
55 | |||
56 | /* LCD dimensions */ | ||
57 | #define CONFIG_LCD LCD_CREATIVEZVM | ||
58 | |||
59 | /* choose the lcd orientation. both work */ | ||
60 | #define CONFIG_ORIENTATION SCREEN_PORTRAIT | ||
61 | |||
62 | #define LCD_WIDTH 320 | ||
63 | #define LCD_HEIGHT 240 | ||
64 | |||
65 | #define LCD_DEPTH 16 /* 65k colours */ | ||
66 | #define LCD_PIXELFORMAT RGB565 /* rgb565 */ | ||
67 | |||
68 | /* Define this if your LCD can be enabled/disabled */ | ||
69 | #define HAVE_LCD_ENABLE | ||
70 | |||
71 | #define CONFIG_KEYPAD CREATIVEZVM_PAD | ||
72 | #define HAS_BUTTON_HOLD | ||
73 | #define HAVE_HEADPHONE_DETECTION | ||
74 | //#define HAVE_TOUCHPAD | ||
75 | |||
76 | #define CONFIG_I2C I2C_DM320 | ||
77 | |||
78 | /* Define this if you do software codec */ | ||
79 | #define CONFIG_CODEC SWCODEC | ||
80 | |||
81 | /* define this if you have a real-time clock */ | ||
82 | //#define CONFIG_RTC RTC_RX5X348AB | ||
83 | |||
84 | /* Define this for LCD backlight available */ | ||
85 | //#define HAVE_BACKLIGHT | ||
86 | |||
87 | //#define HAVE_BACKLIGHT_BRIGHTNESS | ||
88 | |||
89 | /* Main LCD backlight brightness range and defaults */ | ||
90 | //#define MIN_BRIGHTNESS_SETTING 0 | ||
91 | //#define MAX_BRIGHTNESS_SETTING 127 | ||
92 | //#define DEFAULT_BRIGHTNESS_SETTING 85 /* OF "full brightness" */ | ||
93 | //#define DEFAULT_DIMNESS_SETTING 22 /* OF "most dim" */ | ||
94 | |||
95 | /* Define this if you have a software controlled poweroff */ | ||
96 | //#define HAVE_SW_POWEROFF | ||
97 | //TODO: enable this back | ||
98 | |||
99 | /* The number of bytes reserved for loadable codecs */ | ||
100 | #define CODEC_SIZE 0x80000 | ||
101 | |||
102 | /* The number of bytes reserved for loadable plugins */ | ||
103 | #define PLUGIN_BUFFER_SIZE 0x100000 | ||
104 | |||
105 | /* Define this if you have the TLV320 audio codec -> controlled by the DSP */ | ||
106 | #define HAVE_TLV320 | ||
107 | |||
108 | #define CONFIG_I2C I2C_DM320 | ||
109 | |||
110 | /* TLV320 has no tone controls, so we use the software ones */ | ||
111 | #define HAVE_SW_TONE_CONTROLS | ||
112 | |||
113 | /*#define HW_SAMPR_CAPS (SAMPR_CAP_88 | SAMPR_CAP_44 | SAMPR_CAP_22 | \ | ||
114 | SAMPR_CAP_11)*/ | ||
115 | |||
116 | #define BATTERY_CAPACITY_DEFAULT 1250 /* default battery capacity */ | ||
117 | #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ | ||
118 | #define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ | ||
119 | #define BATTERY_CAPACITY_INC 100 /* capacity increment */ | ||
120 | #define BATTERY_TYPES_COUNT 1 /* only one type */ | ||
121 | |||
122 | /* Hardware controlled charging with monitoring */ | ||
123 | //#define CONFIG_CHARGING CHARGING_MONITOR | ||
124 | |||
125 | #ifndef SIMULATOR | ||
126 | |||
127 | /* Define this if you have a TI TMS320DM320 */ | ||
128 | #define CONFIG_CPU DM320 | ||
129 | |||
130 | /* define this if the hardware can be powered off while charging */ | ||
131 | #define HAVE_POWEROFF_WHILE_CHARGING | ||
132 | |||
133 | /* The size of the flash ROM */ | ||
134 | #define FLASH_SIZE 0x400000 | ||
135 | |||
136 | /* Define this to the CPU frequency */ | ||
137 | #define CPU_FREQ 16934400 | ||
138 | |||
139 | /* Define this if you have ATA power-off control */ | ||
140 | #define HAVE_ATA_POWER_OFF | ||
141 | |||
142 | /* Virtual LED (icon) */ | ||
143 | #define CONFIG_LED LED_VIRTUAL | ||
144 | |||
145 | /* define this if the backlight can be set to a brightness */ | ||
146 | //#define __BACKLIGHT_INIT | ||
147 | |||
148 | /* Offset ( in the firmware file's header ) to the file CRC */ | ||
149 | #define FIRMWARE_OFFSET_FILE_CRC 0 | ||
150 | |||
151 | /* Offset ( in the firmware file's header ) to the real data */ | ||
152 | #define FIRMWARE_OFFSET_FILE_DATA 8 | ||
153 | |||
154 | /* Define this if you have adjustable CPU frequency */ | ||
155 | /* #define HAVE_ADJUSTABLE_CPU_FREQ */ | ||
156 | |||
157 | #define BOOTFILE_EXT "zvm60" | ||
158 | #define BOOTFILE "rockbox." BOOTFILE_EXT | ||
159 | #define BOOTDIR "/.rockbox" | ||
160 | |||
161 | #if 0 | ||
162 | #define CONFIG_USBOTG USBOTG_ISP1761 | ||
163 | #define HAVE_USBSTACK | ||
164 | #define USB_VENDOR_ID 0x041e | ||
165 | #define USB_PRODUCT_ID 0x4133 | ||
166 | #endif | ||
167 | |||
168 | #endif /* SIMULATOR */ | ||
diff --git a/firmware/export/config.h b/firmware/export/config.h index e6b84f9aaa..595b731e0f 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -253,6 +253,10 @@ | |||
253 | #include "config-cowond2.h" | 253 | #include "config-cowond2.h" |
254 | #elif defined(CREATIVE_ZVM) | 254 | #elif defined(CREATIVE_ZVM) |
255 | #include "config-creativezvm.h" | 255 | #include "config-creativezvm.h" |
256 | #elif defined(CREATIVE_ZVM60GB) | ||
257 | #include "config-creativezvm60gb.h" | ||
258 | #elif defined(CREATIVE_ZV) | ||
259 | #include "config-creativezv.h" | ||
256 | #else | 260 | #else |
257 | /* no known platform */ | 261 | /* no known platform */ |
258 | #endif | 262 | #endif |
diff --git a/firmware/export/tlv320.h b/firmware/export/tlv320.h index 6d9f858321..3aed99285a 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); | |||
111 | 111 | ||
112 | /* REG_SRC: Sample Rate Control */ | 112 | /* REG_SRC: Sample Rate Control */ |
113 | #define REG_SRC 0x8 | 113 | #define REG_SRC 0x8 |
114 | #define SRC_CLKIN (1 << 6) /* Clock input divider */ | 114 | #define SRC_CLKIN (1 << 6) /* Clock input divider */ |
115 | #define SRC_CLKOUT (1 << 7) /* Clock output divider */ | 115 | #define SRC_CLKOUT (1 << 7) /* Clock output divider */ |
116 | /*#define SRC_SR ()*/ | 116 | /*#define SRC_SR ()*/ |
117 | #define SRC_BOSR (1 << 1) /* Base oversampling rate, depends on SRC_USB */ | 117 | #define SRC_BOSR (1 << 1) /* Base oversampling rate, depends on SRC_USB */ |
diff --git a/firmware/kernel.c b/firmware/kernel.c index 0dec8705ae..728b5ce660 100644 --- a/firmware/kernel.c +++ b/firmware/kernel.c | |||
@@ -435,8 +435,8 @@ void sleep(int ticks) | |||
435 | unsigned stop = USEC_TIMER + ticks * (1000000/HZ); | 435 | unsigned stop = USEC_TIMER + ticks * (1000000/HZ); |
436 | while (TIME_BEFORE(USEC_TIMER, stop)) | 436 | while (TIME_BEFORE(USEC_TIMER, stop)) |
437 | switch_thread(); | 437 | switch_thread(); |
438 | #elif defined(CREATIVE_ZVM) && defined(BOOTLOADER) | 438 | #elif defined(CREATIVE_ZVx) && defined(BOOTLOADER) |
439 | // hacky.. | 439 | /* hacky.. */ |
440 | long sleep_ticks = current_tick + ticks + 1; | 440 | long sleep_ticks = current_tick + ticks + 1; |
441 | while (sleep_ticks > current_tick) | 441 | while (sleep_ticks > current_tick) |
442 | switch_thread(); | 442 | switch_thread(); |
diff --git a/firmware/panic.c b/firmware/panic.c index 781345e714..5f6ae936c7 100644 --- a/firmware/panic.c +++ b/firmware/panic.c | |||
@@ -123,7 +123,7 @@ void panicf( const char *fmt, ...) | |||
123 | #elif CONFIG_KEYPAD == ONDIO_PAD | 123 | #elif CONFIG_KEYPAD == ONDIO_PAD |
124 | if (!(PCDR & 0x0008)) | 124 | if (!(PCDR & 0x0008)) |
125 | #endif /* CONFIG_KEYPAD */ | 125 | #endif /* CONFIG_KEYPAD */ |
126 | #elif defined(CREATIVE_ZVM) | 126 | #elif defined(CREATIVE_ZVx) |
127 | if(false) | 127 | if(false) |
128 | #endif /* CPU */ | 128 | #endif /* CPU */ |
129 | system_reboot(); | 129 | system_reboot(); |
diff --git a/firmware/target/arm/ata-as-arm.S b/firmware/target/arm/ata-as-arm.S index 5de6ddb5c9..275b905e63 100644 --- a/firmware/target/arm/ata-as-arm.S +++ b/firmware/target/arm/ata-as-arm.S | |||
@@ -33,7 +33,7 @@ | |||
33 | /* Untested */ | 33 | /* Untested */ |
34 | .text | 34 | .text |
35 | .equ .ata_port, 0x18000000 | 35 | .equ .ata_port, 0x18000000 |
36 | #elif defined(CREATIVE_ZVM) | 36 | #elif defined(CREATIVE_ZVx) /* Zen Vision could have an other address */ |
37 | .text | 37 | .text |
38 | .equ .ata_port, 0x50FEE000 | 38 | .equ .ata_port, 0x50FEE000 |
39 | #endif | 39 | #endif |
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 | ||
274 | void send_command_to_pic(unsigned char in, unsigned char* out, | 277 | void 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 |
38 | extern char r_buffer[5]; | 38 | extern char r_buffer[5]; |
39 | extern int r_button; | 39 | extern 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 | ||
44 | struct SPI_info spi_targets[] = | 44 | struct 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 | ||
26 | enum SPI_target { | 26 | enum 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); |
diff --git a/firmware/usb.c b/firmware/usb.c index 90991e25fd..d7a54d915f 100644 --- a/firmware/usb.c +++ b/firmware/usb.c | |||
@@ -48,7 +48,7 @@ | |||
48 | /* Conditions under which we want the entire driver */ | 48 | /* Conditions under which we want the entire driver */ |
49 | #if !defined(BOOTLOADER) || \ | 49 | #if !defined(BOOTLOADER) || \ |
50 | (defined(TOSHIBA_GIGABEAT_S) && defined(USE_ROCKBOX_USB) && defined(USB_STORAGE)) || \ | 50 | (defined(TOSHIBA_GIGABEAT_S) && defined(USE_ROCKBOX_USB) && defined(USB_STORAGE)) || \ |
51 | (defined(CREATIVE_ZVM) && defined(HAVE_USBSTACK)) | 51 | (defined(CREATIVE_ZVx) && defined(HAVE_USBSTACK)) |
52 | #define USB_FULL_INIT | 52 | #define USB_FULL_INIT |
53 | #endif | 53 | #endif |
54 | 54 | ||