From 7c60c5e57519144942267d382d3658c070bc89e7 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Sat, 12 Mar 2011 00:09:43 +0100 Subject: [PATCH] carl9170 firmware: fix gcc-4.6 compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit include/timer.h:87:20: warning: inlining failed in call to \ ‘clock_set’: call is unlikely and code size would grow [-Winline] Signed-off-by: Christian Lamparter --- carlfw/include/timer.h | 14 +------------- carlfw/src/main.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/carlfw/include/timer.h b/carlfw/include/timer.h index 7f6c491..7e4cb4c 100644 --- a/carlfw/include/timer.h +++ b/carlfw/include/timer.h @@ -84,17 +84,5 @@ static inline __inline void udelay(const uint32_t usec) } } -static inline void clock_set(enum cpu_clock_t _clock, bool on) -{ - /* - * Word of Warning! - * This setting does more than just mess with the CPU Clock. - * So watch out, if you need _stable_ timer interrupts. - */ - - fw.ticks_per_msec = GET_VAL(AR9170_PWR_PLL_ADDAC_DIV, get(AR9170_PWR_REG_PLL_ADDAC)) >> 1; - - set(AR9170_PWR_REG_CLOCK_SEL, (uint32_t) ((on ? 0x70 : 0x600) | _clock)); -} - +void clock_set(enum cpu_clock_t _clock, bool on); #endif /* __CARL9170FW_TIMER_H */ diff --git a/carlfw/src/main.c b/carlfw/src/main.c index 0653ae4..475308b 100644 --- a/carlfw/src/main.c +++ b/carlfw/src/main.c @@ -45,6 +45,19 @@ static void timer_init(const unsigned int timer, const unsigned int interval) orl(AR9170_TIMER_REG_INTERRUPT, BIT(timer)); } +void clock_set(enum cpu_clock_t _clock, bool on) +{ + /* + * Word of Warning! + * This setting does more than just mess with the CPU Clock. + * So watch out, if you need _stable_ timer interrupts. + */ + + fw.ticks_per_msec = GET_VAL(AR9170_PWR_PLL_ADDAC_DIV, get(AR9170_PWR_REG_PLL_ADDAC)) >> 1; + + set(AR9170_PWR_REG_CLOCK_SEL, (uint32_t) ((on ? 0x70 : 0x600) | _clock)); +} + static void init(void) { led_init(); -- 2.31.1