11 #include <linux/kernel.h>
17 #include <linux/ethtool.h>
21 #include <mach/bridge-regs.h>
26 #include <plat/common.h>
30 static int get_tclk(
void);
42 __asm__(
"mrc p15, 1, %0, c15, c1, 0" :
"=r" (extra));
44 return !!(extra & 0x00004000);
47 static int get_hclk(
void)
71 panic(
"unknown HCLK PLL setting: %.8x\n",
78 static void get_pclk_l2clk(
int hclk,
int core_index,
int *pclk,
int *l2clk)
86 if (core_index == 0) {
96 *pclk = ((
u64)hclk * (2 + (cfg & 0xf))) >> 1;
102 *l2clk = *pclk / (((cfg >> 4) & 3) + 1);
105 static int get_tclk(
void)
114 tclk_freq = 166666667;
117 tclk_freq = 200000000;
120 panic(
"unknown TCLK PLL setting: %.8x\n",
167 static struct clk *tclk;
346 .init = mv78xx0_timer_init,
353 static char *
__init mv78xx0_id(
void)
363 return "MV78X00-Rev-Unsupported";
370 return "MV78100-Rev-Unsupported";
375 return "MV78200-Rev-Unsupported";
377 return "Device-Unknown";
381 static int __init is_l2_writethrough(
void)
395 get_pclk_l2clk(hclk, core_index, &pclk, &l2clk);
398 printk(
"core #%d, ", core_index);
399 printk(
"PCLK = %dMHz, ", (pclk + 499999) / 1000000);
400 printk(
"L2 = %dMHz, ", (l2clk + 499999) / 1000000);
401 printk(
"HCLK = %dMHz, ", (hclk + 499999) / 1000000);
402 printk(
"TCLK = %dMHz\n", (get_tclk() + 499999) / 1000000);
406 #ifdef CONFIG_CACHE_FEROCEON_L2