summaryrefslogtreecommitdiffstats
path: root/sys/arm/xscale
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2006-01-23 14:03:14 +0000
committercognet <cognet@FreeBSD.org>2006-01-23 14:03:14 +0000
commit245cc1d8019775633b309a0e851bc14146e27112 (patch)
treed46ce02cd58011f1e4345d6f8e89766ebdbd0b86 /sys/arm/xscale
parente545650ae6d77ca3ade0d19b8f5b9ca35eae1e84 (diff)
downloadFreeBSD-src-245cc1d8019775633b309a0e851bc14146e27112.zip
FreeBSD-src-245cc1d8019775633b309a0e851bc14146e27112.tar.gz
Donc recompute the io port address if it's already the good one.
Diffstat (limited to 'sys/arm/xscale')
-rw-r--r--sys/arm/xscale/i80321/i80321_pci.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arm/xscale/i80321/i80321_pci.c b/sys/arm/xscale/i80321/i80321_pci.c
index 0c21b34..21814fc 100644
--- a/sys/arm/xscale/i80321/i80321_pci.c
+++ b/sys/arm/xscale/i80321/i80321_pci.c
@@ -368,15 +368,17 @@ i80321_pci_alloc_resource(device_t bus, device_t child, int type, int *rid,
rm = &sc->sc_io_rman;
bt = sc->sc_pciio;
bh = sc->sc_io;
- start = start - 0x90000000 + sc->sc_io;
- end = end - 0x90000000 + sc->sc_io;
+ if (start < sc->sc_io) {
+ start = start - 0x90000000 + sc->sc_io;
+ end = end - 0x90000000 + sc->sc_io;
+ }
break;
default:
return (NULL);
}
rv = rman_reserve_resource(rm, start, end, count, flags, child);
- if (rv == NULL)
+ if (rv == NULL)
return (NULL);
if (type != SYS_RES_IRQ) {
bh += (rman_get_start(rv));
OpenPOWER on IntegriCloud