1271084Sian/*- 2271084Sian * Copyright (c) 2014 Ian Lepore <ian@freebsd.org> 3271084Sian * All rights reserved. 4271084Sian * 5271084Sian * Redistribution and use in source and binary forms, with or without 6271084Sian * modification, are permitted provided that the following conditions 7271084Sian * are met: 8271084Sian * 1. Redistributions of source code must retain the above copyright 9271084Sian * notice, this list of conditions and the following disclaimer. 10271084Sian * 2. Redistributions in binary form must reproduce the above copyright 11271084Sian * notice, this list of conditions and the following disclaimer in the 12271084Sian * documentation and/or other materials provided with the distribution. 13271084Sian * 14271084Sian * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15271084Sian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16271084Sian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17271084Sian * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18271084Sian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19271084Sian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20271084Sian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21271084Sian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22271084Sian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23271084Sian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24271084Sian * SUCH DAMAGE. 25271084Sian * 26271084Sian * $FreeBSD: releng/10.3/sys/arm/freescale/imx/imx_iomuxvar.h 273663 2014-10-26 02:44:41Z ian $ 27271084Sian */ 28271084Sian 29271084Sian#ifndef IMX_IOMUXVAR_H 30271084Sian#define IMX_IOMUXVAR_H 31271084Sian 32271084Sian/* 33273663Sian * IOMUX interface functions 34273663Sian */ 35273663Sianvoid iomux_set_function(u_int pin, u_int fn); 36273663Sianvoid iomux_set_pad(u_int pin, u_int cfg); 37273663Sianu_int iomux_get_pad_config(u_int pin); 38273663Sian 39273663Sian/* 40271084Sian * The IOMUX Controller device has a small set of "general purpose registers" 41271084Sian * which control various aspects of SoC operation that really have nothing to do 42271084Sian * with IO pin assignments or pad control. These functions let other soc level 43271084Sian * code manipulate these values. 44271084Sian */ 45271084Sianuint32_t imx_iomux_gpr_get(u_int regnum); 46271084Sianvoid imx_iomux_gpr_set(u_int regnum, uint32_t val); 47271084Sianvoid imx_iomux_gpr_set_masked(u_int regnum, uint32_t clrbits, uint32_t setbits); 48271084Sian 49271084Sian#endif 50