Deleted Added
full compact
ar91xx_chip.c (228450) ar91xx_chip.c (233081)
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>
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 228450 2011-12-13 05:13:51Z adrian $");
28__FBSDID("$FreeBSD: head/sys/mips/atheros/ar91xx_chip.c 233081 2012-03-17 07:25:23Z 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>

--- 69 unchanged lines hidden (view full) ---

106{
107 uint32_t reg;
108
109 reg = ATH_READ_REG(AR91XX_RESET_REG_RESET_MODULE);
110 return ((reg & mask) == mask);
111}
112
113static void
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>

--- 69 unchanged lines hidden (view full) ---

106{
107 uint32_t reg;
108
109 reg = ATH_READ_REG(AR91XX_RESET_REG_RESET_MODULE);
110 return ((reg & mask) == mask);
111}
112
113static void
114ar91xx_chip_set_mii_speed(uint32_t unit, uint32_t speed)
115{
116 /* XXX TODO */
117}
118
119
120static void
114ar91xx_chip_set_pll_ge(int unit, int speed)
115{
116 uint32_t pll;
117
118 switch(speed) {
119 case 10:
120 pll = AR91XX_PLL_VAL_10;
121 break;

--- 82 unchanged lines hidden (view full) ---

204
205struct ar71xx_cpu_def ar91xx_chip_def = {
206 &ar91xx_chip_detect_mem_size,
207 &ar91xx_chip_detect_sys_frequency,
208 &ar91xx_chip_device_stop,
209 &ar91xx_chip_device_start,
210 &ar91xx_chip_device_stopped,
211 &ar91xx_chip_set_pll_ge,
121ar91xx_chip_set_pll_ge(int unit, int speed)
122{
123 uint32_t pll;
124
125 switch(speed) {
126 case 10:
127 pll = AR91XX_PLL_VAL_10;
128 break;

--- 82 unchanged lines hidden (view full) ---

211
212struct ar71xx_cpu_def ar91xx_chip_def = {
213 &ar91xx_chip_detect_mem_size,
214 &ar91xx_chip_detect_sys_frequency,
215 &ar91xx_chip_device_stop,
216 &ar91xx_chip_device_start,
217 &ar91xx_chip_device_stopped,
218 &ar91xx_chip_set_pll_ge,
219 &ar91xx_chip_set_mii_speed,
212 &ar91xx_chip_ddr_flush_ge,
213 &ar91xx_chip_get_eth_pll,
214 &ar91xx_chip_ddr_flush_ip2,
215 &ar91xx_chip_init_usb_peripheral,
216};
220 &ar91xx_chip_ddr_flush_ge,
221 &ar91xx_chip_get_eth_pll,
222 &ar91xx_chip_ddr_flush_ip2,
223 &ar91xx_chip_init_usb_peripheral,
224};