From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatolij Gustschin Date: Fri, 2 Dec 2011 00:08:55 +0100 Subject: [U-Boot] [PATCH] tegra2: Use new GPIO APIs in gpio_config_uart() In-Reply-To: <1317941542-19690-1-git-send-email-swarren@nvidia.com> References: <1317941542-19690-1-git-send-email-swarren@nvidia.com> Message-ID: <20111202000855.110a1102@wker> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stephen, On Thu, 6 Oct 2011 16:52:22 -0600 Stephen Warren 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 > --- > 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