imx6_anatop.c (291367) | imx6_anatop.c (300421) |
---|---|
1/*- 2 * Copyright (c) 2013 Ian Lepore <ian@freebsd.org> 3 * Copyright (c) 2014 Steven Lawrance <stl@koffein.net> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2013 Ian Lepore <ian@freebsd.org> 3 * Copyright (c) 2014 Steven Lawrance <stl@koffein.net> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/arm/freescale/imx/imx6_anatop.c 291367 2015-11-26 17:26:52Z ian $"); | 29__FBSDID("$FreeBSD: head/sys/arm/freescale/imx/imx6_anatop.c 300421 2016-05-22 13:58:32Z loos $"); |
30 31/* 32 * Analog PLL and power regulator driver for Freescale i.MX6 family of SoCs. 33 * Also, temperature montoring and cpu frequency control. It was Freescale who 34 * kitchen-sinked this device, not us. :) 35 * 36 * We don't really do anything with analog PLLs, but the registers for 37 * controlling them belong to the same block as the power regulator registers. --- 96 unchanged lines hidden (view full) --- 134 135/* 136 * Table of CPU max frequencies. This is used to translate the max frequency 137 * value (0-3) from the ocotp CFG3 register into a mhz value that can be looked 138 * up in the operating points table. 139 */ 140static uint32_t imx6_ocotp_mhz_tab[] = {792, 852, 996, 1200}; 141 | 30 31/* 32 * Analog PLL and power regulator driver for Freescale i.MX6 family of SoCs. 33 * Also, temperature montoring and cpu frequency control. It was Freescale who 34 * kitchen-sinked this device, not us. :) 35 * 36 * We don't really do anything with analog PLLs, but the registers for 37 * controlling them belong to the same block as the power regulator registers. --- 96 unchanged lines hidden (view full) --- 134 135/* 136 * Table of CPU max frequencies. This is used to translate the max frequency 137 * value (0-3) from the ocotp CFG3 register into a mhz value that can be looked 138 * up in the operating points table. 139 */ 140static uint32_t imx6_ocotp_mhz_tab[] = {792, 852, 996, 1200}; 141 |
142#define TZ_ZEROC 2732 /* deci-Kelvin <-> deci-Celcius offset. */ | 142#define TZ_ZEROC 2731 /* deci-Kelvin <-> deci-Celcius offset. */ |
143 144uint32_t 145imx6_anatop_read_4(bus_size_t offset) 146{ 147 148 KASSERT(imx6_anatop_sc != NULL, ("imx6_anatop_read_4 sc NULL")); 149 150 return (bus_read_4(imx6_anatop_sc->res[MEMRES], offset)); --- 655 unchanged lines hidden --- | 143 144uint32_t 145imx6_anatop_read_4(bus_size_t offset) 146{ 147 148 KASSERT(imx6_anatop_sc != NULL, ("imx6_anatop_read_4 sc NULL")); 149 150 return (bus_read_4(imx6_anatop_sc->res[MEMRES], offset)); --- 655 unchanged lines hidden --- |