Map the expansion bus registers.

This commit is contained in:
scw 2003-10-23 09:32:17 +00:00
parent 0df102009a
commit 41e7743573
2 changed files with 19 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ixp425.c,v 1.6 2003/10/08 14:55:04 scw Exp $ */
/* $NetBSD: ixp425.c,v 1.7 2003/10/23 09:32:17 scw Exp $ */
/*
* Copyright (c) 2003
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ixp425.c,v 1.6 2003/10/08 14:55:04 scw Exp $");
__KERNEL_RCSID(0, "$NetBSD: ixp425.c,v 1.7 2003/10/23 09:32:17 scw Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -74,6 +74,13 @@ ixp425_attach(struct ixp425_softc *sc)
0, &sc->sc_gpio_ioh))
panic("%s: unable to map GPIO registers", sc->sc_dev.dv_xname);
/*
* Mapping for Expansion Bus Registers
*/
if (bus_space_map(sc->sc_iot, IXP425_EXP_HWBASE, IXP425_EXP_SIZE,
0, &sc->sc_exp_ioh))
panic("%s: unable to map EXP registers", sc->sc_dev.dv_xname);
/*
* Invoke the board-specific PCI initialization code
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: ixp425var.h,v 1.5 2003/10/08 14:55:04 scw Exp $ */
/* $NetBSD: ixp425var.h,v 1.6 2003/10/23 09:32:17 scw Exp $ */
/*
* Copyright (c) 2003
@ -58,6 +58,13 @@
#define GPIO_CONF_READ_4(sc, reg) \
bus_space_read_4(sc->sc_iot, sc->sc_gpio_ioh, reg)
#define EXP_CSR_WRITE_4(sc, reg, data) \
bus_space_write_4(sc->sc_iot, sc->sc_exp_ioh, \
reg, data)
#define EXP_CSR_READ_4(sc, reg) \
bus_space_read_4(sc->sc_iot, sc->sc_exp_ioh, reg)
#define PCI_CONF_LOCK(s) (s) = disable_interrupts(I32_bit)
#define PCI_CONF_UNLOCK(s) restore_interrupts((s))
@ -70,7 +77,8 @@ struct ixp425_softc {
/* Handles for the various subregions. */
bus_space_handle_t sc_pci_ioh; /* PCI mem handler */
bus_space_handle_t sc_gpio_ioh; /* GPIOs handler */
bus_space_handle_t sc_gpio_ioh; /* GPIOs handler */
bus_space_handle_t sc_exp_ioh; /* Expansion Bus handler */
/* Bus space, DMA, and PCI tags for the PCI bus */
struct bus_space sc_pci_iot;