[U-Boot] spl: fix build failure with !CONFIG_SPL_PCI_SUPPORT

Tom Rini trini at konsulko.com
Thu Dec 13 00:47:32 UTC 2018


On Thu, Dec 06, 2018 at 03:40:08PM +0530, Sekhar Nori wrote:

> Building U-Boot with CONFIG_PCI and CONFIG_DM_PCI enabled, but
> CONFIG_SPL_PCI_SUPPORT disabled, results in following linker
> error:
> 
> lib/built-in.o: In function `fdtdec_get_pci_bar32':
> lib/fdtdec.c:305: undefined reference to `dm_pci_read_bar32'
> fdtdec.c:305:(.text.fdtdec_get_pci_bar32+0x24): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `dm_pci_read_bar32'
> 
> This is because reference to dm_pci_read_bar32() remains in lib/fdtdec.c
> while SPL build does not descend into drivers/pci directory in
> drivers/Makefile if CONFIG_SPL_PCI_SUPPORT is not enabled.
> 
> Fix this by applying appropriate #define guards in lib/fdtdec.c.
> It looks like ns16550.c has the same problem, so fixed that too.
> 
> To simplify this, CONFIG_SPL_PCI_SUPPORT is renamed to CONFIG_SPL_PCI
> (enables use of CONFIG_IS_ENABLED() macro).
> 
> Suggested-by: Vignesh R <vigneshr at ti.com>
> Signed-off-by: Sekhar Nori <nsekhar at ti.com>
> Reviewed-by: Lokesh Vutla <lokeshvutla at ti.com>
> Reviewed-by: Tom Rini <trini at konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181212/0786d667/attachment.sig>


More information about the U-Boot mailing list