コード例 #1
0
static int
mv_cp110_icu_map_intr(device_t dev, struct intr_map_data *data,
    struct intr_irqsrc **isrcp)
{
	struct mv_cp110_icu_softc *sc;
	struct intr_map_data_fdt *daf;
	uint32_t reg;

	sc = device_get_softc(dev);

	if (data->type != INTR_MAP_DATA_FDT)
		return (ENOTSUP);

	daf = (struct intr_map_data_fdt *)data;
	if (daf->ncells != 3 || daf->cells[0] >= MV_CP110_ICU_MAX_NIRQS)
		return (EINVAL);

	reg = RD4(sc, ICU_INT_CFG(daf->cells[1]));

	if ((reg & ICU_INT_ENABLE) == 0) {
		reg |= ICU_INT_ENABLE;
		WR4(sc, ICU_INT_CFG(daf->cells[1]), reg);
	}

	daf->cells[1] = reg & ICU_INT_MASK;
	return (PIC_MAP_INTR(sc->parent, data, isrcp));
}
コード例 #2
0
ファイル: tegra_lic.c プロジェクト: 2asoft/freebsd
static int
tegra_lic_map_intr(device_t dev, struct intr_map_data *data,
    struct intr_irqsrc **isrcp)
{
	struct tegra_lic_sc *sc = device_get_softc(dev);

	return (PIC_MAP_INTR(sc->parent, data, isrcp));
}
コード例 #3
0
ファイル: omap4_wugen.c プロジェクト: 2asoft/freebsd
static int
omap4_wugen_map_intr(device_t dev, struct intr_map_data *data,
    struct intr_irqsrc **isrcp)
{
	struct omap4_wugen_sc *sc = device_get_softc(dev);

	return (PIC_MAP_INTR(sc->sc_parent, data, isrcp));
}