aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bhnd/siba
diff options
context:
space:
mode:
authorLandon J. Fuller <landonf@FreeBSD.org>2016-08-28 20:39:53 +0000
committerLandon J. Fuller <landonf@FreeBSD.org>2016-08-28 20:39:53 +0000
commitd851916ef2373be39838427fcdc5ea4ef097b120 (patch)
treed66b7640d2a612ebece1414b4cc9fb3acefee3ed /sys/dev/bhnd/siba
parent99cbd70f0b8da8e6547f63651c786efdd02081ab (diff)
Notes
Diffstat (limited to 'sys/dev/bhnd/siba')
-rw-r--r--sys/dev/bhnd/siba/siba.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/sys/dev/bhnd/siba/siba.c b/sys/dev/bhnd/siba/siba.c
index 6940cfda4c5c..a8b8bc458e46 100644
--- a/sys/dev/bhnd/siba/siba.c
+++ b/sys/dev/bhnd/siba/siba.c
@@ -635,35 +635,12 @@ siba_add_children(device_t dev, const struct bhnd_chipid *chipid)
ccreg = bus_read_4(r, CHIPC_ID);
ccid = bhnd_parse_chipid(ccreg, SIBA_ENUM_ADDR);
- if (!CHIPC_NCORES_MIN_HWREV(ccrev)) {
- switch (ccid.chip_id) {
- case BHND_CHIPID_BCM4306:
- ccid.ncores = 6;
- break;
- case BHND_CHIPID_BCM4704:
- ccid.ncores = 9;
- break;
- case BHND_CHIPID_BCM5365:
- /*
- * BCM5365 does support ID_NUMCORE in at least
- * some of its revisions, but for unknown
- * reasons, Broadcom's drivers always exclude
- * the ChipCommon revision (0x5) used by BCM5365
- * from the set of revisions supporting
- * ID_NUMCORE, and instead supply a fixed value.
- *
- * Presumably, at least some of these devices
- * shipped with a broken ID_NUMCORE value.
- */
- ccid.ncores = 7;
- break;
- default:
- device_printf(dev, "unable to determine core "
- "count for unrecognized chipset 0x%hx\n",
- ccid.chip_id);
- error = ENXIO;
- goto cleanup;
- }
+ /* Fix up the core count */
+ error = bhnd_chipid_fixed_ncores(&ccid, ccrev, &ccid.ncores);
+ if (error) {
+ device_printf(dev, "unable to determine core count for "
+ "chipset 0x%hx\n", ccid.chip_id);
+ goto cleanup;
}
chipid = &ccid;