Files
u-boot-tk1-som/include
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
..
2003-06-27 21:31:46 +00:00
2005-09-25 16:59:36 +02:00
2006-07-21 15:24:56 +02:00
2007-09-17 08:19:08 +02:00
2007-11-15 08:46:46 -07:00
2007-10-31 21:20:49 +01:00
2003-06-27 21:31:46 +00:00
2007-10-31 21:20:49 +01:00
2006-08-15 14:15:51 +02:00
2006-08-23 10:39:01 -05:00
2006-08-15 14:15:51 +02:00
2003-06-27 21:31:46 +00:00
2005-10-04 23:10:28 +02:00
2007-08-14 18:42:36 +02:00
2004-10-10 18:03:33 +00:00
2007-05-15 23:38:05 +02:00
2005-10-05 02:00:09 +02:00
2002-03-14 16:44:03 +00:00
2006-07-12 15:26:01 +02:00
2000-11-12 23:38:42 +00:00
2006-04-16 10:51:58 +02:00
2007-12-11 22:34:20 -06:00
2004-12-16 17:33:10 +00:00
2003-06-27 21:31:46 +00:00
2007-12-07 20:51:25 -05:00
2007-11-26 19:18:21 +01:00
2005-10-13 16:45:02 +02:00
2002-11-03 00:07:02 +00:00
2003-05-31 18:35:21 +00:00
2002-08-27 10:38:37 +00:00
2001-11-03 22:15:16 +00:00
2007-08-10 19:21:35 -04:00
2002-09-17 21:37:55 +00:00
2003-06-27 21:31:46 +00:00
2004-08-02 23:39:03 +00:00
2003-06-27 21:31:46 +00:00
2003-06-27 21:31:46 +00:00
2001-04-28 17:59:11 +00:00
2003-06-27 21:31:46 +00:00
2007-08-13 23:22:31 -04:00
2004-10-10 21:27:30 +00:00
2004-05-19 21:33:14 +00:00
2003-10-08 23:26:14 +00:00
2006-07-19 13:50:38 +02:00
2002-04-01 14:29:03 +00:00
2007-09-17 08:19:08 +02:00
2007-10-23 16:40:40 +02:00
2007-07-20 15:03:03 +02:00
2000-07-19 14:09:16 +00:00
2004-03-25 15:14:43 +00:00
2001-04-09 21:43:07 +00:00
2003-06-27 21:31:46 +00:00
2006-06-26 10:54:52 +02:00
2001-04-28 17:59:11 +00:00
2002-03-27 13:48:44 +00:00
2003-06-27 21:31:46 +00:00
2007-06-30 18:50:48 +02:00
2003-06-27 21:31:46 +00:00
2003-06-27 21:31:46 +00:00
2007-10-31 21:20:49 +01:00
2007-07-10 00:01:28 +02:00
2005-09-22 09:04:17 +02:00
2003-06-27 21:31:46 +00:00
2002-09-26 02:01:47 +00:00
2007-10-13 21:15:39 +02:00
2003-06-27 21:31:46 +00:00
2004-02-23 16:11:30 +00:00
2004-12-16 21:44:03 +00:00
2006-06-14 18:14:56 +02:00
2007-06-06 10:08:13 +02:00
2006-06-14 18:14:56 +02:00
2006-06-14 17:45:53 +02:00
2006-06-14 18:14:56 +02:00
2001-11-03 22:21:15 +00:00
2003-06-27 21:31:46 +00:00
2000-10-25 11:24:22 +00:00
2002-11-03 00:38:21 +00:00
2001-11-03 22:21:15 +00:00
2002-11-03 00:24:07 +00:00
2002-03-08 21:31:05 +00:00
2005-09-23 11:05:55 +02:00
2006-07-21 15:24:56 +02:00
2003-06-27 21:31:46 +00:00