
Hi Stephen,
On Thu, 6 Oct 2011 16:52:22 -0600 Stephen Warren swarren@nvidia.com wrote:
... rather than open-coding the register accesses.
However, gpio_request() typically stores the "label" parameter in a global data structure. This causes problems when called from gpio_config_uart(), since the code is running before relocation. To solve this, pass a NULL string to gpio_request(), and modify gpio_request() not to touch the string if it's NULL.
Signed-off-by: Stephen Warren swarren@nvidia.com
I tested this on Seaboard. With the code in the patch below, the UART works. If I comment out the body of gpio_config_uart_seaboard(), the UART does not work.
This patch should work with ToT U-Boot, but the context relies on the rename of gpio_config_uart() to gpio_config_uart_seaboard() contained in: http://patchwork.ozlabs.org/patch/118144/
board/nvidia/seaboard/seaboard.c | 18 ++---------------- drivers/gpio/tegra2_gpio.c | 6 ++++-- 2 files changed, 6 insertions(+), 18 deletions(-)
This patch doesn't apply cleanly. There were a lot of tegra2 patches, so I'm not sure if it is not superseded by some newer patches. Can you please check and if the patch is needed, then re-base and resubmit. Thanks!
Anatolij