1/*- 2 * Copyright (c) 2010 Adrian Chadd 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/mips/atheros/ar91xx_chip.c 253508 2013-07-21 03:52:52Z adrian $"); |
29 30#include "opt_ddb.h" 31 32#include <sys/param.h> 33#include <sys/conf.h> 34#include <sys/kernel.h> 35#include <sys/systm.h> 36#include <sys/bus.h> --- 42 unchanged lines hidden (view full) --- 79 freq = div * AR91XX_BASE_FREQ; 80 u_ar71xx_cpu_freq = freq; 81 82 div = ((pll >> AR91XX_DDR_DIV_SHIFT) & AR91XX_DDR_DIV_MASK) + 1; 83 u_ar71xx_ddr_freq = freq / div; 84 85 div = (((pll >> AR91XX_AHB_DIV_SHIFT) & AR91XX_AHB_DIV_MASK) + 1) * 2; 86 u_ar71xx_ahb_freq = u_ar71xx_cpu_freq / div; |
87 u_ar71xx_uart_freq = u_ar71xx_cpu_freq / div; 88 u_ar71xx_wdt_freq = u_ar71xx_cpu_freq / div; |
89} 90 91static void 92ar91xx_chip_device_stop(uint32_t mask) 93{ 94 uint32_t reg; 95 96 reg = ATH_READ_REG(AR91XX_RESET_REG_RESET_MODULE); --- 127 unchanged lines hidden --- |