summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorMark Arigo <markarigo@gmail.com>2008-05-21 03:55:17 +0000
committerMark Arigo <markarigo@gmail.com>2008-05-21 03:55:17 +0000
commitb4275d4941e464c851ae3f5fe33c80f56ea365e5 (patch)
tree6f82b4e9cc490bf759dc4e1c64b4416d3b2d4879 /bootloader
parent4c99f9a74964c4a44ca27a216f302bdc79b23121 (diff)
downloadrockbox-b4275d4941e464c851ae3f5fe33c80f56ea365e5.tar.gz
rockbox-b4275d4941e464c851ae3f5fe33c80f56ea365e5.tar.bz2
rockbox-b4275d4941e464c851ae3f5fe33c80f56ea365e5.zip
Philips GoGear SA9200 port. Working bootloader and normal builds, including sound. No touchpad now, buttons limited to using vol+/vol-/power for up/down/select. Rockbox USB is enabled since the OF is MTP only...read the warnings on the PortalPlayerUsb wiki page.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17591 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/SOURCES2
-rw-r--r--bootloader/common.c3
-rw-r--r--bootloader/main-pp.c25
3 files changed, 16 insertions, 14 deletions
diff --git a/bootloader/SOURCES b/bootloader/SOURCES
index 40b2f5dc2a..c38b8ade1f 100644
--- a/bootloader/SOURCES
+++ b/bootloader/SOURCES
@@ -9,7 +9,7 @@ gigabeat-s.c
../firmware/target/arm/imx31/gigabeat-s/mmu-imx31.c
#elif defined(IRIVER_H10) || defined(IRIVER_H10_5GB) || \
defined(SANSA_E200) || defined(SANSA_C200) || \
- defined(MROBE_100)
+ defined(MROBE_100) || defined(PHILIPS_SA9200)
#ifdef E200R_INSTALLER
main-e200r-installer.c
#else
diff --git a/bootloader/common.c b/bootloader/common.c
index e6b8f5a7d2..66a60c5f6c 100644
--- a/bootloader/common.c
+++ b/bootloader/common.c
@@ -31,7 +31,8 @@
/* TODO: Other bootloaders need to be adjusted to set this variable to true
on a button press - currently only the ipod, H10 and Sansa versions do. */
#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) \
- || defined(SANSA_E200) || defined(SANSA_C200) || defined(GIGABEAT_F)
+ || defined(SANSA_E200) || defined(SANSA_C200) || defined(GIGABEAT_F) \
+ || defined(PHILIPS_SA9200)
bool verbose = false;
#else
bool verbose = true;
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c
index 07222139e7..dee728d8ed 100644
--- a/bootloader/main-pp.c
+++ b/bootloader/main-pp.c
@@ -34,11 +34,11 @@
#include "crc32-mi4.h"
#include <string.h>
#include "power.h"
-#if defined(SANSA_E200)
+#if defined(SANSA_E200) || defined(PHILIPS_SA9200)
#include "i2c.h"
#include "backlight-target.h"
#endif
-#if defined(SANSA_E200) || defined(SANSA_C200)
+#if defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200)
#include "usb.h"
#include "usb_drv.h"
#endif
@@ -59,6 +59,8 @@ extern int show_logo(void);
#elif CONFIG_KEYPAD == MROBE100_PAD
#define BOOTLOADER_BOOT_OF BUTTON_POWER
+#elif CONFIG_KEYPAD == PHILIPS_SA9200_PAD
+#define BOOTLOADER_BOOT_OF BUTTON_VOL_UP
#endif
/* Maximum allowed firmware image size. 10MB is more than enough */
@@ -71,7 +73,7 @@ unsigned char *loadbuffer = (unsigned char *)DRAM_START;
char version[] = APPSVERSION;
/* Locations and sizes in hidden partition on Sansa */
-#if defined(SANSA_E200) || defined(SANSA_C200)
+#if defined(HAVE_ATA_SD)
#define PPMI_SECTOR_OFFSET 1024
#define PPMI_SECTORS 1
#define MI4_HEADER_SECTORS 1
@@ -351,7 +353,7 @@ int load_mi4(unsigned char* buf, char* firmware, unsigned int buffer_size)
return EOK;
}
-#if defined(SANSA_E200) || defined(SANSA_C200)
+#if defined(HAVE_ATA_SD)
/* Load mi4 firmware from a hidden disk partition */
int load_mi4_part(unsigned char* buf, struct partinfo* pinfo,
unsigned int buffer_size, bool disable_rebuild)
@@ -432,7 +434,7 @@ void* main(void)
int rc;
int num_partitions;
struct partinfo* pinfo;
-#if defined(SANSA_E200) || defined(SANSA_C200)
+#if defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200)
int usb_retry = 0;
bool usb = false;
#else
@@ -451,12 +453,11 @@ void* main(void)
show_logo();
button_init();
-#if defined(SANSA_E200)
+#if defined(SANSA_E200) || defined(PHILIPS_SA9200)
i2c_init();
_backlight_on();
#endif
-
if (button_hold())
{
verbose = true;
@@ -466,7 +467,7 @@ void* main(void)
sleep(HZ);
power_off();
}
-
+
btn = button_read_device();
/* Enable bootloader messages if any button is pressed */
@@ -475,7 +476,7 @@ void* main(void)
verbose = true;
}
-#if defined(SANSA_E200) || defined(SANSA_C200)
+#if defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200)
#if !defined(USE_ROCKBOX_USB)
usb_init();
while (usb_drv_powered() && usb_retry < 5 && !usb)
@@ -496,7 +497,7 @@ void* main(void)
printf(MODEL_NAME);
i=ata_init();
-#if !defined(SANSA_E200) && !defined(SANSA_C200)
+#if !defined(HAVE_ATA_SD)
if (i==0) {
identify_info=ata_get_identify();
/* Show model */
@@ -540,7 +541,7 @@ void* main(void)
*/
printf("Loading original firmware...");
-#if defined(SANSA_E200) || defined(SANSA_C200)
+#if defined(HAVE_ATA_SD)
/* First try a (hidden) firmware partition */
printf("Trying firmware partition");
pinfo = disk_partinfo(1);
@@ -617,7 +618,7 @@ void* main(void)
return (void*)loadbuffer;
}
-#if !defined(SANSA_E200) && !defined(SANSA_C200)
+#if !defined(SANSA_E200) && !defined(SANSA_C200) && !defined(PHILIPS_SA9200)
/* These functions are present in the firmware library, but we reimplement
them here because the originals do a lot more than we want */
void usb_acknowledge(void)