diff options
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/qe.c | 5 | ||||
-rw-r--r-- | include/asm-powerpc/qe.h | 1 |
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 | */ |
157 | static unsigned int brg_clk = 0; | 157 | static unsigned int brg_clk = 0; |
158 | 158 | ||
159 | unsigned int get_brg_clk(void) | 159 | unsigned 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 | } |
183 | EXPORT_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 */ |
86 | int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input); | 86 | int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input); |
87 | enum qe_clock qe_clock_source(const char *source); | 87 | enum qe_clock qe_clock_source(const char *source); |
88 | unsigned int qe_get_brg_clk(void); | ||
88 | int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier); | 89 | int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier); |
89 | int qe_get_snum(void); | 90 | int qe_get_snum(void); |
90 | void qe_put_snum(u8 snum); | 91 | void qe_put_snum(u8 snum); |