u-boot-brain/include/asm-ppc
Lawrence R. Johnson 5ab884b254 ppc4xx: Add functionality to GPIO support
This patch makes two additions to GPIO support:

First, it adds function gpio_read_in_bit() to read the a bit from the
GPIO Input Register (GPIOx_IR) in the same way that function
gpio_read_out_bit() reads a bit from the GPIO Output Register
(GPIOx_OR).

Second, it modifies function gpio_set_chip_configuration() to provide
an additional option for configuring the GPIO from the
"CFG_4xx_GPIO_TABLE".

According to the 440EPx User's Manual, when an alternate output is used,
the three-state control is configured in one of two ways, depending on
the particular output.  The first option is to select the corresponding
alternate three-state control in the GPIOx_TRSH/L registers.  The second
option is to select the GPIO Three-State Control Register (GPIOx_TCR) in
the GPIOx_TRSH/L registers, and set the corresponding bit in the
GPIOx_TCR register to enable the output.  For example, the Manual
specifies configuring the GPIO00 Alternate 1 Signal (PreAddr07) to use
the alternate three-state control (first option), and specifies
configuring the GPIO32 Alternate 1 Signal (USB2OM0) with the output
enabled in the GPIOx_TCR register (second option).

Currently, gpio_set_chip_configuration() configures all alternate signal
outputs to use the first option.  This patch allow the second option to
be selected by setting the "out_val" element in the table entry to
"GPIO_OUT_1".  The first option is used when the "out_val" element is
set to "GPIO_OUT_0".  Because "out_val" is not currently used when an
alternate signal is selected, and because all current GPIO tables set
"out_val" to "GPIO_OUT_0" for all alternate signals, this patch should
not change any existing configurations.

Signed-off-by: Larry Johnson <lrj@acm.org>
2008-01-04 11:38:45 +01:00
..
4xx_pci.h ppc4xx: Rename 405gp_pci to 4xx_pci since its used on all 4xx platforms 2007-10-31 21:20:49 +01:00
4xx_pcie.h ppc4xx: Enable 405EX PCIe UTL register configuration 2007-11-16 14:16:54 +01:00
5xx_immap.h * Code cleanup: 2003-06-27 21:31:46 +00:00
8xx_immap.h Patch by Yuli Barcohen, 19 Apr 2004: 2004-06-06 21:35:06 +00:00
atomic.h Initial revision 2001-04-28 17:59:11 +00:00
bitops.h * Code cleanup: 2003-06-27 21:31:46 +00:00
byteorder.h Cleanup for GCC-4.x 2005-10-13 16:45:02 +02:00
cache.h ppc4xx: Rework 4xx cache support 2007-10-31 21:21:46 +01:00
cpm_85xx.h Fix DPRAM offset/size for MPC8541/8555. 2005-12-06 15:02:31 +01:00
cpm_8260.h * Patches by Pantelis Antoniou, 30 Mar 2004: 2004-04-15 18:22:41 +00:00
e300.h [ADS5121] Support for the ADS5121 board 2007-07-27 14:43:59 +02:00
errno.h Initial revision 2000-08-21 15:05:47 +00:00
fsl_i2c.h Make fsl-i2c not conflict with SOFT I2C 2006-11-29 00:25:26 -06:00
global_data.h ppc4xx: Correct UART input clock calculation and passing to fdt 2007-10-31 21:20:51 +01:00
gpio.h ppc4xx: Add functionality to GPIO support 2008-01-04 11:38:45 +01:00
immap_83xx.h mpc83xx: Add register definitions for MPC831x. 2007-04-23 16:31:59 -05:00
immap_85xx.h Stop using immap_t on 85xx 2007-12-11 22:34:20 -06:00
immap_86xx.h cpu/86xx fixes. 2007-08-10 11:02:32 -05:00
immap_512x.h [ADS5121] Support for the ADS5121 board 2007-07-27 14:43:59 +02:00
immap_8220.h Patch by TsiChung Liew, 23 Sep 2004: 2004-10-28 00:09:35 +00:00
immap_8260.h Patch by Thomas Viehweger, 14 May 2004: 2004-06-09 12:42:26 +00:00
immap_fsl_pci.h Handle MPC85xx PCIe reset errata (PCI-Ex 38) 2007-12-11 22:34:20 -06:00
immap_qe.h Add support for UEC to 8568 2007-08-14 01:47:44 -05:00
io.h Introduce map_physmem() and unmap_physmem() 2007-12-13 13:15:16 +01:00
iopin_8xx.h Add iopset command on mpc8xx 2005-09-26 00:44:15 +02:00
iopin_85xx.h Stop using immap_t for cpm offset on 85xx 2007-12-11 22:34:19 -06:00
iopin_8260.h Initial revision 2001-08-05 15:35:05 +00:00
m8260_pci.h * Code cleanup: 2003-06-27 21:31:46 +00:00
mc146818rtc.h Initial revision 2000-11-20 17:21:10 +00:00
mmu.h Merge branch 'master' of /home/stefan/git/u-boot/u-boot into for-1.3.2-ver2 2007-12-27 19:37:26 +01:00
mpc8349_pci.h Added PCI support for MPC8349ADS board 2006-01-12 19:51:38 -06:00
pci_io.h * Code cleanup: 2003-06-27 21:31:46 +00:00
pnp.h * Code cleanup: 2003-06-27 21:31:46 +00:00
posix_types.h Initial revision 2001-04-28 17:59:11 +00:00
processor.h Merge commit 'wd/master' 2008-01-03 09:46:55 -06:00
ptrace.h * Code cleanup: 2003-06-27 21:31:46 +00:00
residual.h * Code cleanup: 2003-06-27 21:31:46 +00:00
sigcontext.h Initial revision 2000-10-11 22:04:29 +00:00
signal.h Initial revision 2001-04-28 17:59:11 +00:00
status_led.h * Patches by David Müller, 12 Jun 2003: 2003-06-19 23:01:32 +00:00
string.h Initial revision 2000-08-21 15:05:47 +00:00
types.h Initial revision 2000-08-21 15:05:47 +00:00
u-boot.h ppc4xx: Add PPC405EX support 2007-10-31 21:20:49 +01:00