forked from len0rd/rockbox
Thanks to LinusN, fix Coldfire bootloaders not booting - FS#7533
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14949 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
15b7321fe1
commit
c90c18ea67
4 changed files with 18 additions and 8 deletions
|
|
@ -24,8 +24,6 @@
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "pcf50606.h"
|
#include "pcf50606.h"
|
||||||
|
|
||||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
|
||||||
|
|
||||||
/* Settings for all possible clock frequencies (with properly working timers)
|
/* Settings for all possible clock frequencies (with properly working timers)
|
||||||
*
|
*
|
||||||
* xxx_REFRESH_TIMER below
|
* xxx_REFRESH_TIMER below
|
||||||
|
|
@ -55,8 +53,13 @@
|
||||||
#define RECALC_DELAYS(f) \
|
#define RECALC_DELAYS(f) \
|
||||||
pcf50606_i2c_recalc_delay(f)
|
pcf50606_i2c_recalc_delay(f)
|
||||||
|
|
||||||
|
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
void set_cpu_frequency (long) __attribute__ ((section (".icode")));
|
void set_cpu_frequency (long) __attribute__ ((section (".icode")));
|
||||||
void set_cpu_frequency(long frequency)
|
void set_cpu_frequency(long frequency)
|
||||||
|
#else
|
||||||
|
void cf_set_cpu_frequency (long) __attribute__ ((section (".icode")));
|
||||||
|
void cf_set_cpu_frequency(long frequency)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
switch(frequency)
|
switch(frequency)
|
||||||
{
|
{
|
||||||
|
|
@ -115,5 +118,3 @@ void set_cpu_frequency(long frequency)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAVE_ADJUSTABLE_CPU_FREQ */
|
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,6 @@
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "pcf50606.h"
|
#include "pcf50606.h"
|
||||||
|
|
||||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
|
||||||
|
|
||||||
/* Settings for all possible clock frequencies (with properly working timers)
|
/* Settings for all possible clock frequencies (with properly working timers)
|
||||||
* NOTE: Some 5249 chips don't like having PLLDIV set to 0. We must avoid that!
|
* NOTE: Some 5249 chips don't like having PLLDIV set to 0. We must avoid that!
|
||||||
*
|
*
|
||||||
|
|
@ -73,8 +71,13 @@
|
||||||
#define BAUDRATE_DIV_MAX (CPUFREQ_MAX/(BAUD_RATE*32*2))
|
#define BAUDRATE_DIV_MAX (CPUFREQ_MAX/(BAUD_RATE*32*2))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
void set_cpu_frequency (long) __attribute__ ((section (".icode")));
|
void set_cpu_frequency (long) __attribute__ ((section (".icode")));
|
||||||
void set_cpu_frequency(long frequency)
|
void set_cpu_frequency(long frequency)
|
||||||
|
#else
|
||||||
|
void cf_set_cpu_frequency (long) __attribute__ ((section (".icode")));
|
||||||
|
void cf_set_cpu_frequency(long frequency)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
switch(frequency)
|
switch(frequency)
|
||||||
{
|
{
|
||||||
|
|
@ -157,5 +160,3 @@ void set_cpu_frequency(long frequency)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAVE_ADJUSTABLE_CPU_FREQ */
|
|
||||||
|
|
|
||||||
|
|
@ -252,6 +252,10 @@ void system_init(void)
|
||||||
SPURVEC = 24;
|
SPURVEC = 24;
|
||||||
|
|
||||||
MPARK = 0x81; /* PARK[1,0]=10 + BCR24BIT */
|
MPARK = 0x81; /* PARK[1,0]=10 + BCR24BIT */
|
||||||
|
|
||||||
|
#ifndef HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
|
cf_set_cpu_frequency(CPUFREQ_DEFAULT);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void system_reboot (void)
|
void system_reboot (void)
|
||||||
|
|
|
||||||
|
|
@ -165,6 +165,10 @@ void coldfire_set_pllcr_audio_bits(long bits);
|
||||||
/* Set DATAINCONTROL without disturbing FIFO reset state */
|
/* Set DATAINCONTROL without disturbing FIFO reset state */
|
||||||
void coldfire_set_dataincontrol(unsigned long value);
|
void coldfire_set_dataincontrol(unsigned long value);
|
||||||
|
|
||||||
|
#ifndef HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
|
extern void cf_set_cpu_frequency(long frequency);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* 11.2896 MHz */
|
/* 11.2896 MHz */
|
||||||
#define CPUFREQ_DEFAULT_MULT 1
|
#define CPUFREQ_DEFAULT_MULT 1
|
||||||
#define CPUFREQ_DEFAULT (CPUFREQ_DEFAULT_MULT * CPU_FREQ)
|
#define CPUFREQ_DEFAULT (CPUFREQ_DEFAULT_MULT * CPU_FREQ)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue