aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe.c5
-rw-r--r--include/asm-powerpc/qe.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index addabcd443a6..cff550eec7e8 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -156,7 +156,7 @@ EXPORT_SYMBOL(qe_issue_cmd);
156 */ 156 */
157static unsigned int brg_clk = 0; 157static unsigned int brg_clk = 0;
158 158
159unsigned int get_brg_clk(void) 159unsigned int qe_get_brg_clk(void)
160{ 160{
161 struct device_node *qe; 161 struct device_node *qe;
162 unsigned int size; 162 unsigned int size;
@@ -180,6 +180,7 @@ unsigned int get_brg_clk(void)
180 180
181 return brg_clk; 181 return brg_clk;
182} 182}
183EXPORT_SYMBOL(qe_get_brg_clk);
183 184
184/* Program the BRG to the given sampling rate and multiplier 185/* Program the BRG to the given sampling rate and multiplier
185 * 186 *
@@ -197,7 +198,7 @@ int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier)
197 if ((brg < QE_BRG1) || (brg > QE_BRG16)) 198 if ((brg < QE_BRG1) || (brg > QE_BRG16))
198 return -EINVAL; 199 return -EINVAL;
199 200
200 divisor = get_brg_clk() / (rate * multiplier); 201 divisor = qe_get_brg_clk() / (rate * multiplier);
201 202
202 if (divisor > QE_BRGC_DIVISOR_MAX + 1) { 203 if (divisor > QE_BRGC_DIVISOR_MAX + 1) {
203 div16 = QE_BRGC_DIV16; 204 div16 = QE_BRGC_DIV16;
diff --git a/include/asm-powerpc/qe.h b/include/asm-powerpc/qe.h
index 398534c15cc7..c3be6e2e1490 100644
--- a/include/asm-powerpc/qe.h
+++ b/include/asm-powerpc/qe.h
@@ -85,6 +85,7 @@ extern int par_io_data_set(u8 port, u8 pin, u8 val);
85/* QE internal API */ 85/* QE internal API */
86int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input); 86int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input);
87enum qe_clock qe_clock_source(const char *source); 87enum qe_clock qe_clock_source(const char *source);
88unsigned int qe_get_brg_clk(void);
88int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier); 89int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier);
89int qe_get_snum(void); 90int qe_get_snum(void);
90void qe_put_snum(u8 snum); 91void qe_put_snum(u8 snum);