From 760fea9ac7b52aa83d88371fac7bf0027cf7fd43 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Sat, 4 Feb 2006 00:01:15 +0000 Subject: iAudio X5: various fixes to make the bootloader compile git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8560 a1c6a512-1295-4272-9138-f99709370657 --- firmware/boot.lds | 6 ++++++ firmware/crt0.S | 2 +- firmware/drivers/serial.c | 2 +- firmware/export/button.h | 3 +++ firmware/export/config-iaudiox5.h | 14 ++++++++++++-- firmware/pcm_playback.c | 3 +++ firmware/powermgmt.c | 4 ++-- firmware/sound.c | 2 +- firmware/usb.c | 2 ++ 9 files changed, 31 insertions(+), 7 deletions(-) diff --git a/firmware/boot.lds b/firmware/boot.lds index 9f7e57cac4..1c300e5468 100644 --- a/firmware/boot.lds +++ b/firmware/boot.lds @@ -26,6 +26,12 @@ INPUT(crt0.o) #define IRAMSIZE 0x18000 #define FLASHORIG 0x003f0000 #define FLASHSIZE 4M +#elif defined(IAUDIO_X5) +#define DRAMORIG 0x31000000 +#define IRAMORIG 0x10000000 +#define IRAMSIZE 0x20000 +#define FLASHORIG 0x00100000 +#define FLASHSIZE 4M #elif CONFIG_CPU == PP5020 #define DRAMORIG 0x10000000 #define IRAMORIG 0x40000000 diff --git a/firmware/crt0.S b/firmware/crt0.S index 985fba9246..b0e85875bb 100644 --- a/firmware/crt0.S +++ b/firmware/crt0.S @@ -452,7 +452,7 @@ irq_handler: pop r1, r0 ret_irq -#elif defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES) +#elif defined(CPU_COLDFIRE) move.w #0x2700,%sr move.l #vectors,%d0 diff --git a/firmware/drivers/serial.c b/firmware/drivers/serial.c index 27061c299b..b491b13abb 100644 --- a/firmware/drivers/serial.c +++ b/firmware/drivers/serial.c @@ -27,7 +27,7 @@ #include "lcd.h" #include "serial.h" -#if (CONFIG_CPU != MCF5249) && (CONFIG_CPU != TCC730) && (CONFIG_CPU != PP5020) && (CONFIG_CPU != PNX0101) +#if (CONFIG_CPU != MCF5249) && (CONFIG_CPU != TCC730) && (CONFIG_CPU != PP5020) && (CONFIG_CPU != PNX0101) && (CONFIG_CPU != MCF5250) /* FIX: this doesn't work on iRiver or Gmini or iPod yet */ /* iFP7xx has no remote */ diff --git a/firmware/export/button.h b/firmware/export/button.h index c251f11890..158cf41a84 100644 --- a/firmware/export/button.h +++ b/firmware/export/button.h @@ -182,6 +182,9 @@ bool button_hold(void); #define BUTTON_UP 0x0008 #define BUTTON_DOWN 0x0010 #define BUTTON_MENU 0x0020 +#define BUTTON_OFF 0x0040 /* DOES NOT EXIST!!! */ + +#define BUTTON_RC_REC (BUTTON_REMOTE | 0x00400000) #endif /* RECORDER/PLAYER/ONDIO/GMINI KEYPAD */ diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h index fd9a8874a7..246b00c963 100644 --- a/firmware/export/config-iaudiox5.h +++ b/firmware/export/config-iaudiox5.h @@ -2,6 +2,9 @@ * This config file is for iAudio X5 */ +/* For Rolo and boot loader */ +#define MODEL_NUMBER 1 + /* define this if you have recording possibility */ /*#define HAVE_RECORDING 1*/ @@ -59,12 +62,17 @@ /* define this if the hardware can be powered off while charging */ #define HAVE_POWEROFF_WHILE_CHARGING -/* The start address index for ROM builds */ -#define ROM_START 0x11010 +/* The size of the flash ROM */ +#define FLASH_SIZE 0x400000 /* Define this to the CPU frequency */ #define CPU_FREQ 11289600 +/* Type of mobile power */ +#define CONFIG_BATTERY BATT_LIPOL1300 + +#define BATTERY_SCALE_FACTOR 23437 /* FIX: this value is picked at random */ + /* Define this if you have ATA power-off control */ #define HAVE_ATA_POWER_OFF @@ -74,6 +82,8 @@ /* Offset ( in the firmware file's header ) to the real data */ #define FIRMWARE_OFFSET_FILE_DATA 8 +#define USB_X5STYLE + /* Define this if you have adjustable CPU frequency */ #define HAVE_ADJUSTABLE_CPU_FREQ diff --git a/firmware/pcm_playback.c b/firmware/pcm_playback.c index a9e1e1ff99..980f077b5e 100644 --- a/firmware/pcm_playback.c +++ b/firmware/pcm_playback.c @@ -530,6 +530,9 @@ void pcm_calculate_peaks(int *left, int *right) #elif defined(HAVE_WM8975) long samples = size / 4; short *addr = p; +#elif defined(HAVE_TLV320) + long samples = 4; /* TODO X5 */ + short *addr = NULL; #endif if (samples > PEAK_SAMPLES) diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 2a987e3cf0..b61aed7366 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -43,7 +43,7 @@ #endif #ifdef HAVE_UDA1380 #include "uda1380.h" -#elif HAVE_TLV320 +#elif defined(HAVE_TLV320) #include "tlv320.h" #endif #ifdef HAVE_LCD_BITMAP @@ -939,7 +939,7 @@ void shutdown_hw(void) mp3_shutdown(); #ifdef HAVE_UDA1380 uda1380_close(); -#elif HAVE_TLV320 +#elif defined(HAVE_TLV320) tlv320_close(); #endif backlight_off(); diff --git a/firmware/sound.c b/firmware/sound.c index 7c961afc97..cee8c06294 100644 --- a/firmware/sound.c +++ b/firmware/sound.c @@ -28,7 +28,7 @@ #include "uda1380.h" #elif defined(HAVE_WM8975) #include "wm8975.h" -#elif HAVE_TLV320 +#elif defined(HAVE_TLV320) #include "tlv320.h" #endif #include "dac.h" diff --git a/firmware/usb.c b/firmware/usb.c index 94175a4b68..80a8c98d8c 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -183,6 +183,8 @@ void usb_enable(bool on) #elif defined(USB_ISP1582) /* TODO: Implement USB_ISP1582 */ (void) on; +#elif defined(USB_X5STYLE) + /* TODO X5 */ #else #ifdef HAVE_LCD_BITMAP if(read_hw_mask() & USB_ACTIVE_HIGH) -- cgit v1.2.3