Joe Hershberger | 911c606 | 2011-11-11 15:55:37 -0600 | [diff] [blame] | 1 | /* |
| 2 | * This program is free software; you can redistribute it and/or |
| 3 | * modify it under the terms of the GNU General Public License as |
| 4 | * published by the Free Software Foundation; either version 2 of |
| 5 | * the License, or (at your option) any later version. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | * You should have received a copy of the GNU General Public License |
| 13 | * along with this program; if not, write to the Free Software |
| 14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 15 | * MA 02111-1307 USA |
| 16 | */ |
| 17 | |
| 18 | #ifndef _MPC83XX_GPIO_H_ |
| 19 | #define _MPC83XX_GPIO_H_ |
| 20 | |
| 21 | /* |
| 22 | * The MCP83xx's 1-2 GPIO controllers each with 32 bits. |
| 23 | */ |
| 24 | #if defined(CONFIG_MPC8313) || defined(CONFIG_MPC8308) || \ |
| 25 | defined(CONFIG_MPC8315) |
| 26 | #define MPC83XX_GPIO_CTRLRS 1 |
| 27 | #elif defined(CONFIG_MPC834x) || defined(CONFIG_MPC837x) |
| 28 | #define MPC83XX_GPIO_CTRLRS 2 |
| 29 | #else |
| 30 | #define MPC83XX_GPIO_CTRLRS 0 |
| 31 | #endif |
| 32 | |
| 33 | #define MAX_NUM_GPIOS (32 * MPC83XX_GPIO_CTRLRS) |
| 34 | |
| 35 | void mpc83xx_gpio_init_f(void); |
| 36 | void mpc83xx_gpio_init_r(void); |
| 37 | |
| 38 | #endif /* MPC83XX_GPIO_H_ */ |