x86: Probe pinctrl driver in cpu_init_r()
authorBin Meng <bmeng.cn@gmail.com>
Wed, 8 Jun 2016 12:07:38 +0000 (05:07 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Sun, 12 Jun 2016 04:19:35 +0000 (12:19 +0800)
commitd8906c1f3fd9e437066a9de7ff2de306696a7598
treea0ab6abc799604470a526da2f56b7c68f79bf6fa
parent2f29c83eec16b806947c6a224c3a3f70bc31edc9
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>
arch/x86/cpu/cpu.c
drivers/gpio/intel_ich6_gpio.c