MIPS: AR7: Implement clock API
This patch makes the ar7 clock code implement the Linux clk API. Drivers using the various clocks available in the SoC are updated accordingly. Signed-off-by: Florian Fainelli <florian@openwrt.org> Acked-by: Wim Van Sebroeck <wim@iguana.be> To: linux-mips@linux-mips.org Cc: Wim Van Sebroeck <wim@iguana.be> Cc: netdev@vger.kernel.org Cc: David Miller <davem@davemloft.net> Patchwork: http://patchwork.linux-mips.org/patch/881/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
5f3c909881
commit
780019ddf0
@@ -105,26 +105,9 @@ static inline u8 ar7_chip_rev(void)
|
||||
return (readl((void *)KSEG1ADDR(AR7_REGS_GPIO + 0x14)) >> 16) & 0xff;
|
||||
}
|
||||
|
||||
static inline int ar7_cpu_freq(void)
|
||||
{
|
||||
return ar7_cpu_clock;
|
||||
}
|
||||
|
||||
static inline int ar7_bus_freq(void)
|
||||
{
|
||||
return ar7_bus_clock;
|
||||
}
|
||||
|
||||
static inline int ar7_vbus_freq(void)
|
||||
{
|
||||
return ar7_bus_clock / 2;
|
||||
}
|
||||
#define ar7_cpmac_freq ar7_vbus_freq
|
||||
|
||||
static inline int ar7_dsp_freq(void)
|
||||
{
|
||||
return ar7_dsp_clock;
|
||||
}
|
||||
struct clk {
|
||||
unsigned int rate;
|
||||
};
|
||||
|
||||
static inline int ar7_has_high_cpmac(void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user