summaryrefslogtreecommitdiff
path: root/arch/x86/cpu/ivybridge/sdram.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-07-11 09:30:55 -0600
committerBin Meng <bmeng.cn@gmail.com>2016-07-12 13:59:45 +0800
commit9532fe3b40ddf66ef976dee3d5cf1d8b3396bf4d (patch)
treec37ea0db6b611927f8083ba2a7f6f72ec2e2dbbf /arch/x86/cpu/ivybridge/sdram.c
parent215099a522dae18d4682964c6b850d12c45c98a0 (diff)
x86: link: Correct a failure in DRAM init
With the change to set up pinctrl after relocation, link fails to boot. Add a special case in the link code to handle this. Fixes: d8906c1f (x86: Probe pinctrl driver in cpu_init_r()) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/ivybridge/sdram.c')
-rw-r--r--arch/x86/cpu/ivybridge/sdram.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c
index 9d9f63d70c..e0b06b5ada 100644
--- a/arch/x86/cpu/ivybridge/sdram.c
+++ b/arch/x86/cpu/ivybridge/sdram.c
@@ -458,6 +458,11 @@ int dram_init(void)
struct udevice *dev, *me_dev;
int ret;
+ /* We need the pinctrl set up early */
+ ret = syscon_get_by_driver_data(X86_SYSCON_PINCONF, &dev);
+ if (ret)
+ return ret;
+
ret = uclass_first_device_err(UCLASS_NORTHBRIDGE, &dev);
if (ret)
return ret;