Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm/arm/gic.c
Show First 20 Lines • Show All 1,378 Lines • ▼ Show 20 Lines | |||||
#define MSI_TYPER_SPI_COUNT(x) (((x) >> 0) & 0x3ff) | #define MSI_TYPER_SPI_COUNT(x) (((x) >> 0) & 0x3ff) | ||||
#define GICv2M_MSI_SETSPI_NS 0x040 | #define GICv2M_MSI_SETSPI_NS 0x040 | ||||
#define GICV2M_MSI_IIDR 0xFCC | #define GICV2M_MSI_IIDR 0xFCC | ||||
int | int | ||||
arm_gicv2m_attach(device_t dev) | arm_gicv2m_attach(device_t dev) | ||||
{ | { | ||||
struct arm_gicv2m_softc *sc; | struct arm_gicv2m_softc *sc; | ||||
struct arm_gic_softc *psc; | |||||
uint32_t typer; | uint32_t typer; | ||||
int rid; | int rid; | ||||
psc = device_get_softc(device_get_parent(dev)); | |||||
sc = device_get_softc(dev); | sc = device_get_softc(dev); | ||||
rid = 0; | rid = 0; | ||||
sc->sc_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, | sc->sc_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, | ||||
RF_ACTIVE); | RF_ACTIVE); | ||||
if (sc->sc_mem == NULL) { | if (sc->sc_mem == NULL) { | ||||
device_printf(dev, "Unable to allocate resources\n"); | device_printf(dev, "Unable to allocate resources\n"); | ||||
return (ENXIO); | return (ENXIO); | ||||
▲ Show 20 Lines • Show All 200 Lines • Show Last 20 Lines |