summaryrefslogtreecommitdiffstats
path: root/sys/mips/atheros/ar71xx_chip.c
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2013-03-27 03:33:19 +0000
committeradrian <adrian@FreeBSD.org>2013-03-27 03:33:19 +0000
commita5e3a9bbda08f04bce1d8ffa68a680d0aaa38931 (patch)
tree92c549f1a7aa0df01b89deebeed0320ac12667b3 /sys/mips/atheros/ar71xx_chip.c
parent2255407cf0410c44a60a828ae57a5ee2d56e32e5 (diff)
downloadFreeBSD-src-a5e3a9bbda08f04bce1d8ffa68a680d0aaa38931.zip
FreeBSD-src-a5e3a9bbda08f04bce1d8ffa68a680d0aaa38931.tar.gz
Add the reference clock for each supported chip.
Obtained from: Linux (openwrt)
Diffstat (limited to 'sys/mips/atheros/ar71xx_chip.c')
-rw-r--r--sys/mips/atheros/ar71xx_chip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/mips/atheros/ar71xx_chip.c b/sys/mips/atheros/ar71xx_chip.c
index 2a25716..d141b1c 100644
--- a/sys/mips/atheros/ar71xx_chip.c
+++ b/sys/mips/atheros/ar71xx_chip.c
@@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$");
uint32_t u_ar71xx_cpu_freq;
uint32_t u_ar71xx_ahb_freq;
uint32_t u_ar71xx_ddr_freq;
+uint32_t u_ar71xx_refclk;
static void
ar71xx_chip_detect_mem_size(void)
@@ -91,6 +92,8 @@ ar71xx_chip_detect_sys_frequency(void)
uint32_t freq;
uint32_t div;
+ u_ar71xx_refclk = AR71XX_BASE_FREQ;
+
pll = ATH_READ_REG(AR71XX_PLL_REG_CPU_CONFIG);
div = ((pll >> AR71XX_PLL_DIV_SHIFT) & AR71XX_PLL_DIV_MASK) + 1;
OpenPOWER on IntegriCloud