]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
vexpress64: compile Juno PCIe conditionally
authorRyan Harkin <ryan.harkin@linaro.org>
Wed, 18 Nov 2015 10:39:06 +0000 (10:39 +0000)
committerTom Rini <trini@konsulko.com>
Sun, 22 Nov 2015 02:50:27 +0000 (21:50 -0500)
Only compile in PCIe support if the board really uses it. Provide
a __weak stub for the init function if e.g. FVP is being built.

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
board/armltd/vexpress64/Makefile
board/armltd/vexpress64/pcie.c
board/armltd/vexpress64/vexpress64.c

index a35db401b684347bd9133a9d8aa018a6159e82f5..b4391a71249a0af2a19694acce3ddb969b2346d3 100644 (file)
@@ -5,4 +5,5 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-y  := vexpress64.o pcie.o
+obj-y  := vexpress64.o
+obj-$(CONFIG_TARGET_VEXPRESS64_JUNO)   += pcie.o
index eb23dd5b4878c3c59e5a71b6884fb7615a59cffd..b3fb09ca67c5209afdc816f3ff147e2e6c08e4e1 100644 (file)
@@ -191,7 +191,5 @@ void xr3pci_init(void)
 
 void vexpress64_pcie_init(void)
 {
-#ifdef CONFIG_TARGET_VEXPRESS64_JUNO
        xr3pci_init();
-#endif
 }
index f4e80840b2ec9a086914b300590e2e54aaa1f083..3add099fd9a3af70e5af6feb05cf1c5eb1e17922 100644 (file)
@@ -28,6 +28,13 @@ U_BOOT_DEVICE(vexpress_serials) = {
        .platdata = &serial_platdata,
 };
 
+/* This function gets replaced by platforms supporting PCIe.
+ * The replacement function, eg. on Juno, initialises the PCIe bus.
+ */
+__weak void vexpress64_pcie_init(void)
+{
+}
+
 int board_init(void)
 {
        vexpress64_pcie_init();