summaryrefslogtreecommitdiff
path: root/arch/mips/jz4740/platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/jz4740/platform.c')
-rw-r--r--arch/mips/jz4740/platform.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/mips/jz4740/platform.c b/arch/mips/jz4740/platform.c
index 0b12f273cb2e..2a5c7c7d0735 100644
--- a/arch/mips/jz4740/platform.c
+++ b/arch/mips/jz4740/platform.c
@@ -13,6 +13,7 @@
*
*/
+#include <linux/clk.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
@@ -308,9 +309,17 @@ static struct platform_device jz4740_uart_device = {
void jz4740_serial_device_register(void)
{
struct plat_serial8250_port *p;
+ struct clk *ext_clk;
+ unsigned long ext_rate;
+
+ ext_clk = clk_get(NULL, "ext");
+ if (IS_ERR(ext_clk))
+ panic("unable to get ext clock");
+ ext_rate = clk_get_rate(ext_clk);
+ clk_put(ext_clk);
for (p = jz4740_uart_data; p->flags != 0; ++p)
- p->uartclk = jz4740_clock_bdata.ext_rate;
+ p->uartclk = ext_rate;
platform_device_register(&jz4740_uart_device);
}