Skip to content

Commit

Permalink
vexpress64: compile Juno PCIe conditionally
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Linus Walleij <[email protected]>
  • Loading branch information
Ryan Harkin authored and trini committed Nov 22, 2015
1 parent 0ee1a22 commit bc8d3bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion board/armltd/vexpress64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions board/armltd/vexpress64/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,5 @@ void xr3pci_init(void)

void vexpress64_pcie_init(void)
{
#ifdef CONFIG_TARGET_VEXPRESS64_JUNO
xr3pci_init();
#endif
}
7 changes: 7 additions & 0 deletions board/armltd/vexpress64/vexpress64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit bc8d3bc

Please sign in to comment.