diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2016-06-08 05:07:38 -0700 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2016-06-12 12:19:35 +0800 |
commit | d8906c1f3fd9e437066a9de7ff2de306696a7598 (patch) | |
tree | a0ab6abc799604470a526da2f56b7c68f79bf6fa /drivers | |
parent | 2f29c83eec16b806947c6a224c3a3f70bc31edc9 (diff) | |
download | u-boot-d8906c1f3fd9e437066a9de7ff2de306696a7598.tar.gz u-boot-d8906c1f3fd9e437066a9de7ff2de306696a7598.tar.xz u-boot-d8906c1f3fd9e437066a9de7ff2de306696a7598.zip |
x86: Probe pinctrl driver in cpu_init_r()
At present pinctrl driver gets probed in ich6_gpio driver's probe
routine, which has two issues:
- Pin's PADs only gets configured when GPIO driver is probed, which
is not done by default. This leaves the board in a partially
functional state as we must initialize PADs correctly to get
perepherals fully working.
- The probe routine of pinctrl driver is called multiple times, as
normally there are multiple GPIO controllers. It should really
be called just once.
Move the call to syscon_get_by_driver_data() from ich6_gpio driver
to cpu_init_r().
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: George McCollister <george.mccollister@gmail.com>
Tested-by: George McCollister <george.mccollister@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/intel_ich6_gpio.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/gpio/intel_ich6_gpio.c b/drivers/gpio/intel_ich6_gpio.c index 2d66d040f0..fd6181fa5a 100644 --- a/drivers/gpio/intel_ich6_gpio.c +++ b/drivers/gpio/intel_ich6_gpio.c @@ -32,7 +32,6 @@ #include <fdtdec.h> #include <pch.h> #include <pci.h> -#include <syscon.h> #include <asm/cpu.h> #include <asm/gpio.h> #include <asm/io.h> @@ -113,12 +112,6 @@ static int ich6_gpio_probe(struct udevice *dev) struct ich6_bank_platdata *plat = dev_get_platdata(dev); struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); struct ich6_bank_priv *bank = dev_get_priv(dev); - struct udevice *pinctrl; - int ret; - - /* Set up pin control if available */ - ret = syscon_get_by_driver_data(X86_SYSCON_PINCONF, &pinctrl); - debug("%s, pinctrl=%p, ret=%d\n", __func__, pinctrl, ret); uc_priv->gpio_count = GPIO_PER_BANK; uc_priv->bank_name = plat->bank_name; |