1f214250aSIan Lepore /*- 2f214250aSIan Lepore * Copyright (c) 2014 Ian Lepore <ian@freebsd.org> 3f214250aSIan Lepore * All rights reserved. 4f214250aSIan Lepore * 5f214250aSIan Lepore * Redistribution and use in source and binary forms, with or without 6f214250aSIan Lepore * modification, are permitted provided that the following conditions 7f214250aSIan Lepore * are met: 8f214250aSIan Lepore * 1. Redistributions of source code must retain the above copyright 9f214250aSIan Lepore * notice, this list of conditions and the following disclaimer. 10f214250aSIan Lepore * 2. Redistributions in binary form must reproduce the above copyright 11f214250aSIan Lepore * notice, this list of conditions and the following disclaimer in the 12f214250aSIan Lepore * documentation and/or other materials provided with the distribution. 13f214250aSIan Lepore * 14f214250aSIan Lepore * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15f214250aSIan Lepore * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16f214250aSIan Lepore * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17f214250aSIan Lepore * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18f214250aSIan Lepore * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19f214250aSIan Lepore * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20f214250aSIan Lepore * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21f214250aSIan Lepore * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22f214250aSIan Lepore * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23f214250aSIan Lepore * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24f214250aSIan Lepore * SUCH DAMAGE. 25f214250aSIan Lepore */ 26f214250aSIan Lepore 27f214250aSIan Lepore #ifndef IMX_IOMUXVAR_H 28f214250aSIan Lepore #define IMX_IOMUXVAR_H 29f214250aSIan Lepore 30f214250aSIan Lepore /* 31f5a76413SIan Lepore * IOMUX interface functions 32f5a76413SIan Lepore */ 33f5a76413SIan Lepore void iomux_set_function(u_int pin, u_int fn); 34f5a76413SIan Lepore void iomux_set_pad(u_int pin, u_int cfg); 35f5a76413SIan Lepore u_int iomux_get_pad_config(u_int pin); 36f5a76413SIan Lepore 37f5a76413SIan Lepore /* 38f214250aSIan Lepore * The IOMUX Controller device has a small set of "general purpose registers" 39f214250aSIan Lepore * which control various aspects of SoC operation that really have nothing to do 40f214250aSIan Lepore * with IO pin assignments or pad control. These functions let other soc level 41f214250aSIan Lepore * code manipulate these values. 42f214250aSIan Lepore */ 43*28926d45SIan Lepore uint32_t imx_iomux_gpr_get(u_int regaddr); 44*28926d45SIan Lepore void imx_iomux_gpr_set(u_int regaddr, uint32_t val); 45*28926d45SIan Lepore void imx_iomux_gpr_set_masked(u_int regaddr, uint32_t clrbits, uint32_t setbits); 46f214250aSIan Lepore 47f214250aSIan Lepore #endif 48