svn commit: r298499 - head/sys/mips/mediatek
Stanislav Galabov
sgalabov at FreeBSD.org
Sat Apr 23 04:22:39 UTC 2016
Author: sgalabov
Date: Sat Apr 23 04:22:38 2016
New Revision: 298499
URL: https://svnweb.freebsd.org/changeset/base/298499
Log:
Use cpu_establish_hardintr in mtk_intr_gic
This allows us to come closer to OpenWRT vanilla DTS files.
Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D6045
Modified:
head/sys/mips/mediatek/mtk_intr_gic.c
Modified: head/sys/mips/mediatek/mtk_intr_gic.c
==============================================================================
--- head/sys/mips/mediatek/mtk_intr_gic.c Sat Apr 23 04:21:18 2016 (r298498)
+++ head/sys/mips/mediatek/mtk_intr_gic.c Sat Apr 23 04:22:38 2016 (r298499)
@@ -95,7 +95,6 @@ struct mtk_gic_softc {
static struct resource_spec mtk_gic_spec[] = {
{ SYS_RES_MEMORY, 0, RF_ACTIVE }, /* Registers */
- { SYS_RES_IRQ, 0, RF_ACTIVE }, /* Parent interrupt 1 */
{ -1, 0 }
};
@@ -104,15 +103,8 @@ static struct ofw_compat_data compat_dat
{ NULL, 0 }
};
-#if 0
-#define READ4(_sc, _reg) \
- bus_space_read_4((_sc)->bst, (_sc)->bsh, _reg)
-#define WRITE4(_sc, _reg, _val) \
- bus_space_write_4((_sc)->bst, (_sc)->bsh, _reg, _val)
-#else
#define READ4(_sc, _reg) bus_read_4((_sc)->gic_res[0], (_reg))
#define WRITE4(_sc, _reg, _val) bus_write_4((_sc)->gic_res[0], (_reg), (_val))
-#endif
static int
mtk_gic_probe(device_t dev)
@@ -226,12 +218,9 @@ mtk_gic_attach(device_t dev)
goto cleanup;
}
- if (bus_setup_intr(dev, sc->gic_res[1], INTR_TYPE_CLK,
- mtk_gic_intr, NULL, sc, &sc->gic_intrhand)) {
- device_printf(dev, "could not setup irq handler\n");
- intr_pic_deregister(dev, xref);
- goto cleanup;
- }
+ cpu_establish_hardintr("gic", mtk_gic_intr, NULL, sc, 0, INTR_TYPE_CLK,
+ NULL);
+
return (0);
cleanup:
More information about the svn-src-head
mailing list