1257453Sian/*- 2257453Sian * Copyright (c) 2013 Ian Lepore <ian@freebsd.org> 3257453Sian * All rights reserved. 4257453Sian * 5257453Sian * Redistribution and use in source and binary forms, with or without 6257453Sian * modification, are permitted provided that the following conditions 7257453Sian * are met: 8257453Sian * 1. Redistributions of source code must retain the above copyright 9257453Sian * notice, this list of conditions and the following disclaimer. 10257453Sian * 2. Redistributions in binary form must reproduce the above copyright 11257453Sian * notice, this list of conditions and the following disclaimer in the 12257453Sian * documentation and/or other materials provided with the distribution. 13257453Sian * 14257453Sian * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15257453Sian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16257453Sian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17257453Sian * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18257453Sian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19257453Sian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20257453Sian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21257453Sian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22257453Sian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23257453Sian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24257453Sian * SUCH DAMAGE. 25257453Sian * 26257453Sian * $FreeBSD: releng/10.3/sys/arm/freescale/imx/imx6_anatopvar.h 283500 2015-05-24 18:59:45Z ian $ 27257453Sian */ 28257453Sian 29257453Sian#ifndef IMX6_ANATOPVAR_H 30257453Sian#define IMX6_ANATOPVAR_H 31257453Sian 32257453Sian/* 33257453Sian * All registers controlling various analog aspects of the SoC (such as PLLs or 34257453Sian * voltage regulators or USB VBUS detection) are gathered together under the 35257453Sian * anatop device (because of newbus hierarchical resource management), but other 36257453Sian * drivers such as CMM or USBPHY need access to these registers. These 37257453Sian * functions let them have at the hardware directly. No effort is made by these 38257453Sian * functions to mediate concurrent access. 39257453Sian */ 40257453Sianuint32_t imx6_anatop_read_4(bus_size_t _offset); 41257453Sianvoid imx6_anatop_write_4(bus_size_t _offset, uint32_t _value); 42257453Sian 43266201Sianuint32_t imx6_get_cpu_clock(void); 44266201Sian 45283500Sianuint32_t pll4_configure_output(uint32_t mfi, uint32_t mfn, uint32_t mfd); 46283500Sian 47257453Sian#endif 48