Changeset View
Changeset View
Standalone View
Standalone View
head/sys/mips/broadcom/bcm_machdep.c
Show First 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | |||||
static struct bcm_nvram_iocfe bcm_cfe_nvram; | static struct bcm_nvram_iocfe bcm_cfe_nvram; | ||||
#endif | #endif | ||||
static const struct bhnd_core_match bcm_chipc_cores[] = { | static const struct bhnd_core_match bcm_chipc_cores[] = { | ||||
{ BHND_MATCH_CORE(BHND_MFGID_BCM, BHND_COREID_CC) }, | { BHND_MATCH_CORE(BHND_MFGID_BCM, BHND_COREID_CC) }, | ||||
{ BHND_MATCH_CORE(BHND_MFGID_BCM, BHND_COREID_4706_CC) }, | { BHND_MATCH_CORE(BHND_MFGID_BCM, BHND_COREID_4706_CC) }, | ||||
}; | }; | ||||
static const struct bhnd_core_match bcm_cpu0_cores[] = { | |||||
{ | |||||
BHND_MATCH_CORE_CLASS(BHND_DEVCLASS_CPU), | |||||
BHND_MATCH_CORE_UNIT(0) | |||||
} | |||||
}; | |||||
static const struct bhnd_core_match bcm_pmu_cores[] = { | static const struct bhnd_core_match bcm_pmu_cores[] = { | ||||
{ BHND_MATCH_CORE(BHND_MFGID_BCM, BHND_COREID_PMU) }, | { BHND_MATCH_CORE(BHND_MFGID_BCM, BHND_COREID_PMU) }, | ||||
}; | }; | ||||
struct bcm_platform * | struct bcm_platform * | ||||
bcm_get_platform(void) | bcm_get_platform(void) | ||||
{ | { | ||||
if (!bcm_platform_data_avail) | if (!bcm_platform_data_avail) | ||||
▲ Show 20 Lines • Show All 285 Lines • ▼ Show 20 Lines | #endif /* CFE */ | ||||
/* Initialize PMU query state */ | /* Initialize PMU query state */ | ||||
if (pmu) { | if (pmu) { | ||||
error = bhnd_pmu_query_init(&bp->pmu, NULL, bp->cid, | error = bhnd_pmu_query_init(&bp->pmu, NULL, bp->cid, | ||||
&bcm_pmu_soc_io, bp); | &bcm_pmu_soc_io, bp); | ||||
if (error) { | if (error) { | ||||
BCM_ERR("bhnd_pmu_query_init() failed: %d\n", error); | BCM_ERR("bhnd_pmu_query_init() failed: %d\n", error); | ||||
return (error); | return (error); | ||||
} | } | ||||
} | |||||
/* Find CPU core info */ | |||||
error = bcm_find_core(bp, bcm_cpu0_cores, nitems(bcm_cpu0_cores), | |||||
&bp->cpu_id, &bp->cpu_addr); | |||||
if (error) { | |||||
BCM_ERR("error locating CPU core: %d\n", error); | |||||
return (error); | |||||
} | } | ||||
/* Initialize our platform service registry */ | /* Initialize our platform service registry */ | ||||
if ((error = bhnd_service_registry_init(&bp->services))) { | if ((error = bhnd_service_registry_init(&bp->services))) { | ||||
BCM_ERR("error initializing service registry: %d\n", error); | BCM_ERR("error initializing service registry: %d\n", error); | ||||
return (error); | return (error); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 199 Lines • Show Last 20 Lines |