1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * mux.c 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or 7*4882a593Smuzhiyun * modify it under the terms of the GNU General Public License as 8*4882a593Smuzhiyun * published by the Free Software Foundation version 2. 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * This program is distributed "as is" WITHOUT ANY WARRANTY of any 11*4882a593Smuzhiyun * kind, whether express or implied; without even the implied warranty 12*4882a593Smuzhiyun * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13*4882a593Smuzhiyun * GNU General Public License for more details. 14*4882a593Smuzhiyun */ 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun #include <common.h> 17*4882a593Smuzhiyun #include <asm/arch/mux.h> 18*4882a593Smuzhiyun #include <asm/arch/hardware.h> 19*4882a593Smuzhiyun #include <asm/io.h> 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun /* 22*4882a593Smuzhiyun * Configure the pin mux for the module 23*4882a593Smuzhiyun */ configure_module_pin_mux(struct module_pin_mux * mod_pin_mux)24*4882a593Smuzhiyunvoid configure_module_pin_mux(struct module_pin_mux *mod_pin_mux) 25*4882a593Smuzhiyun { 26*4882a593Smuzhiyun int i; 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun if (!mod_pin_mux) 29*4882a593Smuzhiyun return; 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun for (i = 0; mod_pin_mux[i].reg_offset != -1; i++) 32*4882a593Smuzhiyun MUX_CFG(mod_pin_mux[i].val, mod_pin_mux[i].reg_offset); 33*4882a593Smuzhiyun } 34