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 RT288x

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

View File

@@ -1,7 +1,7 @@
/*
* Ralink RT288x SoC platform device registration
*
* Copyright (C) 2008 Gabor Juhos <juhosg@openwrt.org>
* Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org>
* Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify it
@@ -14,6 +14,8 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/physmap.h>
#include <linux/etherdevice.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <asm/addrspace.h>
@@ -154,7 +156,13 @@ static struct platform_device rt288x_eth_device = {
void __init rt288x_register_ethernet(void)
{
rt288x_eth_data.sys_freq = rt288x_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));
rt288x_eth_data.sys_freq = clk_get_rate(clk);
rt288x_eth_data.reset_fe = rt288x_fe_reset;
rt288x_eth_data.min_pkt_len = 64;