* [PATCH] bcm63xx: fix build failures when CONFIG_PCI is disabled
@ 2009-08-04 20:14 Florian Fainelli
2009-08-08 11:10 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2009-08-04 20:14 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, Maxime Bizon
This patch fixes multiple build failures when CONFIG_PCI
is disabled. Since bcm63xx_sprom depends on CONFIG_SSB_PCIHOST
to be set, which depends on CONFIG_PCI, bcm63xx_sprom
would be unused thus causing this direct warning treated
as an error:
cc1: warnings being treated as errors
arch/mips/bcm63xx/boards/board_bcm963xx.c:466: warning: 'bcm63xx_sprom' defined but not used
Then bcm63xx_pci_enabled would not be resolved since it
is declared in arch/mips/pci/pci-bcm63xx.c which is not
compiled due to CONFIG_PCI being disabled. Finally,
ssb_set_arch_fallback would not be resolved too, since
CONFIG_SSB_PCIHOST is disabled.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c
index 5add08b..683873d 100644
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -344,11 +344,13 @@ void __init board_prom_init(void)
* inside arch_initcall */
val = 0;
+#ifdef CONFIG_PCI
if (board.has_pci) {
bcm63xx_pci_enabled = 1;
if (BCMCPU_IS_6348())
val |= GPIO_MODE_6348_G2_PCI;
}
+#endif
if (board.has_pccard) {
if (BCMCPU_IS_6348())
@@ -463,6 +465,7 @@ static struct platform_device mtd_dev = {
* Register a sane SPROMv2 to make the on-board
* bcm4318 WLAN work
*/
+#ifdef CONFIG_SSB_PCIHOST
static struct ssb_sprom bcm63xx_sprom = {
.revision = 0x02,
.board_rev = 0x17,
@@ -483,6 +486,7 @@ static struct ssb_sprom bcm63xx_sprom = {
.boardflags_lo = 0x2848,
.boardflags_hi = 0x0000,
};
+#endif
/*
* third stage init callback, register all board devices.
@@ -512,12 +516,14 @@ int __init board_register_devices(void)
/* Generate MAC address for WLAN and
* register our SPROM */
+#ifdef CONFIG_SSB_PCIHOST
if (!board_get_mac_address(bcm63xx_sprom.il0mac)) {
memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
if (ssb_arch_set_fallback_sprom(&bcm63xx_sprom) < 0)
printk(KERN_ERR "failed to register fallback SPROM\n");
}
+#endif
/* read base address of boot chip select (0) */
val = bcm_mpi_readl(MPI_CSBASE_REG(0));
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bcm63xx: fix build failures when CONFIG_PCI is disabled
2009-08-04 20:14 [PATCH] bcm63xx: fix build failures when CONFIG_PCI is disabled Florian Fainelli
@ 2009-08-08 11:10 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2009-08-08 11:10 UTC (permalink / raw)
To: Florian Fainelli; +Cc: linux-mips, Maxime Bizon
On Tue, Aug 04, 2009 at 10:14:39PM +0200, Florian Fainelli wrote:
> This patch fixes multiple build failures when CONFIG_PCI
> is disabled. Since bcm63xx_sprom depends on CONFIG_SSB_PCIHOST
> to be set, which depends on CONFIG_PCI, bcm63xx_sprom
> would be unused thus causing this direct warning treated
> as an error:
>
> cc1: warnings being treated as errors
> arch/mips/bcm63xx/boards/board_bcm963xx.c:466: warning: 'bcm63xx_sprom' defined but not used
>
> Then bcm63xx_pci_enabled would not be resolved since it
> is declared in arch/mips/pci/pci-bcm63xx.c which is not
> compiled due to CONFIG_PCI being disabled. Finally,
> ssb_set_arch_fallback would not be resolved too, since
> CONFIG_SSB_PCIHOST is disabled.
Thanks. Folded into "MIPS: BCM63XX: Add board support code."
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-08 11:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-04 20:14 [PATCH] bcm63xx: fix build failures when CONFIG_PCI is disabled Florian Fainelli
2009-08-08 11:10 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.