[Top] [All Lists]

[PATCH] bcm63xx: fix build failures when CONFIG_PCI is disabled

To: Ralf Baechle <>
Subject: [PATCH] bcm63xx: fix build failures when CONFIG_PCI is disabled
From: Florian Fainelli <>
Date: Tue, 4 Aug 2009 22:14:39 +0200
Cc:, Maxime Bizon <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:received:received:sender:from:date:subject :mime-version:x-uid:x-length:to:cc:content-type :content-transfer-encoding:content-disposition:message-id; bh=ZCiccbw7UyLTYrhvCl/Kv9USpi6cQ5rZ44Hk2b8R2QY=; b=c7BLSqMC9zEoYI091fpEY+v5vemvV/OlBR3XkTBE4fTA2doo1NvoXnqeCoCMcQwCOJ H3lF5VR9P3TYAuCaZ8z7tsZPbmNwIjlrEsW1FlST7nO7jbNdyJKrV9n/SX7bxiTwYKcg km9QtS0imSv90S9hmrDzldjOMkd7CVCm+PjNw=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=sender:from:date:subject:mime-version:x-uid:x-length:to:cc :content-type:content-transfer-encoding:content-disposition :message-id; b=eViOqueMecAqgmqCUCs1wz51Tpw1o5i1QZzQLeD8xWoqeeOBqdHpAgY2CMgYNFzJpi 0sx+PNn5CL4+9hLFYFk0X4rKRlQYZOE4nxNzpyuGlkCGWhcL9I3+4/dtNEXtTTeH2+Dq +daoglAugWPM9Ieq8bTi1R3apwzvANS2UI7VE=
Original-recipient: rfc822;
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

Signed-off-by: Florian Fainelli <>
diff --git a/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;
        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
 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,
  * 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 */
        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");
        /* read base address of boot chip select (0) */
        val = bcm_mpi_readl(MPI_CSBASE_REG(0));

<Prev in Thread] Current Thread [Next in Thread>