From: Florian Fainelli <florian@openwrt.org>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, Maxime Bizon <mbizon@freebox.fr>
Subject: [PATCH] bcm63xx: fix build failures when CONFIG_PCI is disabled
Date: Tue, 4 Aug 2009 22:14:39 +0200 [thread overview]
Message-ID: <200908042214.39866.florian@openwrt.org> (raw)
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));
next reply other threads:[~2009-08-04 20:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-04 20:14 Florian Fainelli [this message]
2009-08-08 11:10 ` [PATCH] bcm63xx: fix build failures when CONFIG_PCI is disabled Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200908042214.39866.florian@openwrt.org \
--to=florian@openwrt.org \
--cc=linux-mips@linux-mips.org \
--cc=mbizon@freebox.fr \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).