u-boot-brain/drivers
Stephen Warren 0c35e3a8b4 ARM: tegra: don't enable GPIOs until direction is set
Tegra's GPIO driver currently enables pins as GPIO as soon as they're
requested. This is not safe, since the desired direction and output value
are not yet known. This could cause a glitch on the output pins between
gpio_request() and gpio_direction_*(), depending on what values happen to
be in the GPIO controller's in/out and out-value registers vs. the final
desired configuration.

To solve this, defer enabling pins as GPIOs until some gpio_direction_*()
is invoked, and the desired configuration is explicitly programmed.

In theory this change could cause regressions, if code exists that claims
a GPIO, never explicitly sets a direction, and then gets/sets the GPIO
value based on that assumption. However, I've read through all the Tegra-
related board files and device drivers that touch GPIOs and I do not see
such buggy code anywhere.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-10-02 11:05:01 -07:00
..
bios_emulator biosemu: Do not free vga_info->BIOSImage when it is 0xc0000 2015-04-29 18:51:49 -06:00
block Move ALLOC_CACHE_ALIGN_BUFFER() to the new memalign.h header 2015-09-11 17:15:20 -04:00
bootcount qe: move immap_qe.h from arch directory into common directory 2014-07-22 16:25:54 -07:00
clk rockchip: rk3288: Add clock driver 2015-09-02 21:28:23 -06:00
core fdt: add new fdt address parsing functions 2015-09-15 07:57:13 -06:00
cpu x86: Move MP initialization codes into a common place 2015-07-14 18:03:16 -06:00
crypto Correct License and Copyright information on few files 2015-08-12 20:47:46 -04:00
ddr bitops: introduce BIT() definition 2015-09-11 17:15:32 -04:00
demo drivers: hierarchize drivers Kconfig menu 2015-08-12 20:47:44 -04:00
dfu dfu: mmc: buffer file reads too 2015-09-11 17:15:23 -04:00
dma dma: lpc32xx: add DMA driver 2015-08-18 13:45:55 -04:00
fpga arm: socfpga: Fix FPGA bitstream programming routine 2015-08-08 14:14:04 +02:00
gpio ARM: tegra: don't enable GPIOs until direction is set 2015-10-02 11:05:01 -07:00
hwmon dtt: add ds620 support 2015-04-10 14:23:23 +02:00
i2c arm: Remove unused ST-Ericsson u8500 arch 2015-09-15 15:05:21 -04:00
input x86: i8042: Correctly initialize the controller 2015-08-26 07:54:16 -07:00
led dm: led: Tidy up SPL options for the led and led-gpio 2015-09-02 21:28:22 -06:00
memory ARM: keystone: aemif: move aemif driver to drivers/memory/ti-aemif.c 2014-06-19 17:53:58 -04:00
misc driver: misc: correct Kconfig entry 2015-09-11 14:05:34 -04:00
mmc mmc: dw_mmc: Increase timeout to 4 minutes (as in Linux kernel) 2015-09-28 11:03:56 -04:00
mtd mtd: nand: mxs check maximum ecc that platfrom supports 2015-09-20 09:59:54 +02:00
net drivers/net/vsc9953: Add GPL-2.0+ SPDX-License-Identifier 2015-09-21 08:29:48 -07:00
pci dm: pci: Add an inline API to test if a device is on a PCI bus 2015-09-16 19:53:52 -06:00
pcmcia powerpc: mpc824x: remove MPC824X cpu support 2015-01-05 12:08:55 -05:00
pinctrl ARM: uniphier: rename CONFIG_MACH_* to CONFIG_ARCH_UNIPHIER_* 2015-09-25 00:27:53 +09:00
power Merge git://git.denx.de/u-boot-rockchip 2015-09-03 14:57:09 -04:00
pwm pwm: imx: Remove unreachable code 2015-05-26 14:13:12 +02:00
qe driver/qe: use strncpy instead of strcpy 2015-08-03 12:06:36 -07:00
ram ram: rename CONFIG_SPL_RAM_SUPPORT to CONFIG_SPL_RAM 2015-08-18 13:46:02 -04:00
rtc rtc:ds3232/ds3231: Add support to generate 32KHz output 2015-09-01 21:37:23 -05:00
serial arm: Remove unused ST-Ericsson u8500 arch 2015-09-15 15:05:21 -04:00
soc soc: keystone_serdes: generalize configuration mechanism 2014-10-23 11:27:28 -04:00
sound of: clean up OF_CONTROL ifdef conditionals 2015-08-18 13:46:05 -04:00
spi bitops: introduce BIT() definition 2015-09-11 17:15:32 -04:00
thermal thermal: imx_thermal: Do not print on error 2015-09-13 10:49:21 +02:00
tpm dm: tpm: Convert LPC driver to driver model 2015-08-31 07:57:28 -06:00
twserial drivers: convert makefiles to Kbuild style 2013-10-31 13:26:01 -04:00
usb arm: Remove unused ST-Ericsson u8500 arch 2015-09-15 15:05:21 -04:00
video bitops: introduce BIT() definition 2015-09-11 17:15:32 -04:00
watchdog imx: wdog: correct wcr register settings 2015-09-20 09:39:35 +02:00
Kconfig pinctrl: add pin control uclass support 2015-08-31 07:57:29 -06:00
Makefile pinctrl: add pin control uclass support 2015-08-31 07:57:29 -06:00