ar933x_chip.c (249126) | ar933x_chip.c (253508) |
---|---|
1/*- 2 * Copyright (c) 2012 Adrian Chadd <adrian@FreeBSD.org> 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> | 1/*- 2 * Copyright (c) 2012 Adrian Chadd <adrian@FreeBSD.org> 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/ar933x_chip.c 249126 2013-04-05 02:02:37Z adrian $"); | 28__FBSDID("$FreeBSD: head/sys/mips/atheros/ar933x_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> --- 72 unchanged lines hidden (view full) --- 109 t = ((clock_ctrl >> AR933X_PLL_CLOCK_CTRL_DDR_DIV_SHIFT) & 110 AR933X_PLL_CLOCK_CTRL_DDR_DIV_MASK) + 1; 111 u_ar71xx_ddr_freq = freq / t; 112 113 t = ((clock_ctrl >> AR933X_PLL_CLOCK_CTRL_AHB_DIV_SHIFT) & 114 AR933X_PLL_CLOCK_CTRL_AHB_DIV_MASK) + 1; 115 u_ar71xx_ahb_freq = freq / t; 116 } | 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> --- 72 unchanged lines hidden (view full) --- 109 t = ((clock_ctrl >> AR933X_PLL_CLOCK_CTRL_DDR_DIV_SHIFT) & 110 AR933X_PLL_CLOCK_CTRL_DDR_DIV_MASK) + 1; 111 u_ar71xx_ddr_freq = freq / t; 112 113 t = ((clock_ctrl >> AR933X_PLL_CLOCK_CTRL_AHB_DIV_SHIFT) & 114 AR933X_PLL_CLOCK_CTRL_AHB_DIV_MASK) + 1; 115 u_ar71xx_ahb_freq = freq / t; 116 } |
117 118 /* XXX uart should be the refclk, no? */ 119 u_ar71xx_uart_freq = u_ar71xx_ahb_freq; 120 u_ar71xx_wdt_freq = u_ar71xx_ahb_freq; |
|
117} 118 119static void 120ar933x_chip_device_stop(uint32_t mask) 121{ 122 uint32_t reg; 123 124 reg = ATH_READ_REG(AR933X_RESET_REG_RESET_MODULE); --- 124 unchanged lines hidden --- | 121} 122 123static void 124ar933x_chip_device_stop(uint32_t mask) 125{ 126 uint32_t reg; 127 128 reg = ATH_READ_REG(AR933X_RESET_REG_RESET_MODULE); --- 124 unchanged lines hidden --- |