Peter Korsgaard | 5d3f682 | 2012-10-18 01:21:11 +0000 | [diff] [blame] | 1 | /* |
| 2 | * mux.h |
| 3 | * |
Matt Porter | b409a80 | 2013-03-15 10:07:05 +0000 | [diff] [blame] | 4 | * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/ |
Peter Korsgaard | 5d3f682 | 2012-10-18 01:21:11 +0000 | [diff] [blame] | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License as |
| 8 | * published by the Free Software Foundation version 2. |
| 9 | * |
| 10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any |
| 11 | * kind, whether express or implied; without even the implied warranty |
| 12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | */ |
| 15 | |
| 16 | #ifndef _MUX_H_ |
| 17 | #define _MUX_H_ |
| 18 | |
| 19 | #include <common.h> |
| 20 | #include <asm/io.h> |
| 21 | |
Matt Porter | b409a80 | 2013-03-15 10:07:05 +0000 | [diff] [blame] | 22 | #ifdef CONFIG_AM33XX |
| 23 | #include <asm/arch/mux_am33xx.h> |
| 24 | #elif defined(CONFIG_TI814X) |
| 25 | #include <asm/arch/mux_ti814x.h> |
TENART Antoine | 35c7e52 | 2013-07-02 12:05:59 +0200 | [diff] [blame] | 26 | #elif defined(CONFIG_TI816X) |
| 27 | #include <asm/arch/mux_ti816x.h> |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 28 | #elif defined(CONFIG_AM43XX) |
| 29 | #include <asm/arch/mux_am43xx.h> |
Matt Porter | b409a80 | 2013-03-15 10:07:05 +0000 | [diff] [blame] | 30 | #endif |
Peter Korsgaard | 5d3f682 | 2012-10-18 01:21:11 +0000 | [diff] [blame] | 31 | |
| 32 | struct module_pin_mux { |
| 33 | short reg_offset; |
Matt Porter | b409a80 | 2013-03-15 10:07:05 +0000 | [diff] [blame] | 34 | unsigned int val; |
Peter Korsgaard | 5d3f682 | 2012-10-18 01:21:11 +0000 | [diff] [blame] | 35 | }; |
| 36 | |
| 37 | /* Pad control register offset */ |
| 38 | #define PAD_CTRL_BASE 0x800 |
| 39 | #define OFFSET(x) (unsigned int) (&((struct pad_signals *) \ |
| 40 | (PAD_CTRL_BASE))->x) |
| 41 | |
| 42 | /* |
| 43 | * Configure the pin mux for the module |
| 44 | */ |
| 45 | void configure_module_pin_mux(struct module_pin_mux *mod_pin_mux); |
| 46 | |
Matt Porter | b409a80 | 2013-03-15 10:07:05 +0000 | [diff] [blame] | 47 | #endif /* endif _MUX_H */ |