u-boot/cpu/ppc4xx
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_enet.c ppc4xx: fix flush + invalidate_dcache_range arguments 2007-12-27 19:35:33 +01:00
4xx_pci.c ppc4xx: Cleanup of 4xx PCI and PCIe support (renaming) 2007-10-31 21:20:49 +01:00
4xx_pcie.c ppc4xx: Correct 405EX PCIe UTL register mapping 2007-11-18 14:44:44 +01:00
4xx_uart.c ppc4xx: Correct UART input clock calculation and passing to fdt 2007-10-31 21:20:51 +01:00
40x_spd_sdram.c ppc4xx: Consolidate some of the 405 and 440 macros/structs into 4xx 2007-10-31 21:20:50 +01:00
44x_spd_ddr.c ppc4xx: Add CONFIG_4xx_DCACHE compile options to enable cached SDRAM 2007-10-31 21:21:47 +01:00
44x_spd_ddr2.c ppc4xx: Add CONFIG_4xx_DCACHE compile options to enable cached SDRAM 2007-10-31 21:21:47 +01:00
bedbug_405.c cpu/[7a-ln-z]*: Remove obsolete references to CONFIG_COMMANDS 2007-07-09 18:57:22 -05:00
cache.S ppc4xx: Rework 4xx cache support 2007-10-31 21:21:46 +01:00
commproc.c * Patches by Reinhard Meyer, 14 Feb 2004: 2004-02-23 22:22:28 +00:00
config.mk ppc4xx: Fix O=buildir builds 2007-06-25 16:50:55 +02:00
cpu.c ppc4xx: Enable 405EX PCIe UTL register configuration 2007-11-16 14:16:54 +01:00
cpu_init.c ppc4xx: Enable 405EP PCI arbiter per default on all boards 2007-12-28 16:39:15 +01:00
dcr.S cpu/ rtc/ include/: Remove lingering references to CFG_CMD_* symbols. 2007-07-10 10:27:39 -05:00
denali_data_eye.c Copy 440EPx/GRx SDRAM data-eye search to common directory 2007-12-27 19:35:36 +01:00
denali_spd_ddr2.c Add 440EPx DDR2 SPD DIMM support 2007-12-27 19:35:36 +01:00
fdt.c ppc4xx: fdt: Cleanup setup of cpu node setup 2007-12-27 19:35:34 +01:00
gpio.c ppc4xx: Add functionality to GPIO support 2008-01-04 11:38:45 +01:00
i2c.c ppc4xx: Fix i2c divisor calcularion for PPC4xx 2007-04-12 14:15:59 +02:00
interrupts.c ppc4xx: Add PPC405EX support 2007-10-31 21:20:49 +01:00
iop480_uart.c ppc4xx: Rework of 4xx serial driver (1) 2007-10-31 21:20:50 +01:00
kgdb.S ppc4xx: Rework 4xx cache support 2007-10-31 21:21:46 +01:00
Makefile Add denali_data_eye.o and denali_spd_ddr2.o to PPC4xx Makefile 2007-12-27 19:35:36 +01:00
miiphy.c Add Ethernet 1000BASE-X support for PPC4xx 2007-12-27 19:35:36 +01:00
ndfc.c ppc4xx: Add PPC405EX support 2007-10-31 21:20:49 +01:00
resetvec.S * Code cleanup: 2003-06-27 21:31:46 +00:00
sdram.c ppc4xx: Add initial Zeus (PPC405EP) board support 2007-08-14 14:44:41 +02:00
sdram.h ppc4xx: Add initial Zeus (PPC405EP) board support 2007-08-14 14:44:41 +02:00
speed.c ppc4xx: Add freqUART to CPU speed detection 2007-10-31 21:20:50 +01:00
start.S Fix ppc4xx clear_bss() code 2007-12-27 19:35:34 +01:00
tlb.c ppc4xx: Add change_tlb function to modify I attribute of TLB(s) 2007-10-31 21:21:47 +01:00
traps.c [PPC440SPe] Convert machine check exceptions handling 2007-09-07 17:46:18 +02:00
usb.c ppc4xx: Make USB working with CONFIG_4xx_DCACHE defined 2007-11-09 16:42:15 +01:00
usb_ohci.c [PATCH] Add AMCC PPC405EZ support 2007-03-21 13:38:59 +01:00
usb_ohci.h Add support for AMCC PPC440EP/GR eval boards Yosemite and Yellowstone. 2005-08-01 16:41:48 +02:00
usbdev.c cpu/[7a-ln-z]*: Remove obsolete references to CONFIG_COMMANDS 2007-07-09 18:57:22 -05:00
usbdev.h Add support for AMCC PPC440EP/GR eval boards Yosemite and Yellowstone. 2005-08-01 16:41:48 +02:00
vecnum.h ppc4xx: Add PPC405EX support 2007-10-31 21:20:49 +01:00