Skip to contentSkip to conversation

x86: quark: Fix boot breakage

PATCH In review Bin Meng 3 participants 4 messages Jan 18, 2016 – Jan 19, 2016 x86

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 x86: quark: Fix boot breakage

With driver model timer conversion, quark based board does not boot any more as mdelay() is called during quark_pcie_early_init() which is before driver model gets initialized. Fix this breakage.

---

 arch/x86/cpu/quark/quark.c | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)
arch/x86/cpu/quark/quark.c +16 -11
index 37ce394..72c681d 100644
@@ -252,17 +252,6 @@ int arch_cpu_init(void)
 	 */
 	quark_setup_bars();
 
-	/*
-	 * Initialize PCIe controller
-	 *
-	 * Quark SoC holds the PCIe controller in reset following a power on.
-	 * U-Boot needs to release the PCIe controller from reset. The PCIe
-	 * controller (D23:F0/F1) will not be visible in PCI configuration
-	 * space and any access to its PCI configuration registers will cause
-	 * system hang while it is held in reset.
-	 */
-	quark_pcie_early_init();
-
 	/* Initialize USB2 PHY */
 	quark_usb_early_init();
 
@@ -277,6 +266,22 @@ int arch_cpu_init(void)
 	return 0;
 }
 
+int arch_cpu_init_dm(void)
+{
+	/*
+	 * Initialize PCIe controller
+	 *
+	 * Quark SoC holds the PCIe controller in reset following a power on.
+	 * U-Boot needs to release the PCIe controller from reset. The PCIe
+	 * controller (D23:F0/F1) will not be visible in PCI configuration
+	 * space and any access to its PCI configuration registers will cause
+	 * system hang while it is held in reset.
+	 */
+	quark_pcie_early_init();
+
+	return 0;
+}
+
 int print_cpuinfo(void)
 {
 	post_code(POST_CPU_INFO);
Signature · 1 line
1.8.2.1
#1 lore raw

PATCH 1/1 x86: quark: Fix boot breakage

Quoted 9 lines · Bin Meng

With driver model timer conversion, quark based board does not boot any more as mdelay() is called during quark_pcie_early_init() which is before driver model gets initialized. Fix this breakage.

---

 arch/x86/cpu/quark/quark.c | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)
author
#2 lore raw

PATCH 1/1 x86: quark: Fix boot breakage

Hi Tom,

Quoted 5 lines · Simon Glass
Quoted 4 lines · Bin Meng

With driver model timer conversion, quark based board does not boot any more as mdelay() is called during quark_pcie_early_init() which is before driver model gets initialized. Fix this breakage.

Quoted 7 lines
Quoted 5 lines

---

 arch/x86/cpu/quark/quark.c | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

Can you apply this directly?

Regards,
Bin

#3 lore raw
In reply to Bin Meng
Quoted 6 lines · Bin Meng

With driver model timer conversion, quark based board does not boot any more as mdelay() is called during quark_pcie_early_init() which is before driver model gets initialized. Fix this breakage.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160119/d40623fa/attachment.sig>