Sun Sep 16 12:10:57 2012 UTC ()
Be consistent with applying __HAVE_PCI_CONF_HOOK around bcmpax_conf_hook
implementation as well.  Fixes build for BCM5301X evbarm kernel.


(he)
diff -r1.2 -r1.3 src/sys/arch/arm/broadcom/bcm53xx_pax.c

cvs diff -r1.2 -r1.3 src/sys/arch/arm/broadcom/bcm53xx_pax.c (expand / switch to unified diff)

--- src/sys/arch/arm/broadcom/bcm53xx_pax.c 2012/09/14 04:53:58 1.2
+++ src/sys/arch/arm/broadcom/bcm53xx_pax.c 2012/09/16 12:10:57 1.3
@@ -23,27 +23,27 @@ @@ -23,27 +23,27 @@
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 * POSSIBILITY OF SUCH DAMAGE. 27 * POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30#define PCIE_PRIVATE 30#define PCIE_PRIVATE
31 31
32#include "locators.h" 32#include "locators.h"
33 33
34#include <sys/cdefs.h> 34#include <sys/cdefs.h>
35 35
36__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.2 2012/09/14 04:53:58 matt Exp $"); 36__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.3 2012/09/16 12:10:57 he Exp $");
37 37
38#include <sys/bus.h> 38#include <sys/bus.h>
39#include <sys/device.h> 39#include <sys/device.h>
40#include <sys/extent.h> 40#include <sys/extent.h>
41#include <sys/intr.h> 41#include <sys/intr.h>
42#include <sys/systm.h> 42#include <sys/systm.h>
43 43
44#include <dev/pci/pcireg.h> 44#include <dev/pci/pcireg.h>
45#include <dev/pci/pcivar.h> 45#include <dev/pci/pcivar.h>
46#include <dev/pci/pciconf.h> 46#include <dev/pci/pciconf.h>
47 47
48#include <arm/broadcom/bcm53xx_reg.h> 48#include <arm/broadcom/bcm53xx_reg.h>
49#include <arm/broadcom/bcm53xx_var.h> 49#include <arm/broadcom/bcm53xx_var.h>
@@ -357,34 +357,36 @@ bcmpax_conf_write(void *v, pcitag_t tag, @@ -357,34 +357,36 @@ bcmpax_conf_write(void *v, pcitag_t tag,
357 bcmpax_write_4(sc, data_reg, val); 357 bcmpax_write_4(sc, data_reg, val);
358 //printf(" %#x\n", val); 358 //printf(" %#x\n", val);
359 } 359 }
360 360
361 mutex_exit(sc->sc_cfg_lock); 361 mutex_exit(sc->sc_cfg_lock);
362} 362}
363 363
364static void 364static void
365bcmpax_conf_interrupt(void *v, int bus, int dev, int ipin, int swiz, int *ilinep) 365bcmpax_conf_interrupt(void *v, int bus, int dev, int ipin, int swiz, int *ilinep)
366{ 366{
367 *ilinep = 5; /* (ipin + swiz) & 3; */ 367 *ilinep = 5; /* (ipin + swiz) & 3; */
368} 368}
369 369
 370#ifdef __HAVE_PCI_CONF_HOOK
370static int 371static int
371bcmpax_conf_hook(void *v, int bus, int dev, int func, pcireg_t id) 372bcmpax_conf_hook(void *v, int bus, int dev, int func, pcireg_t id)
372{ 373{
373 if (func > 0) 374 if (func > 0)
374 return 0; 375 return 0;
375 376
376 return PCI_CONF_ENABLE_MEM | PCI_CONF_MAP_MEM; 377 return PCI_CONF_ENABLE_MEM | PCI_CONF_MAP_MEM;
377} 378}
 379#endif
378 380
379static int 381static int
380bcmpax_intr_map(const struct pci_attach_args *pa, pci_intr_handle_t *pihp) 382bcmpax_intr_map(const struct pci_attach_args *pa, pci_intr_handle_t *pihp)
381{ 383{
382 return EINVAL; 384 return EINVAL;
383} 385}
384 386
385static const char * 387static const char *
386bcmpax_intr_string(void *v, pci_intr_handle_t pih) 388bcmpax_intr_string(void *v, pci_intr_handle_t pih)
387{ 389{
388 return NULL; 390 return NULL;
389} 391}
390 392