Deleted Added
full compact
ar724x_chip.c (248781) ar724x_chip.c (253508)
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/ar724x_chip.c 248781 2013-03-27 03:33:19Z adrian $");
28__FBSDID("$FreeBSD: head/sys/mips/atheros/ar724x_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>

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

85
86 u_ar71xx_cpu_freq = freq;
87
88 div = ((pll >> AR724X_DDR_DIV_SHIFT) & AR724X_DDR_DIV_MASK) + 1;
89 u_ar71xx_ddr_freq = freq / div;
90
91 div = (((pll >> AR724X_AHB_DIV_SHIFT) & AR724X_AHB_DIV_MASK) + 1) * 2;
92 u_ar71xx_ahb_freq = u_ar71xx_cpu_freq / div;
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>

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

85
86 u_ar71xx_cpu_freq = freq;
87
88 div = ((pll >> AR724X_DDR_DIV_SHIFT) & AR724X_DDR_DIV_MASK) + 1;
89 u_ar71xx_ddr_freq = freq / div;
90
91 div = (((pll >> AR724X_AHB_DIV_SHIFT) & AR724X_AHB_DIV_MASK) + 1) * 2;
92 u_ar71xx_ahb_freq = u_ar71xx_cpu_freq / div;
93 u_ar71xx_wdt_freq = u_ar71xx_cpu_freq / div;
94 u_ar71xx_uart_freq = u_ar71xx_cpu_freq / div;
93}
94
95static void
96ar724x_chip_device_stop(uint32_t mask)
97{
98 uint32_t mask_inv, reg;
99
100 mask_inv = mask & AR724X_RESET_MODULE_USB_OHCI_DLL;

--- 147 unchanged lines hidden ---
95}
96
97static void
98ar724x_chip_device_stop(uint32_t mask)
99{
100 uint32_t mask_inv, reg;
101
102 mask_inv = mask & AR724X_RESET_MODULE_USB_OHCI_DLL;

--- 147 unchanged lines hidden ---