diff options
| author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-12-11 09:39:33 +0000 |
|---|---|---|
| committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-12-11 09:39:33 +0000 |
| commit | e4a233ed9b90a7e8e32c89ad83be247464c7caa0 (patch) | |
| tree | 71088e8d7b62215807f9787451bb5be0b8bf8b8d | |
| parent | 1190165d068bd1401b46ca286a2175984872ad0d (diff) | |
| download | rockbox-e4a233ed9b90a7e8e32c89ad83be247464c7caa0.zip rockbox-e4a233ed9b90a7e8e32c89ad83be247464c7caa0.tar.gz rockbox-e4a233ed9b90a7e8e32c89ad83be247464c7caa0.tar.bz2 rockbox-e4a233ed9b90a7e8e32c89ad83be247464c7caa0.tar.xz | |
Derive clock and timer defines from frequency of external source.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28791 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/export/s5l8700.h | 2 | ||||
| -rw-r--r-- | firmware/target/arm/s5l8700/system-target.h | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/firmware/export/s5l8700.h b/firmware/export/s5l8700.h index 9802109..47b3480 100644 --- a/firmware/export/s5l8700.h +++ b/firmware/export/s5l8700.h @@ -25,7 +25,7 @@ #define REG16_PTR_T volatile uint16_t * #define REG32_PTR_T volatile uint32_t * -#define TIMER_FREQ 47923200L +#define TIMER_FREQ (1843200 * 4 * 26 / 1 / 4) /* 47923200 Hz */ #define CACHEALIGN_BITS (4) /* 2^4 = 16 bytes */ diff --git a/firmware/target/arm/s5l8700/system-target.h b/firmware/target/arm/s5l8700/system-target.h index adc0eb6..170794a 100644 --- a/firmware/target/arm/s5l8700/system-target.h +++ b/firmware/target/arm/s5l8700/system-target.h @@ -25,18 +25,18 @@ #include "mmu-arm.h" #define CPUFREQ_SLEEP 32768 -#define CPUFREQ_DEFAULT 47923200 -#define CPUFREQ_NORMAL 47923200 -#define CPUFREQ_MAX 191692800 +#define CPUFREQ_MAX (1843200 * 4 * 26 / 1) /* 191692800 Hz */ +#define CPUFREQ_DEFAULT (CPUFREQ_MAX/4) /* 47923200 Hz */ +#define CPUFREQ_NORMAL (CPUFREQ_MAX/4) #define STORAGE_WANTS_ALIGN -#define inl(a) (*(volatile unsigned long *) (a)) +#define inl(a) (*(volatile unsigned long *) (a)) #define outl(a,b) (*(volatile unsigned long *) (b) = (a)) -#define inb(a) (*(volatile unsigned char *) (a)) +#define inb(a) (*(volatile unsigned char *) (a)) #define outb(a,b) (*(volatile unsigned char *) (b) = (a)) -#define inw(a) (*(volatile unsigned short *) (a)) -#define outw(a,b) (*(volatile unsigned short *) (b) = (a)) +#define inw(a) (*(volatile unsigned short*) (a)) +#define outw(a,b) (*(volatile unsigned short*) (b) = (a)) static inline void udelay(unsigned usecs) { |