Change if CONFIG_CPU==PP50XX to ifdef CPU_PP where appropriate
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11569 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
336cb6898e
commit
242cbd5cd7
10 changed files with 21 additions and 25 deletions
|
@ -385,8 +385,8 @@ bool dbg_flash_id(unsigned* p_manufacturer, unsigned* p_device,
|
|||
unsigned addr1, unsigned addr2)
|
||||
|
||||
{
|
||||
#if (CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020)
|
||||
/* TODO: Implement for iPod */
|
||||
#ifdef CPU_PP
|
||||
/* TODO: Implement for PortalPlayer */
|
||||
(void)p_manufacturer;
|
||||
(void)p_device;
|
||||
(void)addr1;
|
||||
|
|
|
@ -167,7 +167,7 @@ enum {
|
|||
#endif
|
||||
|
||||
/* As defined in plugin.lds */
|
||||
#if CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002
|
||||
#if defined(CPU_PP)
|
||||
#define CODEC_IRAM_ORIGIN 0x4000c000
|
||||
#define CODEC_IRAM_SIZE 0xc000
|
||||
#elif defined(IAUDIO_X5)
|
||||
|
|
|
@ -20,10 +20,6 @@ OUTPUT_FORMAT(elf32-sh)
|
|||
#define ARCH_IRIVER
|
||||
#endif
|
||||
|
||||
#if (CONFIG_CPU==PP5002) || (CONFIG_CPU==PP5020)
|
||||
#define ARCH_IPOD
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_IRIVER
|
||||
#define DRAMORIG 0x31000000
|
||||
#define IRAMORIG 0x1000c000
|
||||
|
@ -32,7 +28,7 @@ OUTPUT_FORMAT(elf32-sh)
|
|||
#define DRAMORIG 0x31000000
|
||||
#define IRAMORIG 0x10010000
|
||||
#define IRAMSIZE 0x10000
|
||||
#elif defined(ARCH_IPOD)
|
||||
#elif defined(CPU_PP)
|
||||
#define DRAMORIG 0x00000000
|
||||
#define IRAMORIG 0x4000c000
|
||||
#define IRAMSIZE 0xc000
|
||||
|
@ -77,7 +73,7 @@ SECTIONS
|
|||
.text :
|
||||
{
|
||||
*(.text*)
|
||||
#if (CONFIG_CPU==PP5020) || (CONFIG_CPU==PNX0101) || (CONFIG_CPU==PP5002)
|
||||
#if defined(CPU_PP) || (CONFIG_CPU==PNX0101)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
#endif
|
||||
|
|
|
@ -36,7 +36,7 @@ INPUT(target/sh/crt0.o)
|
|||
#define DRAMORIG 0x31000000 + STUBOFFSET
|
||||
#define IRAMORIG 0x10000000
|
||||
#define IRAMSIZE 0x10000
|
||||
#elif (CONFIG_CPU==PP5002) || (CONFIG_CPU==PP5020)
|
||||
#elif defined(CPU_PP)
|
||||
#define DRAMORIG 0x00000000 + STUBOFFSET
|
||||
#define IRAMORIG 0x40000000
|
||||
#define IRAMSIZE 0xc000
|
||||
|
|
|
@ -275,8 +275,7 @@
|
|||
#if !defined(SIMULATOR) && /* Not for simulators */ \
|
||||
(((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \
|
||||
defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \
|
||||
(CONFIG_CPU == PP5020) || /* iPod and H10: core, plugins, codecs */ \
|
||||
(CONFIG_CPU == PP5002) || /* iPod: core, plugins, codecs */ \
|
||||
defined(CPU_PP) || /* PortalPlayer: core, plugins, codecs */ \
|
||||
(CONFIG_CPU == PNX0101))
|
||||
#define ICODE_ATTR __attribute__ ((section(".icode")))
|
||||
#define ICONST_ATTR __attribute__ ((section(".irodata")))
|
||||
|
|
|
@ -70,7 +70,7 @@ struct mutex
|
|||
};
|
||||
|
||||
/* global tick variable */
|
||||
#if ((CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020)) && defined(BOOTLOADER)
|
||||
#if defined(CPU_PP) && defined(BOOTLOADER)
|
||||
/* We don't enable interrupts in the iPod bootloader, so we need to fake
|
||||
the current_tick variable */
|
||||
#define current_tick (signed)(USEC_TIMER/10000)
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#ifndef SIMULATOR
|
||||
|
||||
|
||||
#if CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002
|
||||
#if defined(CPU_PP)
|
||||
/* Portalplayer chips use a microsecond timer. */
|
||||
#define TIMER_FREQ 1000000
|
||||
#elif defined(CPU_COLDFIRE)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "system.h"
|
||||
#include "panic.h"
|
||||
|
||||
#if ((CONFIG_CPU != PP5020) && (CONFIG_CPU != PP5002)) || !defined(BOOTLOADER)
|
||||
#if !defined(CPU_PP) || !defined(BOOTLOADER)
|
||||
long current_tick = 0;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -32,8 +32,10 @@
|
|||
|
||||
#if !defined(IRIVER_IFP7XX_SERIES) && \
|
||||
(CONFIG_CPU != PP5002) && !defined(IRIVER_H10) && \
|
||||
!defined(IRIVER_H10_5GB) && (CONFIG_CPU != S3C2440)
|
||||
!defined(IRIVER_H10_5GB) && (CONFIG_CPU != S3C2440) && \
|
||||
!defined(SANSA_E200)
|
||||
/* FIX: this doesn't work on iFP, 3rd Gen ipods, or H10 yet */
|
||||
/* TODO: Test on the Sansa */
|
||||
|
||||
#define IRQ0_EDGE_TRIGGER 0x80
|
||||
|
||||
|
@ -111,7 +113,7 @@ int rolo_load(const char* filename)
|
|||
{
|
||||
int fd;
|
||||
long length;
|
||||
#if defined(CPU_COLDFIRE) || (CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020)
|
||||
#if defined(CPU_COLDFIRE) || defined(CPU_PP)
|
||||
int i;
|
||||
unsigned long checksum,file_checksum;
|
||||
#else
|
||||
|
@ -141,7 +143,7 @@ int rolo_load(const char* filename)
|
|||
|
||||
length = filesize(fd) - FIRMWARE_OFFSET_FILE_DATA;
|
||||
|
||||
#if defined(CPU_COLDFIRE) || (CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020)
|
||||
#if defined(CPU_COLDFIRE) || defined(CPU_PP)
|
||||
/* Read and save checksum */
|
||||
lseek(fd, FIRMWARE_OFFSET_FILE_CRC, SEEK_SET);
|
||||
if (read(fd, &file_checksum, 4) != 4) {
|
||||
|
|
|
@ -49,7 +49,7 @@ void TIMER1(void)
|
|||
pfn_timer();
|
||||
TER1 = 0xff; /* clear all events */
|
||||
}
|
||||
#elif CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002
|
||||
#elif defined(CPU_PP)
|
||||
void TIMER2(void)
|
||||
{
|
||||
TIMER2_VAL; /* ACK interrupt */
|
||||
|
@ -150,7 +150,7 @@ static bool timer_set(long cycles, bool start)
|
|||
if (start || (TCN1 >= TRR1))
|
||||
TCN1 = 0; /* reset the timer */
|
||||
TER1 = 0xff; /* clear all events */
|
||||
#elif CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002
|
||||
#elif defined(CPU_PP)
|
||||
if (cycles > 0x20000000 || cycles < 2)
|
||||
return false;
|
||||
|
||||
|
@ -200,9 +200,8 @@ bool timer_register(int reg_prio, void (*unregister_callback)(void),
|
|||
if (reg_prio <= timer_prio || cycles == 0)
|
||||
return false;
|
||||
|
||||
#if (CONFIG_CPU==PP5002) || (CONFIG_CPU==PP5020) || (CONFIG_CPU==PNX0101) \
|
||||
|| (CONFIG_CPU==S3C2440)
|
||||
/* TODO: Implement for iPod and iFP (if possible) */
|
||||
#if defined(CPU_PP) || (CONFIG_CPU==PNX0101) || (CONFIG_CPU==S3C2440)
|
||||
/* TODO: Implement for PortalPlayer and iFP (if possible) */
|
||||
(void)int_prio;
|
||||
#endif
|
||||
|
||||
|
@ -227,7 +226,7 @@ bool timer_register(int reg_prio, void (*unregister_callback)(void),
|
|||
ICR2 = 0x90; /* interrupt on level 4.0 */
|
||||
and_l(~(1<<10), &IMR);
|
||||
TMR1 |= 1; /* start timer */
|
||||
#elif CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002
|
||||
#elif defined(CPU_PP)
|
||||
/* unmask interrupt source */
|
||||
CPU_INT_EN = TIMER2_MASK;
|
||||
#endif
|
||||
|
@ -247,7 +246,7 @@ void timer_unregister(void)
|
|||
#elif defined CPU_COLDFIRE
|
||||
TMR1 = 0; /* disable timer 1 */
|
||||
or_l((1<<10), &IMR); /* disable interrupt */
|
||||
#elif CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002
|
||||
#elif defined(CPU_PP)
|
||||
TIMER2_CFG = 0; /* stop timer 2 */
|
||||
CPU_INT_CLR = TIMER2_MASK;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue