1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * mux.h 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Copyright (C) 2013 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 #ifndef _MUX_H_ 17*4882a593Smuzhiyun #define _MUX_H_ 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun #include <common.h> 20*4882a593Smuzhiyun #include <asm/io.h> 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun #ifdef CONFIG_AM33XX 23*4882a593Smuzhiyun #include <asm/arch/mux_am33xx.h> 24*4882a593Smuzhiyun #elif defined(CONFIG_TI814X) 25*4882a593Smuzhiyun #include <asm/arch/mux_ti814x.h> 26*4882a593Smuzhiyun #elif defined(CONFIG_TI816X) 27*4882a593Smuzhiyun #include <asm/arch/mux_ti816x.h> 28*4882a593Smuzhiyun #elif defined(CONFIG_AM43XX) 29*4882a593Smuzhiyun #include <asm/arch/mux_am43xx.h> 30*4882a593Smuzhiyun #endif 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun struct module_pin_mux { 33*4882a593Smuzhiyun short reg_offset; 34*4882a593Smuzhiyun unsigned int val; 35*4882a593Smuzhiyun }; 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun /* Pad control register offset */ 38*4882a593Smuzhiyun #define PAD_CTRL_BASE 0x800 39*4882a593Smuzhiyun #define OFFSET(x) (unsigned int) (&((struct pad_signals *)\ 40*4882a593Smuzhiyun (PAD_CTRL_BASE))->x) 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun /* 43*4882a593Smuzhiyun * Configure the pin mux for the module 44*4882a593Smuzhiyun */ 45*4882a593Smuzhiyun void configure_module_pin_mux(struct module_pin_mux *mod_pin_mux); 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun #endif /* endif _MUX_H */ 48