summaryrefslogtreecommitdiffstats
path: root/sys/mips/cavium
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2012-10-31 04:23:36 +0000
committerjmallett <jmallett@FreeBSD.org>2012-10-31 04:23:36 +0000
commitedb74bf5301b24265d9564b6f2d8b8598130c20c (patch)
tree989c7f0a1a092fc3c4a73957f03b5ddf62fedd05 /sys/mips/cavium
parentff8afcf2e90551635735f0eb4ddfb075b22455fa (diff)
downloadFreeBSD-src-edb74bf5301b24265d9564b6f2d8b8598130c20c.zip
FreeBSD-src-edb74bf5301b24265d9564b6f2d8b8598130c20c.tar.gz
If the CF physical base is 0, attach no CF devices. This fixes a warning
about a 0 passed to cvmx_phys_to_ptr on systems without a CF interface, such as the RSYS4GBE.
Diffstat (limited to 'sys/mips/cavium')
-rw-r--r--sys/mips/cavium/octeon_ebt3000_cf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/mips/cavium/octeon_ebt3000_cf.c b/sys/mips/cavium/octeon_ebt3000_cf.c
index 16ae79e..287005b 100644
--- a/sys/mips/cavium/octeon_ebt3000_cf.c
+++ b/sys/mips/cavium/octeon_ebt3000_cf.c
@@ -622,6 +622,8 @@ static void cf_identify (driver_t *drv, device_t parent)
return;
phys_base = cvmx_sysinfo_get()->compact_flash_common_base_addr;
+ if (phys_base == 0)
+ return;
base_addr = cvmx_phys_to_ptr(phys_base);
for (bus_region = 0; bus_region < 8; bus_region++)
OpenPOWER on IntegriCloud