Ignore:
Timestamp:
2011-01-26T21:48:35+01:00 (6 years ago)
Author:
juhosg
Message:

ramips: implement clock API for RT305X

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt305x/devices.c

    r24331 r25124  
    1111#include <linux/kernel.h> 
    1212#include <linux/platform_device.h> 
     13#include <linux/err.h> 
     14#include <linux/clk.h> 
    1315#include <linux/mtd/mtd.h> 
    1416#include <linux/mtd/physmap.h> 
     
    151153void __init rt305x_register_ethernet(void) 
    152154{ 
    153         ramips_eth_data.sys_freq = rt305x_sys_freq; 
     155        struct clk *clk; 
     156 
     157        clk = clk_get(NULL, "sys"); 
     158        if (IS_ERR(clk)) 
     159                panic("unable to get SYS clock, err=%ld", PTR_ERR(clk)); 
     160 
     161        ramips_eth_data.sys_freq = clk_get_rate(clk); 
    154162 
    155163        platform_device_register(&rt305x_esw_device); 
Note: See TracChangeset for help on using the changeset viewer.