1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

ramips: implement clock API for RT305X

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25124 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg
2011-01-26 20:48:35 +00:00
parent b2dc6c86ee
commit 86f7e2834f
7 changed files with 148 additions and 41 deletions

View File

@@ -10,6 +10,8 @@
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/physmap.h>
@@ -150,7 +152,13 @@ static struct platform_device rt305x_esw_device = {
void __init rt305x_register_ethernet(void)
{
ramips_eth_data.sys_freq = rt305x_sys_freq;
struct clk *clk;
clk = clk_get(NULL, "sys");
if (IS_ERR(clk))
panic("unable to get SYS clock, err=%ld", PTR_ERR(clk));
ramips_eth_data.sys_freq = clk_get_rate(clk);
platform_device_register(&rt305x_esw_device);
platform_device_register(&rt305x_eth_device);