summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-08-05 20:19:10 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-08-05 20:19:10 +0000
commit954b73265404075ec4d379ddea14e626113a8677 (patch)
tree5c6ff0056ebd118aadb896856e7679a41c595cba /firmware/export
parent85ba65d2a3fa3d10799efadbe3a33f026bf354df (diff)
downloadrockbox-954b73265404075ec4d379ddea14e626113a8677.tar.gz
rockbox-954b73265404075ec4d379ddea14e626113a8677.zip
Initial support and use for EEPROM memory on H120 & H140 players when
Rockbox firmware has been flashed over original firmware (not yet possible to do). Dircache & tagcache serialization for fast bootup without the need to scan disk when Rockbox is in flash. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10464 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/config-h100.h6
-rw-r--r--firmware/export/config-h120.h10
-rw-r--r--firmware/export/eeprom_settings.h48
-rw-r--r--firmware/export/system.h8
4 files changed, 70 insertions, 2 deletions
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h
index 6d204c3d66..7310dfa42f 100644
--- a/firmware/export/config-h100.h
+++ b/firmware/export/config-h100.h
@@ -123,7 +123,10 @@
123#define BOOTFILE_EXT "iriver" 123#define BOOTFILE_EXT "iriver"
124#define BOOTFILE "rockbox." BOOTFILE_EXT 124#define BOOTFILE "rockbox." BOOTFILE_EXT
125 125
126#endif 126/* Define this if there is an EEPROM chip */
127#define HAVE_EEPROM
128
129#endif /* !SIMULATOR */
127 130
128/* Define this for S/PDIF input available */ 131/* Define this for S/PDIF input available */
129#define HAVE_SPDIF_IN 132#define HAVE_SPDIF_IN
@@ -134,3 +137,4 @@
134/* Define this if you can control the S/PDIF power */ 137/* Define this if you can control the S/PDIF power */
135#define HAVE_SPDIF_POWER 138#define HAVE_SPDIF_POWER
136#define SPDIF_POWER_INVERTED 139#define SPDIF_POWER_INVERTED
140
diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h
index 5635a92b51..ca618139e9 100644
--- a/firmware/export/config-h120.h
+++ b/firmware/export/config-h120.h
@@ -118,7 +118,14 @@
118#define BOOTFILE_EXT "iriver" 118#define BOOTFILE_EXT "iriver"
119#define BOOTFILE "rockbox." BOOTFILE_EXT 119#define BOOTFILE "rockbox." BOOTFILE_EXT
120 120
121#endif 121#define BOOTLOADER_ENTRYPOINT 0x001F0000
122#define FLASH_ENTRYPOINT 0x00001000
123#define FLASH_MAGIC 0xfbfbfbf1
124
125/* Define this if there is an EEPROM chip */
126#define HAVE_EEPROM
127
128#endif /* !SIMULATOR */
122 129
123/* Define this for S/PDIF input available */ 130/* Define this for S/PDIF input available */
124#define HAVE_SPDIF_IN 131#define HAVE_SPDIF_IN
@@ -128,3 +135,4 @@
128 135
129/* Define this if you can control the S/PDIF power */ 136/* Define this if you can control the S/PDIF power */
130#define HAVE_SPDIF_POWER 137#define HAVE_SPDIF_POWER
138
diff --git a/firmware/export/eeprom_settings.h b/firmware/export/eeprom_settings.h
new file mode 100644
index 0000000000..a3515bd69e
--- /dev/null
+++ b/firmware/export/eeprom_settings.h
@@ -0,0 +1,48 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 by Miika Pekkarinen
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#ifndef _EEPROM_SETTINGS_H_
21#define _EEPROM_SETTINGS_H_
22
23#include <stdbool.h>
24#include "inttypes.h"
25
26#define EEPROM_SETTINGS_VERSION 0x24c01001
27#define EEPROM_SETTINGS_BL_MINVER 7
28
29struct eeprom_settings
30{
31 long version; /* Settings version number */
32 bool initialized; /* Is eeprom_settings ready to be used */
33 bool disk_clean; /* Is disk intact from last reboot */
34 bool boot_disk; /* Load firmware from disk (default=FLASH) */
35 uint8_t bl_version; /* Installed bootloader version */
36
37 /* This must be the last entry */
38 uint32_t checksum; /* Checksum of this structure */
39};
40
41extern struct eeprom_settings firmware_settings;
42
43bool detect_flashed_rockbox(void);
44bool eeprom_settings_init(void);
45bool eeprom_settings_store(void);
46
47#endif
48
diff --git a/firmware/export/system.h b/firmware/export/system.h
index dae5d95794..1b326e1b8b 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -45,6 +45,14 @@ static inline void udelay(unsigned usecs)
45} 45}
46#endif 46#endif
47 47
48struct flash_header {
49 unsigned long magic;
50 unsigned long length;
51 char version[32];
52};
53
54bool detect_flashed_rockbox(void);
55
48#ifdef HAVE_ADJUSTABLE_CPU_FREQ 56#ifdef HAVE_ADJUSTABLE_CPU_FREQ
49#define FREQ cpu_frequency 57#define FREQ cpu_frequency
50void set_cpu_frequency(long frequency); 58void set_cpu_frequency(long frequency);