| * DaVinci pin multiplexing configurations |
| * Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com> |
| * 2007 (c) MontaVista Software, Inc. This file is licensed under |
| * the terms of the GNU General Public License version 2. This program |
| * is licensed "as is" without any warranty of any kind, whether express |
| #include <linux/spinlock.h> |
| #include <mach/hardware.h> |
| /* System control register offsets */ |
| static DEFINE_SPINLOCK(mux_lock); |
| void davinci_mux_peripheral(unsigned int mux, unsigned int enable) |
| u32 pinmux, muxreg = PINMUX0; |
| if (mux >= DAVINCI_MUX_LEVEL2) { |
| mux -= DAVINCI_MUX_LEVEL2; |
| pinmux = davinci_readl(DAVINCI_SYSTEM_MODULE_BASE + muxreg); |
| davinci_writel(pinmux, DAVINCI_SYSTEM_MODULE_BASE + muxreg); |