x86: link: Correct a failure in DRAM init
authorSimon Glass <sjg@chromium.org>
Mon, 11 Jul 2016 15:30:55 +0000 (09:30 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 12 Jul 2016 05:59:45 +0000 (13:59 +0800)
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>
arch/x86/cpu/ivybridge/sdram.c

index 9d9f63d70c6974bd523c43190c47c77bc926825a..e0b06b5ada56a7aab20466c6ffdad3d60549fa37 100644 (file)
@@ -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;