-/* $OpenBSD: fdt.h,v 1.3 2016/07/13 20:42:44 patrick Exp $ */
+/* $OpenBSD: fdt.h,v 1.4 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright (c) 2016 Patrick Wildt <patrick@blueri.se>
*
int fa_node;
bus_space_tag_t fa_iot;
bus_dma_tag_t fa_dmat;
- uint32_t *fa_reg;
+ struct fdt_reg *fa_reg;
int fa_nreg;
uint32_t *fa_intr;
int fa_nintr;
-/* $OpenBSD: simplebus.c,v 1.7 2016/07/18 11:53:32 patrick Exp $ */
+/* $OpenBSD: simplebus.c,v 1.8 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright (c) 2016 Patrick Wildt <patrick@blueri.se>
*
#include <sys/malloc.h>
#include <dev/ofw/openfirm.h>
+#include <dev/ofw/fdt.h>
#include <arm/fdt.h>
struct simplebus_softc *sc = (struct simplebus_softc *)self;
struct fdt_attach_args fa;
char buffer[128];
- int len;
+ int i, len, line;
+ uint32_t *cell, *reg;
if (!OF_getprop(node, "compatible", buffer, sizeof(buffer)))
return;
fa.fa_scells = sc->sc_scells;
len = OF_getproplen(node, "reg");
- if (len > 0 && (len % sizeof(uint32_t)) == 0) {
- fa.fa_reg = malloc(len, M_DEVBUF, M_WAITOK);
- fa.fa_nreg = len / sizeof(uint32_t);
-
- OF_getpropintarray(node, "reg", fa.fa_reg, len);
+ line = (sc->sc_acells + sc->sc_scells) * sizeof(uint32_t);
+ if (len > 0 && line > 0 && (len % line) == 0) {
+ reg = malloc(len, M_TEMP, M_WAITOK);
+ OF_getpropintarray(node, "reg", reg, len);
+
+ fa.fa_reg = malloc((len / line) * sizeof(struct fdt_reg),
+ M_DEVBUF, M_WAITOK | M_ZERO);
+ fa.fa_nreg = (len / line);
+
+ for (i = 0, cell = reg; i < len / line; i++) {
+ if (sc->sc_acells >= 1)
+ fa.fa_reg[i].addr = cell[0];
+ if (sc->sc_acells == 2) {
+ fa.fa_reg[i].addr <<= 32;
+ fa.fa_reg[i].addr |= cell[1];
+ }
+ cell += sc->sc_acells;
+ if (sc->sc_scells >= 1)
+ fa.fa_reg[i].size = cell[0];
+ if (sc->sc_scells == 2) {
+ fa.fa_reg[i].size <<= 32;
+ fa.fa_reg[i].size |= cell[1];
+ }
+ cell += sc->sc_scells;
+ }
+
+ free(reg, M_TEMP, len);
}
len = OF_getproplen(node, "interrupts");
config_found(self, &fa, NULL);
- free(fa.fa_reg, M_DEVBUF, fa.fa_nreg * sizeof(uint32_t));
+ free(fa.fa_reg, M_DEVBUF, fa.fa_nreg * sizeof(struct fdt_reg));
free(fa.fa_intr, M_DEVBUF, fa.fa_nintr * sizeof(uint32_t));
}
-/* $OpenBSD: if_fec.c,v 1.10 2016/07/23 14:39:10 kettenis Exp $ */
+/* $OpenBSD: if_fec.c,v 1.11 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
*
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_gpio.h>
+#include <dev/ofw/fdt.h>
/* configuration registers */
#define ENET_EIR 0x004
uint32_t phy_reset_gpio[3];
uint32_t phy_reset_duration;
- if (faa->fa_nreg < 2)
+ if (faa->fa_nreg < 1)
return;
if (OF_getpropintarray(faa->fa_node, "interrupts-extended",
sc->sc_node = faa->fa_node;
sc->sc_iot = faa->fa_iot;
- if (bus_space_map(sc->sc_iot, faa->fa_reg[0],
- faa->fa_reg[1], 0, &sc->sc_ioh))
+ if (bus_space_map(sc->sc_iot, faa->fa_reg[0].addr,
+ faa->fa_reg[0].size, 0, &sc->sc_ioh))
panic("fec_attach: bus_space_map failed!");
sc->sc_dma_tag = faa->fa_dmat;
txdma:
fec_dma_free(sc, &sc->txdma);
bad:
- bus_space_unmap(sc->sc_iot, sc->sc_ioh, faa->fa_reg[1]);
+ bus_space_unmap(sc->sc_iot, sc->sc_ioh, faa->fa_reg[0].size);
}
void
-/* $OpenBSD: imxahci.c,v 1.5 2016/07/12 19:17:49 kettenis Exp $ */
+/* $OpenBSD: imxahci.c,v 1.6 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright (c) 2013 Patrick Wildt <patrick@blueri.se>
*
#include <armv7/imx/imxiomuxcvar.h>
#include <dev/ofw/openfirm.h>
+#include <dev/ofw/fdt.h>
/* registers */
#define SATA_CAP 0x000
struct fdt_attach_args *faa = aux;
uint32_t timeout = 0x100000;
- if (faa->fa_nreg < 2 || faa->fa_nintr < 3)
+ if (faa->fa_nreg < 1 || faa->fa_nintr < 3)
return;
sc->sc_iot = faa->fa_iot;
- sc->sc_ios = faa->fa_reg[1];
+ sc->sc_ios = faa->fa_reg[0].size;
sc->sc_dmat = faa->fa_dmat;
- if (bus_space_map(sc->sc_iot, faa->fa_reg[0],
- faa->fa_reg[1], 0, &sc->sc_ioh))
+ if (bus_space_map(sc->sc_iot, faa->fa_reg[0].addr,
+ faa->fa_reg[0].size, 0, &sc->sc_ioh))
panic("imxahci_attach: bus_space_map failed!");
sc->sc_ih = arm_intr_establish(faa->fa_intr[1], IPL_BIO,
-/* $OpenBSD: imxdog.c,v 1.3 2016/06/13 23:43:58 kettenis Exp $ */
+/* $OpenBSD: imxdog.c,v 1.4 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
*
#include <machine/fdt.h>
#include <dev/ofw/openfirm.h>
+#include <dev/ofw/fdt.h>
#include <armv7/armv7/armv7var.h>
struct fdt_attach_args *faa = aux;
struct imxdog_softc *sc = (struct imxdog_softc *) self;
- if (faa->fa_nreg < 2)
+ if (faa->fa_nreg < 1)
return;
sc->sc_iot = faa->fa_iot;
- if (bus_space_map(sc->sc_iot, faa->fa_reg[0],
- faa->fa_reg[1], 0, &sc->sc_ioh))
+ if (bus_space_map(sc->sc_iot, faa->fa_reg[0].addr,
+ faa->fa_reg[0].size, 0, &sc->sc_ioh))
panic("imxdog_attach: bus_space_map failed!");
printf("\n");
-/* $OpenBSD: imxehci.c,v 1.13 2016/07/13 09:12:46 kettenis Exp $ */
+/* $OpenBSD: imxehci.c,v 1.14 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
*
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_gpio.h>
+#include <dev/ofw/fdt.h>
#include <dev/usb/ehcireg.h>
#include <dev/usb/ehcivar.h>
uint32_t vbus;
int node;
- if (faa->fa_nreg < 2 || faa->fa_nintr < 3)
+ if (faa->fa_nreg < 1 || faa->fa_nintr < 3)
return;
if (OF_getpropintarray(faa->fa_node, "fsl,usbphy",
sc->sc.iot = faa->fa_iot;
sc->sc.sc_bus.dmatag = faa->fa_dmat;
- sc->sc.sc_size = faa->fa_reg[1] - USB_EHCI_OFFSET;
+ sc->sc.sc_size = faa->fa_reg[0].size - USB_EHCI_OFFSET;
/* Map I/O space */
- if (bus_space_map(sc->sc.iot, faa->fa_reg[0],
- faa->fa_reg[1], 0, &sc->uh_ioh)) {
+ if (bus_space_map(sc->sc.iot, faa->fa_reg[0].addr,
+ faa->fa_reg[0].size, 0, &sc->uh_ioh)) {
printf(": cannot map mem space\n");
goto out;
}
bus_space_unmap(sc->sc.iot, sc->ph_ioh, phy_reg[1]);
mem1:
mem0:
- bus_space_unmap(sc->sc.iot, sc->sc.ioh, faa->fa_reg[1]);
+ bus_space_unmap(sc->sc.iot, sc->sc.ioh, faa->fa_reg[0].size);
sc->sc.sc_size = 0;
out:
return;
-/* $OpenBSD: imxesdhc.c,v 1.25 2016/07/11 14:54:18 kettenis Exp $ */
+/* $OpenBSD: imxesdhc.c,v 1.26 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright (c) 2009 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_gpio.h>
+#include <dev/ofw/fdt.h>
/* registers */
#define SDHC_DS_ADDR 0x00
uint32_t caps;
uint32_t width;
- if (faa->fa_nreg < 2 || faa->fa_nintr < 3)
+ if (faa->fa_nreg < 1 || faa->fa_nintr < 3)
return;
- sc->unit = (faa->fa_reg[0] & 0xc000) >> 14;
+ sc->unit = (faa->fa_reg[0].addr & 0xc000) >> 14;
sc->sc_node = faa->fa_node;
sc->sc_dmat = faa->fa_dmat;
sc->sc_iot = faa->fa_iot;
- if (bus_space_map(sc->sc_iot, faa->fa_reg[0],
- faa->fa_reg[1], 0, &sc->sc_ioh))
+ if (bus_space_map(sc->sc_iot, faa->fa_reg[0].addr,
+ faa->fa_reg[0].size, 0, &sc->sc_ioh))
panic("imxesdhc_attach: bus_space_map failed!");
printf("\n");
-/* $OpenBSD: imxgpio.c,v 1.9 2016/07/11 14:51:31 kettenis Exp $ */
+/* $OpenBSD: imxgpio.c,v 1.10 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_gpio.h>
+#include <dev/ofw/fdt.h>
/* iMX6 registers */
#define GPIO_DR 0x00
struct imxgpio_softc *sc = (struct imxgpio_softc *)self;
struct fdt_attach_args *faa = aux;
- if (faa->fa_nreg < 2)
+ if (faa->fa_nreg < 1)
return;
sc->sc_iot = faa->fa_iot;
- if (bus_space_map(sc->sc_iot, faa->fa_reg[0],
- faa->fa_reg[1], 0, &sc->sc_ioh))
+ if (bus_space_map(sc->sc_iot, faa->fa_reg[0].addr,
+ faa->fa_reg[0].size, 0, &sc->sc_ioh))
panic("imxgpio_attach: bus_space_map failed!");
sc->sc_gc.gc_node = faa->fa_node;
-/* $OpenBSD: imxiic.c,v 1.8 2016/07/10 11:46:28 kettenis Exp $ */
+/* $OpenBSD: imxiic.c,v 1.9 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright (c) 2013 Patrick Wildt <patrick@blueri.se>
*
#include <armv7/imx/imxiicvar.h>
#include <dev/ofw/openfirm.h>
+#include <dev/ofw/fdt.h>
/* registers */
#define I2C_IADR 0x00
struct imxiic_softc *sc = (struct imxiic_softc *)self;
struct fdt_attach_args *faa = aux;
- if (faa->fa_nreg < 2)
+ if (faa->fa_nreg < 1)
return;
sc->sc_iot = faa->fa_iot;
- sc->sc_ios = faa->fa_reg[1];
+ sc->sc_ios = faa->fa_reg[0].size;
sc->sc_node = faa->fa_node;
- sc->unit = (faa->fa_reg[0] & 0xc000) >> 14;
- if (bus_space_map(sc->sc_iot, faa->fa_reg[0],
- faa->fa_reg[1], 0, &sc->sc_ioh))
+ sc->unit = (faa->fa_reg[0].addr & 0xc000) >> 14;
+ if (bus_space_map(sc->sc_iot, faa->fa_reg[0].addr,
+ faa->fa_reg[0].size, 0, &sc->sc_ioh))
panic("imxiic_attach: bus_space_map failed!");
#if 0
-/* $OpenBSD: imxuart.c,v 1.9 2016/07/26 22:10:10 patrick Exp $ */
+/* $OpenBSD: imxuart.c,v 1.10 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright (c) 2005 Dale Rahn <drahn@motorola.com>
*
struct fdt_attach_args *faa = aux;
int maj;
- if (faa->fa_nreg < 2 || faa->fa_nintr < 3)
+ if (faa->fa_nreg < 1 || faa->fa_nintr < 3)
return;
imxiomuxc_pinctrlbyname(faa->fa_node, "default");
imxuart_intr, sc, sc->sc_dev.dv_xname);
sc->sc_iot = faa->fa_iot;
- if (bus_space_map(sc->sc_iot, faa->fa_reg[0],
- faa->fa_reg[1], 0, &sc->sc_ioh))
+ if (bus_space_map(sc->sc_iot, faa->fa_reg[0].addr,
+ faa->fa_reg[0].size, 0, &sc->sc_ioh))
panic("imxuartattach: bus_space_map failed!");
- if (faa->fa_reg[0] == imxuartconsaddr) {
+ if (faa->fa_reg[0].addr == imxuartconsaddr) {
/* Locate the major number. */
for (maj = 0; maj < nchrdev; maj++)
if (cdevsw[maj].d_open == imxuartopen)
-/* $OpenBSD: if_cpsw.c,v 1.37 2016/07/17 02:45:05 jsg Exp $ */
+/* $OpenBSD: if_cpsw.c,v 1.38 2016/07/27 11:45:02 patrick Exp $ */
/* $NetBSD: if_cpsw.c,v 1.3 2013/04/17 14:36:34 bouyer Exp $ */
/*
#include <arch/armv7/omap/sitara_cm.h>
#include <dev/ofw/openfirm.h>
+#include <dev/ofw/fdt.h>
#define CPSW_TXFRAGS 16
uint32_t memsize;
char name[32];
- if (faa->fa_nreg < 2 || (faa->fa_nintr != 4 && faa->fa_nintr != 12))
+ if (faa->fa_nreg < 1 || (faa->fa_nintr != 4 && faa->fa_nintr != 12))
return;
for (i = 0; i < 4; i++) {
}
/*
- * fa_reg[1] is size of CPSW_SS and CPSW_PORT
- * fa_reg[3] is size of CPSW_WR
+ * fa_reg[0].size is size of CPSW_SS and CPSW_PORT
+ * fa_reg[1].size is size of CPSW_WR
* we map a size that is a superset of both
*/
memsize = 0x4000;
sc->sc_bst = faa->fa_iot;
sc->sc_bdt = faa->fa_dmat;
- error = bus_space_map(sc->sc_bst, faa->fa_reg[0],
+ error = bus_space_map(sc->sc_bst, faa->fa_reg[0].addr,
memsize, 0, &sc->sc_bsh);
if (error) {
printf("can't map registers: %d\n", error);
return;
}
- sc->sc_txdescs_pa = faa->fa_reg[0] +
+ sc->sc_txdescs_pa = faa->fa_reg[0].addr +
CPSW_CPPI_RAM_TXDESCS_BASE;
error = bus_space_subregion(sc->sc_bst, sc->sc_bsh,
CPSW_CPPI_RAM_TXDESCS_BASE, CPSW_CPPI_RAM_TXDESCS_SIZE,
return;
}
- sc->sc_rxdescs_pa = faa->fa_reg[0] +
+ sc->sc_rxdescs_pa = faa->fa_reg[0].addr +
CPSW_CPPI_RAM_RXDESCS_BASE;
error = bus_space_subregion(sc->sc_bst, sc->sc_bsh,
CPSW_CPPI_RAM_RXDESCS_BASE, CPSW_CPPI_RAM_RXDESCS_SIZE,
-/* $OpenBSD: omap_com.c,v 1.7 2016/07/26 22:10:10 patrick Exp $ */
+/* $OpenBSD: omap_com.c,v 1.8 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
* All rights reserved.
struct fdt_attach_args *faa = aux;
int irq;
- if (faa->fa_nreg != 2 || (faa->fa_nintr != 1 && faa->fa_nintr != 3))
+ if (faa->fa_nreg != 1 || (faa->fa_nintr != 1 && faa->fa_nintr != 3))
return;
sc->sc_iot = &armv7_a4x_bs_tag; /* XXX: This sucks */
- sc->sc_iobase = faa->fa_reg[0];
+ sc->sc_iobase = faa->fa_reg[0].addr;
sc->sc_frequency = 48000000;
sc->sc_uarttype = COM_UART_TI16750;
irq = faa->fa_intr[1];
if (bus_space_map(sc->sc_iot, sc->sc_iobase,
- faa->fa_reg[1], 0, &sc->sc_ioh)) {
+ faa->fa_reg[0].size, 0, &sc->sc_ioh)) {
printf("%s: bus_space_map failed\n", __func__);
return;
}
-/* $OpenBSD: omdog.c,v 1.6 2016/06/26 05:16:33 jsg Exp $ */
+/* $OpenBSD: omdog.c,v 1.7 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright (c) 2013 Federico G. Schwindt <fgsch@openbsd.org>
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
#include <machine/fdt.h>
#include <dev/ofw/openfirm.h>
+#include <dev/ofw/fdt.h>
#include <armv7/armv7/armv7var.h>
struct omdog_softc *sc = (struct omdog_softc *) self;
u_int32_t rev;
- if (faa->fa_nreg < 2)
+ if (faa->fa_nreg < 1)
return;
sc->sc_iot = faa->fa_iot;
- if (bus_space_map(sc->sc_iot, faa->fa_reg[0],
- faa->fa_reg[1], 0, &sc->sc_ioh))
+ if (bus_space_map(sc->sc_iot, faa->fa_reg[0].addr,
+ faa->fa_reg[0].size, 0, &sc->sc_ioh))
panic("%s: bus_space_map failed!", __func__);
rev = bus_space_read_4(sc->sc_iot, sc->sc_ioh, WIDR);
-/* $OpenBSD: ommmc.c,v 1.26 2016/07/17 02:45:05 jsg Exp $ */
+/* $OpenBSD: ommmc.c,v 1.27 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright (c) 2009 Dale Rahn <drahn@openbsd.org>
#include <armv7/omap/sitara_cm.h>
#include <dev/ofw/openfirm.h>
+#include <dev/ofw/fdt.h>
/*
* NOTE: on OMAP4430/AM335x these registers skew by 0x100
int len, unit;
char hwmods[128];
- if (faa->fa_nreg != 2 || (faa->fa_nintr != 1 && faa->fa_nintr != 3))
+ if (faa->fa_nreg != 1 || (faa->fa_nintr != 1 && faa->fa_nintr != 3))
return;
- if (faa->fa_reg[1] <= 0x100)
+ if (faa->fa_reg[0].size <= 0x100)
return;
if (OF_is_compatible(faa->fa_node, "ti,omap4-hsmmc")) {
- addr = faa->fa_reg[0] + 0x100;
- size = faa->fa_reg[1] - 0x100;
+ addr = faa->fa_reg[0].addr + 0x100;
+ size = faa->fa_reg[0].size - 0x100;
} else {
- addr = faa->fa_reg[0];
- size = faa->fa_reg[1];
+ addr = faa->fa_reg[0].addr;
+ size = faa->fa_reg[0].size;
}
if (faa->fa_nintr == 1)
-/* $OpenBSD: ti_iic.c,v 1.6 2016/07/17 02:45:05 jsg Exp $ */
+/* $OpenBSD: ti_iic.c,v 1.7 2016/07/27 11:45:02 patrick Exp $ */
/* $NetBSD: ti_iic.c,v 1.4 2013/04/25 13:04:27 rkujawa Exp $ */
/*
#include <armv7/omap/sitara_cm.h>
#include <dev/ofw/openfirm.h>
+#include <dev/ofw/fdt.h>
#ifndef AM335X_I2C_SLAVE_ADDR
#define AM335X_I2C_SLAVE_ADDR 0x01
int irq, unit, len;
char hwmods[128];
- if (faa->fa_nreg != 2 || (faa->fa_nintr != 1 && faa->fa_nintr != 3))
+ if (faa->fa_nreg != 1 || (faa->fa_nintr != 1 && faa->fa_nintr != 3))
return;
sc->sc_iot = faa->fa_iot;
sc->sc_rxthres = sc->sc_txthres = 4;
- if (bus_space_map(sc->sc_iot, faa->fa_reg[0],
- faa->fa_reg[1], 0, &sc->sc_ioh))
+ if (bus_space_map(sc->sc_iot, faa->fa_reg[0].addr,
+ faa->fa_reg[0].size, 0, &sc->sc_ioh))
panic("%s: bus_space_map failed!", DEVNAME(sc));
sitara_cm_pinctrlbyname(faa->fa_node, "default");
-/* $OpenBSD: sxie.c,v 1.16 2016/06/12 06:58:39 jsg Exp $ */
+/* $OpenBSD: sxie.c,v 1.17 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
* Copyright (c) 2013 Artturi Alm
#include <armv7/sunxi/sxipiovar.h>
#include <dev/ofw/openfirm.h>
+#include <dev/ofw/fdt.h>
/* configuration registers */
#define SXIE_CR 0x0000
struct ifnet *ifp;
int s, irq;
- if (faa->fa_nreg != 2 || (faa->fa_nintr != 1 && faa->fa_nintr != 3))
+ if (faa->fa_nreg != 1 || (faa->fa_nintr != 1 && faa->fa_nintr != 3))
return;
if (faa->fa_nintr == 1)
sc->sc_iot = faa->fa_iot;
- if (bus_space_map(sc->sc_iot, faa->fa_reg[0],
- faa->fa_reg[1], 0, &sc->sc_ioh))
+ if (bus_space_map(sc->sc_iot, faa->fa_reg[0].addr,
+ faa->fa_reg[0].size, 0, &sc->sc_ioh))
panic("sxie_attach: bus_space_map ioh failed!");
if (bus_space_map(sc->sc_iot, SID_ADDR, SID_SIZE, 0, &sc->sc_sid_ioh))
-/* $OpenBSD: sxiuart.c,v 1.8 2016/07/26 22:10:10 patrick Exp $ */
+/* $OpenBSD: sxiuart.c,v 1.9 2016/07/27 11:45:02 patrick Exp $ */
/*
* Copyright (c) 2005 Dale Rahn <drahn@motorola.com>
* Copyright (c) 2013 Artturi Alm
bus_space_handle_t ioh;
int s, irq;
- if (faa->fa_nreg != 2 || (faa->fa_nintr != 1 && faa->fa_nintr != 3))
+ if (faa->fa_nreg != 1 || (faa->fa_nintr != 1 && faa->fa_nintr != 3))
return;
if (faa->fa_nintr == 1)
irq = faa->fa_intr[1];
sc->sc_iot = iot = faa->fa_iot;
- if (bus_space_map(sc->sc_iot, faa->fa_reg[0],
- faa->fa_reg[1], 0, &sc->sc_ioh))
+ if (bus_space_map(sc->sc_iot, faa->fa_reg[0].addr,
+ faa->fa_reg[0].size, 0, &sc->sc_ioh))
panic("sxiuartattach: bus_space_map failed!");
ioh = sc->sc_ioh;
- if (faa->fa_reg[0] == sxiuartconsaddr) {
+ if (faa->fa_reg[0].addr == sxiuartconsaddr) {
cn_tab->cn_dev = makedev(12 /* XXX */, 0);
cdevsw[12] = sxiuartdev; /* KLUDGE */