wdenk | 5b88144 | 2002-09-18 19:52:13 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2000 |
| 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | * Keith Outwater, keith_outwater@mvis.com |
| 5 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame^] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | 5b88144 | 2002-09-18 19:52:13 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #define NUM_PORTS 4 |
| 10 | #define PORT_BITS 18 |
| 11 | |
| 12 | /* |
| 13 | * This structure provides configuration information for one port pin. |
| 14 | * We include all fields needed to initialize any of the ioports. |
| 15 | */ |
| 16 | typedef struct { |
| 17 | unsigned char conf:1; /* If 1, configure this port */ |
| 18 | unsigned char ppar:1; /* Port Pin Assignment Register */ |
| 19 | unsigned char psor:1; /* Port Special Options Register */ |
| 20 | unsigned char pdir:1; /* Port Data Direction Register */ |
| 21 | unsigned char podr:1; /* Port Open Drain Register */ |
| 22 | unsigned char pdat:1; /* Port Data Register */ |
| 23 | unsigned char pint:1; /* Port Interrupt Register */ |
| 24 | } mpc8xx_iop_conf_t; |
| 25 | |
| 26 | extern void config_mpc8xx_ioports(volatile immap_t *immr); |