On Wednesday 23 November 2011 17:59:05 Simon Glass wrote: > --- /dev/null > +++ b/arch/arm/cpu/armv7/tegra2/funcmux.c > > +void funcmux_select(enum periph_id id, int func) > +{ > + switch (id) { > + case PERIPH_ID_UART1: > + pinmux_set_func(PINGRP_IRRX, PMUX_FUNC_UARTA); > + pinmux_set_func(PINGRP_IRTX, PMUX_FUNC_UARTA); > + pinmux_tristate_disable(PINGRP_IRRX); > + pinmux_tristate_disable(PINGRP_IRTX); > + break; > + > + case PERIPH_ID_UART2: > + pinmux_set_func(PINGRP_UAD, PMUX_FUNC_IRDA); > + pinmux_tristate_disable(PINGRP_UAD); > + break; > + > + case PERIPH_ID_UART4: > + pinmux_set_func(PINGRP_GMC, PMUX_FUNC_UARTD); > + pinmux_tristate_disable(PINGRP_GMC); > + break; > + > + default: > + debug("%s: invalid periph_id %d", __func__, id); > + break; > + } > +}
i don't know anything about the tegra pinmux details, but the way we setup the defines in the Blackfin code was to encode all of the bits. thus we didn't need to switch() on any of the id's, we just unpacked the values at runtime with bitshifts/masks. > --- /dev/null > +++ b/arch/arm/include/asm/arch-tegra2/funcmux.h needs ifdef protection against multiple inclusion -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot