diff options
Diffstat (limited to 'firmware/target/mips')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/clk-x1000.h | 4 | ||||
-rw-r--r-- | firmware/target/mips/ingenic_x1000/sfc-x1000.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/mips/ingenic_x1000/clk-x1000.h b/firmware/target/mips/ingenic_x1000/clk-x1000.h index e19c56d0ba..f7153da564 100644 --- a/firmware/target/mips/ingenic_x1000/clk-x1000.h +++ b/firmware/target/mips/ingenic_x1000/clk-x1000.h | |||
@@ -80,13 +80,13 @@ extern void clk_set_ccr_div(uint32_t divbits); | |||
80 | extern void clk_set_ddr(x1000_clk_t src, uint32_t div); | 80 | extern void clk_set_ddr(x1000_clk_t src, uint32_t div); |
81 | 81 | ||
82 | /* Returns the smallest n such that infreq/n <= outfreq */ | 82 | /* Returns the smallest n such that infreq/n <= outfreq */ |
83 | inline uint32_t clk_calc_div(uint32_t infreq, uint32_t outfreq) | 83 | static inline uint32_t clk_calc_div(uint32_t infreq, uint32_t outfreq) |
84 | { | 84 | { |
85 | return (infreq + (outfreq - 1)) / outfreq; | 85 | return (infreq + (outfreq - 1)) / outfreq; |
86 | } | 86 | } |
87 | 87 | ||
88 | /* Returns the smallest n such that (infreq >> n) <= outfreq */ | 88 | /* Returns the smallest n such that (infreq >> n) <= outfreq */ |
89 | inline uint32_t clk_calc_shift(uint32_t infreq, uint32_t outfreq) | 89 | static inline uint32_t clk_calc_shift(uint32_t infreq, uint32_t outfreq) |
90 | { | 90 | { |
91 | uint32_t div = clk_calc_div(infreq, outfreq); | 91 | uint32_t div = clk_calc_div(infreq, outfreq); |
92 | return __builtin_clz(div) ^ 31; | 92 | return __builtin_clz(div) ^ 31; |
diff --git a/firmware/target/mips/ingenic_x1000/sfc-x1000.h b/firmware/target/mips/ingenic_x1000/sfc-x1000.h index d28bcb6740..afb4aa3ce6 100644 --- a/firmware/target/mips/ingenic_x1000/sfc-x1000.h +++ b/firmware/target/mips/ingenic_x1000/sfc-x1000.h | |||
@@ -87,13 +87,13 @@ extern void sfc_irq_end(void); | |||
87 | extern void sfc_set_clock(uint32_t freq); | 87 | extern void sfc_set_clock(uint32_t freq); |
88 | 88 | ||
89 | /* Set the device configuration register */ | 89 | /* Set the device configuration register */ |
90 | inline void sfc_set_dev_conf(uint32_t conf) | 90 | static inline void sfc_set_dev_conf(uint32_t conf) |
91 | { | 91 | { |
92 | REG_SFC_DEV_CONF = conf; | 92 | REG_SFC_DEV_CONF = conf; |
93 | } | 93 | } |
94 | 94 | ||
95 | /* Control the state of the write protect pin */ | 95 | /* Control the state of the write protect pin */ |
96 | inline void sfc_set_wp_enable(bool en) | 96 | static inline void sfc_set_wp_enable(bool en) |
97 | { | 97 | { |
98 | jz_writef(SFC_GLB, WP_EN(en ? 1 : 0)); | 98 | jz_writef(SFC_GLB, WP_EN(en ? 1 : 0)); |
99 | } | 99 | } |