Deleted Added
full compact
ar91xx_chip.c (234326) ar91xx_chip.c (234906)
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 234326 2012-04-15 22:34:22Z adrian $");
28__FBSDID("$FreeBSD: head/sys/mips/atheros/ar91xx_chip.c 234906 2012-05-02 01:21:57Z 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>

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

142 AR91XX_PLL_REG_ETH1_INT_CLOCK, pll,
143 AR91XX_ETH1_PLL_SHIFT);
144 break;
145 default:
146 printf("%s: invalid PLL set for arge unit: %d\n",
147 __func__, unit);
148 return;
149 }
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>

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

142 AR91XX_PLL_REG_ETH1_INT_CLOCK, pll,
143 AR91XX_ETH1_PLL_SHIFT);
144 break;
145 default:
146 printf("%s: invalid PLL set for arge unit: %d\n",
147 __func__, unit);
148 return;
149 }
150 ar71xx_chip_set_mii_speed(unit, speed);
150}
151
152static void
153ar91xx_chip_ddr_flush_ge(int unit)
154{
155
156 switch (unit) {
157 case 0:

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

206struct ar71xx_cpu_def ar91xx_chip_def = {
207 &ar91xx_chip_detect_mem_size,
208 &ar91xx_chip_detect_sys_frequency,
209 &ar91xx_chip_device_stop,
210 &ar91xx_chip_device_start,
211 &ar91xx_chip_device_stopped,
212 &ar91xx_chip_set_pll_ge,
213 &ar71xx_chip_set_mii_speed,
151}
152
153static void
154ar91xx_chip_ddr_flush_ge(int unit)
155{
156
157 switch (unit) {
158 case 0:

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

207struct ar71xx_cpu_def ar91xx_chip_def = {
208 &ar91xx_chip_detect_mem_size,
209 &ar91xx_chip_detect_sys_frequency,
210 &ar91xx_chip_device_stop,
211 &ar91xx_chip_device_start,
212 &ar91xx_chip_device_stopped,
213 &ar91xx_chip_set_pll_ge,
214 &ar71xx_chip_set_mii_speed,
215 &ar71xx_chip_set_mii_if,
214 &ar91xx_chip_ddr_flush_ge,
215 &ar91xx_chip_get_eth_pll,
216 &ar91xx_chip_ddr_flush_ip2,
217 &ar91xx_chip_init_usb_peripheral,
218};
216 &ar91xx_chip_ddr_flush_ge,
217 &ar91xx_chip_get_eth_pll,
218 &ar91xx_chip_ddr_flush_ip2,
219 &ar91xx_chip_init_usb_peripheral,
220};