summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/system-target.h
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2017-10-13 06:28:50 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2017-10-28 14:47:21 +0200
commitb2c470719a79f301ff4e9a6adcc5307ef47cfacf (patch)
tree0d7c2e631cd8921ab62b22781f7480dcac993061 /firmware/target/arm/imx233/system-target.h
parent428464774fd2918d40235b7a596698c27ee578a3 (diff)
downloadrockbox-b2c470719a79f301ff4e9a6adcc5307ef47cfacf.tar.gz
rockbox-b2c470719a79f301ff4e9a6adcc5307ef47cfacf.zip
imx233: Implement mutex for cpu_boost_lock/unlock
Playing AAC-HE files resulted in a race condition between audio/codec/buffering for set_cpu_frequency Change-Id: I35e1c1fd18db623e2990c305acdca03f57184d0d
Diffstat (limited to 'firmware/target/arm/imx233/system-target.h')
-rw-r--r--firmware/target/arm/imx233/system-target.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/system-target.h b/firmware/target/arm/imx233/system-target.h
index ee2df9a3e9..45dc58698a 100644
--- a/firmware/target/arm/imx233/system-target.h
+++ b/firmware/target/arm/imx233/system-target.h
@@ -54,6 +54,23 @@ bool imx233_us_elapsed(uint32_t ref, unsigned us_delay);
54void imx233_reset_block(volatile uint32_t *block_reg); 54void imx233_reset_block(volatile uint32_t *block_reg);
55void imx233_enable_usb_controller(bool enable); 55void imx233_enable_usb_controller(bool enable);
56void imx233_enable_usb_phy(bool enable); 56void imx233_enable_usb_phy(bool enable);
57
58#ifdef HAVE_ADJUSTABLE_CPU_FREQ
59#define CPU_BOOST_LOCK_DEFINED
60
61static inline bool cpu_boost_lock(void)
62{
63 bool set_cpu_frequency__lock(void);
64 return set_cpu_frequency__lock();
65}
66
67static inline void cpu_boost_unlock(void)
68{
69 void set_cpu_frequency__unlock(void);
70 set_cpu_frequency__unlock();
71}
72#endif /* HAVE_ADJUSTABLE_CPU_FREQ */
73
57// NOTE: this is available even if HAVE_ADJUSTABLE_CPU_FREQ is undef 74// NOTE: this is available even if HAVE_ADJUSTABLE_CPU_FREQ is undef
58void imx233_set_cpu_frequency(long frequency); 75void imx233_set_cpu_frequency(long frequency);
59 76