static void iomux_set_pad_sub(struct iomux_softc *sc, uint32_t pin, uint32_t config) { bus_size_t pad_ctl_reg = IOMUX_PIN_TO_PAD_ADDRESS(pin); if (pad_ctl_reg != IOMUX_PAD_NONE) IOMUX_WRITE(sc, pad_ctl_reg, config); }
static uint32_t iomux_get_pad_config_sub(struct imx6_iomux_softc *sc, uint32_t pin) { bus_size_t pad_reg = IOMUX_PIN_TO_PAD_ADDRESS(pin); uint32_t result; result = IOMUX_READ(sc, pad_reg); return(result); }
static void nitrogen6_mux_config(const struct iomux_conf *conflist) { int i; uint32_t reg; for (i = 0; conflist[i].pin != IOMUX_CONF_EOT; i++) { reg = IOMUX_PIN_TO_PAD_ADDRESS(conflist[i].pin); if (reg != IOMUX_PAD_NONE) IOMUX_WRITE(reg, conflist[i].pad); reg = IOMUX_PIN_TO_MUX_ADDRESS(conflist[i].pin); if (reg != IOMUX_MUX_NONE) IOMUX_WRITE(reg, conflist[i].mux); } }