17f26a5a2SPeter Korsgaard /* 27f26a5a2SPeter Korsgaard * mux.h 37f26a5a2SPeter Korsgaard * 4b2e682f7SMatt Porter * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/ 57f26a5a2SPeter Korsgaard * 67f26a5a2SPeter Korsgaard * This program is free software; you can redistribute it and/or 77f26a5a2SPeter Korsgaard * modify it under the terms of the GNU General Public License as 87f26a5a2SPeter Korsgaard * published by the Free Software Foundation version 2. 97f26a5a2SPeter Korsgaard * 107f26a5a2SPeter Korsgaard * This program is distributed "as is" WITHOUT ANY WARRANTY of any 117f26a5a2SPeter Korsgaard * kind, whether express or implied; without even the implied warranty 127f26a5a2SPeter Korsgaard * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 137f26a5a2SPeter Korsgaard * GNU General Public License for more details. 147f26a5a2SPeter Korsgaard */ 157f26a5a2SPeter Korsgaard 167f26a5a2SPeter Korsgaard #ifndef _MUX_H_ 177f26a5a2SPeter Korsgaard #define _MUX_H_ 187f26a5a2SPeter Korsgaard 197f26a5a2SPeter Korsgaard #include <common.h> 207f26a5a2SPeter Korsgaard #include <asm/io.h> 217f26a5a2SPeter Korsgaard 22b2e682f7SMatt Porter #ifdef CONFIG_AM33XX 23b2e682f7SMatt Porter #include <asm/arch/mux_am33xx.h> 24b2e682f7SMatt Porter #elif defined(CONFIG_TI814X) 25b2e682f7SMatt Porter #include <asm/arch/mux_ti814x.h> 26*dcf846d5STENART Antoine #elif defined(CONFIG_TI816X) 27*dcf846d5STENART Antoine #include <asm/arch/mux_ti816x.h> 28c06e498aSLokesh Vutla #elif defined(CONFIG_AM43XX) 29c06e498aSLokesh Vutla #include <asm/arch/mux_am43xx.h> 30b2e682f7SMatt Porter #endif 317f26a5a2SPeter Korsgaard 327f26a5a2SPeter Korsgaard struct module_pin_mux { 337f26a5a2SPeter Korsgaard short reg_offset; 34b2e682f7SMatt Porter unsigned int val; 357f26a5a2SPeter Korsgaard }; 367f26a5a2SPeter Korsgaard 377f26a5a2SPeter Korsgaard /* Pad control register offset */ 387f26a5a2SPeter Korsgaard #define PAD_CTRL_BASE 0x800 397f26a5a2SPeter Korsgaard #define OFFSET(x) (unsigned int) (&((struct pad_signals *)\ 407f26a5a2SPeter Korsgaard (PAD_CTRL_BASE))->x) 417f26a5a2SPeter Korsgaard 427f26a5a2SPeter Korsgaard /* 437f26a5a2SPeter Korsgaard * Configure the pin mux for the module 447f26a5a2SPeter Korsgaard */ 457f26a5a2SPeter Korsgaard void configure_module_pin_mux(struct module_pin_mux *mod_pin_mux); 467f26a5a2SPeter Korsgaard 47b2e682f7SMatt Porter #endif /* endif _MUX_H */ 48