aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe.c5
1 files changed, 3 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;