summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/config-gmini120.h3
-rw-r--r--firmware/export/config-gminisp.h3
-rw-r--r--firmware/export/config-h100.h3
-rw-r--r--firmware/export/system.h14
4 files changed, 23 insertions, 0 deletions
diff --git a/firmware/export/config-gmini120.h b/firmware/export/config-gmini120.h
index 7b6af81a6b..473f1cfa7f 100644
--- a/firmware/export/config-gmini120.h
+++ b/firmware/export/config-gmini120.h
@@ -56,4 +56,7 @@
56 56
57#define HAVE_LED 57#define HAVE_LED
58 58
59/* Define this if you have adjustable CPU frequency */
60#define HAVE_ADJUSTABLE_CPU_FREQ
61
59#endif 62#endif
diff --git a/firmware/export/config-gminisp.h b/firmware/export/config-gminisp.h
index d85240bdd1..431cf2f3ef 100644
--- a/firmware/export/config-gminisp.h
+++ b/firmware/export/config-gminisp.h
@@ -50,4 +50,7 @@
50 50
51#define HAVE_LED 51#define HAVE_LED
52 52
53/* Define this if you have adjustable CPU frequency */
54#define HAVE_ADJUSTABLE_CPU_FREQ
55
53#endif 56#endif
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h
index 0083842770..9c7ba6c1d3 100644
--- a/firmware/export/config-h100.h
+++ b/firmware/export/config-h100.h
@@ -53,4 +53,7 @@
53/* Define this if you have a software controlled poweroff */ 53/* Define this if you have a software controlled poweroff */
54#define HAVE_SW_POWEROFF 54#define HAVE_SW_POWEROFF
55 55
56/* Define this if you have adjustable CPU frequency */
57#define HAVE_ADJUSTABLE_CPU_FREQ
58
56#endif 59#endif
diff --git a/firmware/export/system.h b/firmware/export/system.h
index f792a132e7..442072ba51 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -22,11 +22,18 @@
22 22
23#include "cpu.h" 23#include "cpu.h"
24#include "config.h" 24#include "config.h"
25#include "stdbool.h"
25 26
26extern void system_reboot (void); 27extern void system_reboot (void);
27extern void system_init(void); 28extern void system_init(void);
28 29
30extern long cpu_frequency;
31
32#ifdef HAVE_ADJUSTABLE_CPU_FREQ
33#define FREQ cpu_frequency
34#else
29#define FREQ CPU_FREQ 35#define FREQ CPU_FREQ
36#endif
30#define BAUDRATE 9600 37#define BAUDRATE 9600
31 38
32#ifndef NULL 39#ifndef NULL
@@ -188,6 +195,13 @@ static inline void invalidate_icache(void)
188 "movec.l %d0,%cacr"); 195 "movec.l %d0,%cacr");
189} 196}
190 197
198#define CPUFREQ_DEFAULT CPU_FREQ
199#define CPUFREQ_NORMAL 47980800
200#define CPUFREQ_MAX 95961600
201
202void set_cpu_frequency(long frequency);
203void cpu_boost(bool on_off);
204
191#elif CONFIG_CPU == TCC730 205#elif CONFIG_CPU == TCC730
192 206
193extern int smsc_version(void); 207extern int smsc_version(void);