u-boot-brain/cpu
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
..
74xx_7xx cpu/ rtc/ include/: Remove lingering references to CFG_CMD_* symbols. 2007-07-10 10:27:39 -05:00
arm_intcm Move "ar" flags to config.mk to allow for silent "make -s" 2006-10-09 01:02:05 +02:00
arm720t Fix missing DECLARE_GLOBAL_DATA_PTR on CONFIG_LPC2292 in serial 2007-09-28 01:08:38 +02:00
arm920t s3c24x0: Fix usb_ohci.c missing in Makefile 2007-11-18 21:50:07 +01:00
arm925t [PATCH] omap925.c: Remove unused functions 2006-10-28 17:13:12 +02:00
arm926ejs Clean up some remaining CFG_CMD_ -> CONFIG_CMD_ issues. 2007-08-12 14:27:39 +02:00
arm946es Move "ar" flags to config.mk to allow for silent "make -s" 2006-10-09 01:02:05 +02:00
arm1136 Remove compiler warning: target CPU does not support interworking 2007-09-10 09:26:35 +02:00
at32ap AVR32: Fix wrong pin setup for USART3 2007-12-17 10:35:02 +01:00
bf533 Fix cases where DECLARE_GLOBAL_DATA_PTR was not declared as global 2007-09-15 20:48:41 +02:00
bf537 Fix cases where DECLARE_GLOBAL_DATA_PTR was not declared as global 2007-09-15 20:48:41 +02:00
bf561 Fix cases where DECLARE_GLOBAL_DATA_PTR was not declared as global 2007-09-15 20:48:41 +02:00
i386 cpu/ rtc/ include/: Remove lingering references to CFG_CMD_* symbols. 2007-07-10 10:27:39 -05:00
ixp cpu/[7a-ln-z]*: Remove obsolete references to CONFIG_COMMANDS 2007-07-09 18:57:22 -05:00
lh7a40x Move "ar" flags to config.mk to allow for silent "make -s" 2006-10-09 01:02:05 +02:00
mcf52x2 ColdFire: Update cpu flag for 4.2-xx compiler 2007-11-07 17:51:00 -06:00
mcf523x ColdFire: Update cpu flag for 4.2-xx compiler 2007-11-07 17:51:00 -06:00
mcf532x ColdFire: MCF532x - Update do_reset() using core reset 2007-11-07 17:56:15 -06:00
mcf5445x ColdFire: MCF5445x - Update correct RAMBAR and missing linker files 2007-11-07 18:00:54 -06:00
microblaze [PATCH] Add support for design without interrupt controller 2007-09-24 00:21:19 +02:00
mips [MIPS] cpu/mips/config.mk: Fix GNU assembler minor version picker 2007-11-17 20:05:26 +09:00
mpc5xx powerpc: Backout relocation changes. 2007-11-17 01:38:58 +01:00
mpc5xxx Move do_fixup* for libfdt into common code 2007-11-21 14:01:49 -06:00
mpc8xx TQM885D: Exchanged SDRAM timing by a more relaxed timing. 2007-12-27 01:59:50 +01:00
mpc83xx Convert boards that set memory node to use fdt_fixup_memory() 2007-12-07 20:51:25 -05:00
mpc85xx Handle Asynchronous DDR clock on 85xx 2007-12-11 22:34:20 -06:00
mpc86xx Merge commit 'remotes/wd/master' 2007-11-20 14:34:57 -06:00
mpc512x powerpc: Backout relocation changes. 2007-11-17 01:38:58 +01:00
mpc824x powerpc: Backout relocation changes. 2007-11-17 01:38:58 +01:00
mpc8220 powerpc: Backout relocation changes. 2007-11-17 01:38:58 +01:00
mpc8260 Move do_fixup* for libfdt into common code 2007-11-21 14:01:49 -06:00
nios Minor alignment of output, 2nd try. 2007-08-12 21:34:34 +02:00
nios2 cpu/[7a-ln-z]*: Remove obsolete references to CONFIG_COMMANDS 2007-07-09 18:57:22 -05:00
ppc4xx ppc4xx: Add functionality to GPIO support 2008-01-04 11:38:45 +01:00
pxa Fix compiler warnings for ARM systems. 2007-11-18 17:11:09 +01:00
s3c44b0 Move "ar" flags to config.mk to allow for silent "make -s" 2006-10-09 01:02:05 +02:00
sa1100 Move "ar" flags to config.mk to allow for silent "make -s" 2006-10-09 01:02:05 +02:00
sh4 Fix coding style issues; update CHANGELOG. 2007-12-27 01:52:50 +01:00