Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine
independent code that needs to know about INTRNG such as PCI drivers. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
3115fdeded
commit
b72ace02b4
@ -42,7 +42,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
|
|
||||||
static int
|
static int
|
||||||
fdt_aintc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
fdt_aintc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
@ -69,4 +69,4 @@ fdt_pic_decode_t fdt_pic_table[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* ARM_INTRNG */
|
#endif /* INTRNG */
|
||||||
|
@ -74,7 +74,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int
|
static int
|
||||||
fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
int *pol)
|
int *pol)
|
||||||
|
@ -184,7 +184,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
#ifndef DEV_GIC
|
#ifndef DEV_GIC
|
||||||
static int
|
static int
|
||||||
fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
@ -213,4 +213,4 @@ fdt_pic_decode_t fdt_pic_table[] = {
|
|||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
#endif /* ARM_INTRNG */
|
#endif /* INTRNG */
|
||||||
|
@ -136,7 +136,7 @@ cpu_reset(void)
|
|||||||
while (1) {}
|
while (1) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int
|
static int
|
||||||
alpine_pic_decode_fdt(uint32_t iparent, uint32_t *intr, int *interrupt,
|
alpine_pic_decode_fdt(uint32_t iparent, uint32_t *intr, int *interrupt,
|
||||||
int *trig, int *pol)
|
int *trig, int *pol)
|
||||||
|
@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <sys/lock.h>
|
#include <sys/lock.h>
|
||||||
#include <sys/mutex.h>
|
#include <sys/mutex.h>
|
||||||
#include <sys/smp.h>
|
#include <sys/smp.h>
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#include <sys/sched.h>
|
#include <sys/sched.h>
|
||||||
#endif
|
#endif
|
||||||
#include <machine/bus.h>
|
#include <machine/bus.h>
|
||||||
@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <dev/ofw/ofw_bus.h>
|
#include <dev/ofw/ofw_bus.h>
|
||||||
#include <dev/ofw/ofw_bus_subr.h>
|
#include <dev/ofw/ofw_bus_subr.h>
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#include "pic_if.h"
|
#include "pic_if.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#define GIC_DEFAULT_ICFGR_INIT 0x00000000
|
#define GIC_DEFAULT_ICFGR_INIT 0x00000000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
struct gic_irqsrc {
|
struct gic_irqsrc {
|
||||||
struct intr_irqsrc gi_isrc;
|
struct intr_irqsrc gi_isrc;
|
||||||
uint32_t gi_irq;
|
uint32_t gi_irq;
|
||||||
@ -136,7 +136,7 @@ u_int sgi_first_unused = GIC_FIRST_SGI;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
struct arm_gic_range {
|
struct arm_gic_range {
|
||||||
uint64_t bus;
|
uint64_t bus;
|
||||||
uint64_t host;
|
uint64_t host;
|
||||||
@ -151,7 +151,7 @@ struct arm_gic_devinfo {
|
|||||||
|
|
||||||
struct arm_gic_softc {
|
struct arm_gic_softc {
|
||||||
device_t gic_dev;
|
device_t gic_dev;
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
void * gic_intrhand;
|
void * gic_intrhand;
|
||||||
struct gic_irqsrc * gic_irqs;
|
struct gic_irqsrc * gic_irqs;
|
||||||
#endif
|
#endif
|
||||||
@ -167,7 +167,7 @@ struct arm_gic_softc {
|
|||||||
uint32_t last_irq[MAXCPU];
|
uint32_t last_irq[MAXCPU];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
/* FDT child data */
|
/* FDT child data */
|
||||||
pcell_t addr_cells;
|
pcell_t addr_cells;
|
||||||
pcell_t size_cells;
|
pcell_t size_cells;
|
||||||
@ -176,14 +176,14 @@ struct arm_gic_softc {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#define GIC_INTR_ISRC(sc, irq) (&sc->gic_irqs[irq].gi_isrc)
|
#define GIC_INTR_ISRC(sc, irq) (&sc->gic_irqs[irq].gi_isrc)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct resource_spec arm_gic_spec[] = {
|
static struct resource_spec arm_gic_spec[] = {
|
||||||
{ SYS_RES_MEMORY, 0, RF_ACTIVE }, /* Distributor registers */
|
{ SYS_RES_MEMORY, 0, RF_ACTIVE }, /* Distributor registers */
|
||||||
{ SYS_RES_MEMORY, 1, RF_ACTIVE }, /* CPU Interrupt Intf. registers */
|
{ SYS_RES_MEMORY, 1, RF_ACTIVE }, /* CPU Interrupt Intf. registers */
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
{ SYS_RES_IRQ, 0, RF_ACTIVE | RF_OPTIONAL }, /* Parent interrupt */
|
{ SYS_RES_IRQ, 0, RF_ACTIVE | RF_OPTIONAL }, /* Parent interrupt */
|
||||||
#endif
|
#endif
|
||||||
{ -1, 0 }
|
{ -1, 0 }
|
||||||
@ -204,7 +204,7 @@ static struct arm_gic_softc *gic_sc = NULL;
|
|||||||
#define gic_d_write_4(_sc, _reg, _val) \
|
#define gic_d_write_4(_sc, _reg, _val) \
|
||||||
bus_space_write_4((_sc)->gic_d_bst, (_sc)->gic_d_bsh, (_reg), (_val))
|
bus_space_write_4((_sc)->gic_d_bst, (_sc)->gic_d_bsh, (_reg), (_val))
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int gic_config_irq(int irq, enum intr_trigger trig,
|
static int gic_config_irq(int irq, enum intr_trigger trig,
|
||||||
enum intr_polarity pol);
|
enum intr_polarity pol);
|
||||||
static void gic_post_filter(void *);
|
static void gic_post_filter(void *);
|
||||||
@ -235,7 +235,7 @@ arm_gic_probe(device_t dev)
|
|||||||
return (BUS_PROBE_DEFAULT);
|
return (BUS_PROBE_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static inline void
|
static inline void
|
||||||
gic_irq_unmask(struct arm_gic_softc *sc, u_int irq)
|
gic_irq_unmask(struct arm_gic_softc *sc, u_int irq)
|
||||||
{
|
{
|
||||||
@ -275,7 +275,7 @@ gic_cpu_mask(struct arm_gic_softc *sc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SMP
|
#ifdef SMP
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static void
|
static void
|
||||||
arm_gic_init_secondary(device_t dev)
|
arm_gic_init_secondary(device_t dev)
|
||||||
{
|
{
|
||||||
@ -347,10 +347,10 @@ arm_gic_init_secondary(device_t dev)
|
|||||||
gic_d_write_4(sc, GICD_ISENABLER(29 >> 5), (1UL << (29 & 0x1F)));
|
gic_d_write_4(sc, GICD_ISENABLER(29 >> 5), (1UL << (29 & 0x1F)));
|
||||||
gic_d_write_4(sc, GICD_ISENABLER(30 >> 5), (1UL << (30 & 0x1F)));
|
gic_d_write_4(sc, GICD_ISENABLER(30 >> 5), (1UL << (30 & 0x1F)));
|
||||||
}
|
}
|
||||||
#endif /* ARM_INTRNG */
|
#endif /* INTRNG */
|
||||||
#endif /* SMP */
|
#endif /* SMP */
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
int
|
int
|
||||||
gic_decode_fdt(phandle_t iparent, pcell_t *intr, int *interrupt,
|
gic_decode_fdt(phandle_t iparent, pcell_t *intr, int *interrupt,
|
||||||
int *trig, int *pol)
|
int *trig, int *pol)
|
||||||
@ -411,7 +411,7 @@ gic_decode_fdt(phandle_t iparent, pcell_t *intr, int *interrupt,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static inline intptr_t
|
static inline intptr_t
|
||||||
gic_xref(device_t dev)
|
gic_xref(device_t dev)
|
||||||
{
|
{
|
||||||
@ -570,7 +570,7 @@ arm_gic_attach(device_t dev)
|
|||||||
struct arm_gic_softc *sc;
|
struct arm_gic_softc *sc;
|
||||||
int i;
|
int i;
|
||||||
uint32_t icciidr, mask, nirqs;
|
uint32_t icciidr, mask, nirqs;
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
phandle_t pxref;
|
phandle_t pxref;
|
||||||
intptr_t xref = gic_xref(dev);
|
intptr_t xref = gic_xref(dev);
|
||||||
#endif
|
#endif
|
||||||
@ -606,7 +606,7 @@ arm_gic_attach(device_t dev)
|
|||||||
nirqs = gic_d_read_4(sc, GICD_TYPER);
|
nirqs = gic_d_read_4(sc, GICD_TYPER);
|
||||||
nirqs = 32 * ((nirqs & 0x1f) + 1);
|
nirqs = 32 * ((nirqs & 0x1f) + 1);
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
if (arm_gic_register_isrcs(sc, nirqs)) {
|
if (arm_gic_register_isrcs(sc, nirqs)) {
|
||||||
device_printf(dev, "could not register irqs\n");
|
device_printf(dev, "could not register irqs\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -662,7 +662,7 @@ arm_gic_attach(device_t dev)
|
|||||||
|
|
||||||
/* Enable interrupt distribution */
|
/* Enable interrupt distribution */
|
||||||
gic_d_write_4(sc, GICD_CTLR, 0x01);
|
gic_d_write_4(sc, GICD_CTLR, 0x01);
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
return (0);
|
return (0);
|
||||||
#else
|
#else
|
||||||
/*
|
/*
|
||||||
@ -723,7 +723,7 @@ arm_gic_attach(device_t dev)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static struct resource *
|
static struct resource *
|
||||||
arm_gic_alloc_resource(device_t bus, device_t child, int type, int *rid,
|
arm_gic_alloc_resource(device_t bus, device_t child, int type, int *rid,
|
||||||
rman_res_t start, rman_res_t end, rman_res_t count, u_int flags)
|
rman_res_t start, rman_res_t end, rman_res_t count, u_int flags)
|
||||||
@ -1429,14 +1429,14 @@ pic_ipi_clear(int ipi)
|
|||||||
arm_gic_ipi_clear(gic_sc->gic_dev, ipi);
|
arm_gic_ipi_clear(gic_sc->gic_dev, ipi);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /* ARM_INTRNG */
|
#endif /* INTRNG */
|
||||||
|
|
||||||
static device_method_t arm_gic_methods[] = {
|
static device_method_t arm_gic_methods[] = {
|
||||||
/* Device interface */
|
/* Device interface */
|
||||||
DEVMETHOD(device_probe, arm_gic_probe),
|
DEVMETHOD(device_probe, arm_gic_probe),
|
||||||
DEVMETHOD(device_attach, arm_gic_attach),
|
DEVMETHOD(device_attach, arm_gic_attach),
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
/* Bus interface */
|
/* Bus interface */
|
||||||
DEVMETHOD(bus_add_child, bus_generic_add_child),
|
DEVMETHOD(bus_add_child, bus_generic_add_child),
|
||||||
DEVMETHOD(bus_alloc_resource, arm_gic_alloc_resource),
|
DEVMETHOD(bus_alloc_resource, arm_gic_alloc_resource),
|
||||||
@ -1483,7 +1483,7 @@ EARLY_DRIVER_MODULE(gic, simplebus, arm_gic_driver, arm_gic_devclass, 0, 0,
|
|||||||
EARLY_DRIVER_MODULE(gic, ofwbus, arm_gic_driver, arm_gic_devclass, 0, 0,
|
EARLY_DRIVER_MODULE(gic, ofwbus, arm_gic_driver, arm_gic_devclass, 0, 0,
|
||||||
BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE);
|
BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE);
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
/*
|
/*
|
||||||
* GICv2m support -- the GICv2 MSI/MSI-X controller.
|
* GICv2m support -- the GICv2 MSI/MSI-X controller.
|
||||||
*/
|
*/
|
||||||
|
@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <machine/cpu.h>
|
#include <machine/cpu.h>
|
||||||
#include <machine/smp.h>
|
#include <machine/smp.h>
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#include "pic_if.h"
|
#include "pic_if.h"
|
||||||
|
|
||||||
#ifdef SMP
|
#ifdef SMP
|
||||||
@ -131,7 +131,7 @@ arm_irq_memory_barrier(uintptr_t irq)
|
|||||||
cpu_l2cache_drain_writebuf();
|
cpu_l2cache_drain_writebuf();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#ifdef SMP
|
#ifdef SMP
|
||||||
static inline struct intr_ipi *
|
static inline struct intr_ipi *
|
||||||
intr_ipi_lookup(u_int ipi)
|
intr_ipi_lookup(u_int ipi)
|
||||||
|
@ -74,7 +74,7 @@ volatile int mp_naps;
|
|||||||
/* Set to 1 once we're ready to let the APs out of the pen. */
|
/* Set to 1 once we're ready to let the APs out of the pen. */
|
||||||
volatile int aps_ready = 0;
|
volatile int aps_ready = 0;
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int ipi_handler(void *arg);
|
static int ipi_handler(void *arg);
|
||||||
#endif
|
#endif
|
||||||
void set_stackptrs(int cpu);
|
void set_stackptrs(int cpu);
|
||||||
@ -152,7 +152,7 @@ init_secondary(int cpu)
|
|||||||
{
|
{
|
||||||
struct pcpu *pc;
|
struct pcpu *pc;
|
||||||
uint32_t loop_counter;
|
uint32_t loop_counter;
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
int start = 0, end = 0;
|
int start = 0, end = 0;
|
||||||
#endif
|
#endif
|
||||||
uint32_t actlr_mask, actlr_set;
|
uint32_t actlr_mask, actlr_set;
|
||||||
@ -207,7 +207,7 @@ init_secondary(int cpu)
|
|||||||
|
|
||||||
mtx_unlock_spin(&ap_boot_mtx);
|
mtx_unlock_spin(&ap_boot_mtx);
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
/* Enable ipi */
|
/* Enable ipi */
|
||||||
#ifdef IPI_IRQ_START
|
#ifdef IPI_IRQ_START
|
||||||
start = IPI_IRQ_START;
|
start = IPI_IRQ_START;
|
||||||
@ -243,7 +243,7 @@ init_secondary(int cpu)
|
|||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static void
|
static void
|
||||||
ipi_rendezvous(void *dummy __unused)
|
ipi_rendezvous(void *dummy __unused)
|
||||||
{
|
{
|
||||||
@ -421,14 +421,14 @@ static void
|
|||||||
release_aps(void *dummy __unused)
|
release_aps(void *dummy __unused)
|
||||||
{
|
{
|
||||||
uint32_t loop_counter;
|
uint32_t loop_counter;
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
int start = 0, end = 0;
|
int start = 0, end = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (mp_ncpus == 1)
|
if (mp_ncpus == 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
intr_pic_ipi_setup(IPI_RENDEZVOUS, "rendezvous", ipi_rendezvous, NULL);
|
intr_pic_ipi_setup(IPI_RENDEZVOUS, "rendezvous", ipi_rendezvous, NULL);
|
||||||
intr_pic_ipi_setup(IPI_AST, "ast", ipi_ast, NULL);
|
intr_pic_ipi_setup(IPI_AST, "ast", ipi_ast, NULL);
|
||||||
intr_pic_ipi_setup(IPI_STOP, "stop", ipi_stop, NULL);
|
intr_pic_ipi_setup(IPI_STOP, "stop", ipi_stop, NULL);
|
||||||
@ -501,7 +501,7 @@ ipi_all_but_self(u_int ipi)
|
|||||||
other_cpus = all_cpus;
|
other_cpus = all_cpus;
|
||||||
CPU_CLR(PCPU_GET(cpuid), &other_cpus);
|
CPU_CLR(PCPU_GET(cpuid), &other_cpus);
|
||||||
CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi);
|
CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi);
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
intr_ipi_send(other_cpus, ipi);
|
intr_ipi_send(other_cpus, ipi);
|
||||||
#else
|
#else
|
||||||
pic_ipi_send(other_cpus, ipi);
|
pic_ipi_send(other_cpus, ipi);
|
||||||
@ -517,7 +517,7 @@ ipi_cpu(int cpu, u_int ipi)
|
|||||||
CPU_SET(cpu, &cpus);
|
CPU_SET(cpu, &cpus);
|
||||||
|
|
||||||
CTR3(KTR_SMP, "%s: cpu: %d, ipi: %x", __func__, cpu, ipi);
|
CTR3(KTR_SMP, "%s: cpu: %d, ipi: %x", __func__, cpu, ipi);
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
intr_ipi_send(cpus, ipi);
|
intr_ipi_send(cpus, ipi);
|
||||||
#else
|
#else
|
||||||
pic_ipi_send(cpus, ipi);
|
pic_ipi_send(cpus, ipi);
|
||||||
@ -529,7 +529,7 @@ ipi_selected(cpuset_t cpus, u_int ipi)
|
|||||||
{
|
{
|
||||||
|
|
||||||
CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi);
|
CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi);
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
intr_ipi_send(cpus, ipi);
|
intr_ipi_send(cpus, ipi);
|
||||||
#else
|
#else
|
||||||
pic_ipi_send(cpus, ipi);
|
pic_ipi_send(cpus, ipi);
|
||||||
|
@ -86,14 +86,14 @@ static struct resource *nexus_alloc_resource(device_t, device_t, int, int *,
|
|||||||
static int nexus_activate_resource(device_t, device_t, int, int,
|
static int nexus_activate_resource(device_t, device_t, int, int,
|
||||||
struct resource *);
|
struct resource *);
|
||||||
static bus_space_tag_t nexus_get_bus_tag(device_t, device_t);
|
static bus_space_tag_t nexus_get_bus_tag(device_t, device_t);
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#ifdef SMP
|
#ifdef SMP
|
||||||
static int nexus_bind_intr(device_t, device_t, struct resource *, int);
|
static int nexus_bind_intr(device_t, device_t, struct resource *, int);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig,
|
static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig,
|
||||||
enum intr_polarity pol);
|
enum intr_polarity pol);
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static int nexus_describe_intr(device_t dev, device_t child,
|
static int nexus_describe_intr(device_t dev, device_t child,
|
||||||
struct resource *irq, void *cookie, const char *descr);
|
struct resource *irq, void *cookie, const char *descr);
|
||||||
#endif
|
#endif
|
||||||
@ -126,7 +126,7 @@ static device_method_t nexus_methods[] = {
|
|||||||
DEVMETHOD(bus_setup_intr, nexus_setup_intr),
|
DEVMETHOD(bus_setup_intr, nexus_setup_intr),
|
||||||
DEVMETHOD(bus_teardown_intr, nexus_teardown_intr),
|
DEVMETHOD(bus_teardown_intr, nexus_teardown_intr),
|
||||||
DEVMETHOD(bus_get_bus_tag, nexus_get_bus_tag),
|
DEVMETHOD(bus_get_bus_tag, nexus_get_bus_tag),
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
DEVMETHOD(bus_describe_intr, nexus_describe_intr),
|
DEVMETHOD(bus_describe_intr, nexus_describe_intr),
|
||||||
#ifdef SMP
|
#ifdef SMP
|
||||||
DEVMETHOD(bus_bind_intr, nexus_bind_intr),
|
DEVMETHOD(bus_bind_intr, nexus_bind_intr),
|
||||||
@ -280,7 +280,7 @@ nexus_config_intr(device_t dev, int irq, enum intr_trigger trig,
|
|||||||
{
|
{
|
||||||
int ret = ENODEV;
|
int ret = ENODEV;
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
device_printf(dev, "bus_config_intr is obsolete and not supported!\n");
|
device_printf(dev, "bus_config_intr is obsolete and not supported!\n");
|
||||||
ret = EOPNOTSUPP;
|
ret = EOPNOTSUPP;
|
||||||
#else
|
#else
|
||||||
@ -294,14 +294,14 @@ static int
|
|||||||
nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags,
|
nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags,
|
||||||
driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep)
|
driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep)
|
||||||
{
|
{
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
int irq;
|
int irq;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((rman_get_flags(res) & RF_SHAREABLE) == 0)
|
if ((rman_get_flags(res) & RF_SHAREABLE) == 0)
|
||||||
flags |= INTR_EXCL;
|
flags |= INTR_EXCL;
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
return(intr_setup_irq(child, res, filt, intr, arg, flags, cookiep));
|
return(intr_setup_irq(child, res, filt, intr, arg, flags, cookiep));
|
||||||
#else
|
#else
|
||||||
for (irq = rman_get_start(res); irq <= rman_get_end(res); irq++) {
|
for (irq = rman_get_start(res); irq <= rman_get_end(res); irq++) {
|
||||||
@ -317,14 +317,14 @@ static int
|
|||||||
nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
|
nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
return (intr_teardown_irq(child, r, ih));
|
return (intr_teardown_irq(child, r, ih));
|
||||||
#else
|
#else
|
||||||
return (arm_remove_irqhandler(rman_get_start(r), ih));
|
return (arm_remove_irqhandler(rman_get_start(r), ih));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static int
|
static int
|
||||||
nexus_describe_intr(device_t dev, device_t child, struct resource *irq,
|
nexus_describe_intr(device_t dev, device_t child, struct resource *irq,
|
||||||
void *cookie, const char *descr)
|
void *cookie, const char *descr)
|
||||||
|
@ -53,7 +53,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int
|
static int
|
||||||
fdt_aic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
fdt_aic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
int *pol)
|
int *pol)
|
||||||
|
@ -50,7 +50,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int
|
static int
|
||||||
fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
int *pol)
|
int *pol)
|
||||||
@ -78,4 +78,4 @@ fdt_pic_decode_t fdt_pic_table[] = {
|
|||||||
&fdt_intc_decode_ic,
|
&fdt_intc_decode_ic,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
#endif /* ARM_INTRNG */
|
#endif /* INTRNG */
|
||||||
|
@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include "gpio_if.h"
|
#include "gpio_if.h"
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#include "pic_if.h"
|
#include "pic_if.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ struct bcm_gpio_sysctl {
|
|||||||
uint32_t pin;
|
uint32_t pin;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
struct bcm_gpio_irqsrc {
|
struct bcm_gpio_irqsrc {
|
||||||
struct intr_irqsrc bgi_isrc;
|
struct intr_irqsrc bgi_isrc;
|
||||||
uint32_t bgi_irq;
|
uint32_t bgi_irq;
|
||||||
@ -105,11 +105,11 @@ struct bcm_gpio_softc {
|
|||||||
int sc_ro_npins;
|
int sc_ro_npins;
|
||||||
int sc_ro_pins[BCM_GPIO_PINS];
|
int sc_ro_pins[BCM_GPIO_PINS];
|
||||||
struct gpio_pin sc_gpio_pins[BCM_GPIO_PINS];
|
struct gpio_pin sc_gpio_pins[BCM_GPIO_PINS];
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
struct intr_event * sc_events[BCM_GPIO_PINS];
|
struct intr_event * sc_events[BCM_GPIO_PINS];
|
||||||
#endif
|
#endif
|
||||||
struct bcm_gpio_sysctl sc_sysctl[BCM_GPIO_PINS];
|
struct bcm_gpio_sysctl sc_sysctl[BCM_GPIO_PINS];
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
struct bcm_gpio_irqsrc sc_isrcs[BCM_GPIO_PINS];
|
struct bcm_gpio_irqsrc sc_isrcs[BCM_GPIO_PINS];
|
||||||
#else
|
#else
|
||||||
enum intr_trigger sc_irq_trigger[BCM_GPIO_PINS];
|
enum intr_trigger sc_irq_trigger[BCM_GPIO_PINS];
|
||||||
@ -153,7 +153,7 @@ enum bcm_gpio_pud {
|
|||||||
|
|
||||||
static struct bcm_gpio_softc *bcm_gpio_sc = NULL;
|
static struct bcm_gpio_softc *bcm_gpio_sc = NULL;
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static int bcm_gpio_intr_bank0(void *arg);
|
static int bcm_gpio_intr_bank0(void *arg);
|
||||||
static int bcm_gpio_intr_bank1(void *arg);
|
static int bcm_gpio_intr_bank1(void *arg);
|
||||||
static int bcm_gpio_pic_attach(struct bcm_gpio_softc *sc);
|
static int bcm_gpio_pic_attach(struct bcm_gpio_softc *sc);
|
||||||
@ -691,7 +691,7 @@ bcm_gpio_get_reserved_pins(struct bcm_gpio_softc *sc)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int
|
static int
|
||||||
bcm_gpio_intr(void *arg)
|
bcm_gpio_intr(void *arg)
|
||||||
{
|
{
|
||||||
@ -741,7 +741,7 @@ bcm_gpio_probe(device_t dev)
|
|||||||
return (BUS_PROBE_DEFAULT);
|
return (BUS_PROBE_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static int
|
static int
|
||||||
bcm_gpio_intr_attach(device_t dev)
|
bcm_gpio_intr_attach(device_t dev)
|
||||||
{
|
{
|
||||||
@ -862,7 +862,7 @@ bcm_gpio_attach(device_t dev)
|
|||||||
sc->sc_gpio_pins[i].gp_pin = j;
|
sc->sc_gpio_pins[i].gp_pin = j;
|
||||||
sc->sc_gpio_pins[i].gp_caps = BCM_GPIO_DEFAULT_CAPS;
|
sc->sc_gpio_pins[i].gp_caps = BCM_GPIO_DEFAULT_CAPS;
|
||||||
sc->sc_gpio_pins[i].gp_flags = bcm_gpio_func_flag(func);
|
sc->sc_gpio_pins[i].gp_flags = bcm_gpio_func_flag(func);
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
/* The default is active-low interrupts. */
|
/* The default is active-low interrupts. */
|
||||||
sc->sc_irq_trigger[i] = INTR_TRIGGER_LEVEL;
|
sc->sc_irq_trigger[i] = INTR_TRIGGER_LEVEL;
|
||||||
sc->sc_irq_polarity[i] = INTR_POLARITY_LOW;
|
sc->sc_irq_polarity[i] = INTR_POLARITY_LOW;
|
||||||
@ -892,7 +892,7 @@ bcm_gpio_detach(device_t dev)
|
|||||||
return (EBUSY);
|
return (EBUSY);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static inline void
|
static inline void
|
||||||
bcm_gpio_isrc_eoi(struct bcm_gpio_softc *sc, struct bcm_gpio_irqsrc *bgi)
|
bcm_gpio_isrc_eoi(struct bcm_gpio_softc *sc, struct bcm_gpio_irqsrc *bgi)
|
||||||
{
|
{
|
||||||
@ -1372,7 +1372,7 @@ static device_method_t bcm_gpio_methods[] = {
|
|||||||
DEVMETHOD(gpio_pin_set, bcm_gpio_pin_set),
|
DEVMETHOD(gpio_pin_set, bcm_gpio_pin_set),
|
||||||
DEVMETHOD(gpio_pin_toggle, bcm_gpio_pin_toggle),
|
DEVMETHOD(gpio_pin_toggle, bcm_gpio_pin_toggle),
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
/* Interrupt controller interface */
|
/* Interrupt controller interface */
|
||||||
DEVMETHOD(pic_disable_intr, bcm_gpio_pic_disable_intr),
|
DEVMETHOD(pic_disable_intr, bcm_gpio_pic_disable_intr),
|
||||||
DEVMETHOD(pic_enable_intr, bcm_gpio_pic_enable_intr),
|
DEVMETHOD(pic_enable_intr, bcm_gpio_pic_enable_intr),
|
||||||
|
@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <arm/broadcom/bcm2835/bcm2836.h>
|
#include <arm/broadcom/bcm2835/bcm2836.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#include "pic_if.h"
|
#include "pic_if.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#define BANK1_END (BANK1_START + 32 - 1)
|
#define BANK1_END (BANK1_START + 32 - 1)
|
||||||
#define BANK2_START (BANK1_START + 32)
|
#define BANK2_START (BANK1_START + 32)
|
||||||
#define BANK2_END (BANK2_START + 32 - 1)
|
#define BANK2_END (BANK2_START + 32 - 1)
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
#define BANK3_START (BANK2_START + 32)
|
#define BANK3_START (BANK2_START + 32)
|
||||||
#define BANK3_END (BANK3_START + 32 - 1)
|
#define BANK3_END (BANK3_START + 32 - 1)
|
||||||
#endif
|
#endif
|
||||||
@ -113,7 +113,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#define IS_IRQ_BASIC(n) (((n) >= 0) && ((n) < BANK1_START))
|
#define IS_IRQ_BASIC(n) (((n) >= 0) && ((n) < BANK1_START))
|
||||||
#define IS_IRQ_BANK1(n) (((n) >= BANK1_START) && ((n) <= BANK1_END))
|
#define IS_IRQ_BANK1(n) (((n) >= BANK1_START) && ((n) <= BANK1_END))
|
||||||
#define IS_IRQ_BANK2(n) (((n) >= BANK2_START) && ((n) <= BANK2_END))
|
#define IS_IRQ_BANK2(n) (((n) >= BANK2_START) && ((n) <= BANK2_END))
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
#define ID_IRQ_BCM2836(n) (((n) >= BANK3_START) && ((n) <= BANK3_END))
|
#define ID_IRQ_BCM2836(n) (((n) >= BANK3_START) && ((n) <= BANK3_END))
|
||||||
#endif
|
#endif
|
||||||
#define IRQ_BANK1(n) ((n) - BANK1_START)
|
#define IRQ_BANK1(n) ((n) - BANK1_START)
|
||||||
@ -125,7 +125,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#define dprintf(fmt, args...)
|
#define dprintf(fmt, args...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#define BCM_INTC_NIRQS 72 /* 8 + 32 + 32 */
|
#define BCM_INTC_NIRQS 72 /* 8 + 32 + 32 */
|
||||||
|
|
||||||
struct bcm_intc_irqsrc {
|
struct bcm_intc_irqsrc {
|
||||||
@ -142,7 +142,7 @@ struct bcm_intc_softc {
|
|||||||
struct resource * intc_res;
|
struct resource * intc_res;
|
||||||
bus_space_tag_t intc_bst;
|
bus_space_tag_t intc_bst;
|
||||||
bus_space_handle_t intc_bsh;
|
bus_space_handle_t intc_bsh;
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
struct resource * intc_irq_res;
|
struct resource * intc_irq_res;
|
||||||
void * intc_irq_hdl;
|
void * intc_irq_hdl;
|
||||||
struct bcm_intc_irqsrc intc_isrcs[BCM_INTC_NIRQS];
|
struct bcm_intc_irqsrc intc_isrcs[BCM_INTC_NIRQS];
|
||||||
@ -156,7 +156,7 @@ static struct bcm_intc_softc *bcm_intc_sc = NULL;
|
|||||||
#define intc_write_4(_sc, reg, val) \
|
#define intc_write_4(_sc, reg, val) \
|
||||||
bus_space_write_4((_sc)->intc_bst, (_sc)->intc_bsh, (reg), (val))
|
bus_space_write_4((_sc)->intc_bst, (_sc)->intc_bsh, (reg), (val))
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static inline void
|
static inline void
|
||||||
bcm_intc_isrc_mask(struct bcm_intc_softc *sc, struct bcm_intc_irqsrc *bii)
|
bcm_intc_isrc_mask(struct bcm_intc_softc *sc, struct bcm_intc_irqsrc *bii)
|
||||||
{
|
{
|
||||||
@ -360,7 +360,7 @@ bcm_intc_attach(device_t dev)
|
|||||||
{
|
{
|
||||||
struct bcm_intc_softc *sc = device_get_softc(dev);
|
struct bcm_intc_softc *sc = device_get_softc(dev);
|
||||||
int rid = 0;
|
int rid = 0;
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
intptr_t xref;
|
intptr_t xref;
|
||||||
#endif
|
#endif
|
||||||
sc->sc_dev = dev;
|
sc->sc_dev = dev;
|
||||||
@ -374,7 +374,7 @@ bcm_intc_attach(device_t dev)
|
|||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
xref = OF_xref_from_node(ofw_bus_get_node(dev));
|
xref = OF_xref_from_node(ofw_bus_get_node(dev));
|
||||||
if (bcm_intc_pic_register(sc, xref) != 0) {
|
if (bcm_intc_pic_register(sc, xref) != 0) {
|
||||||
bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->intc_res);
|
bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->intc_res);
|
||||||
@ -412,7 +412,7 @@ static device_method_t bcm_intc_methods[] = {
|
|||||||
DEVMETHOD(device_probe, bcm_intc_probe),
|
DEVMETHOD(device_probe, bcm_intc_probe),
|
||||||
DEVMETHOD(device_attach, bcm_intc_attach),
|
DEVMETHOD(device_attach, bcm_intc_attach),
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
DEVMETHOD(pic_disable_intr, bcm_intc_disable_intr),
|
DEVMETHOD(pic_disable_intr, bcm_intc_disable_intr),
|
||||||
DEVMETHOD(pic_enable_intr, bcm_intc_enable_intr),
|
DEVMETHOD(pic_enable_intr, bcm_intc_enable_intr),
|
||||||
DEVMETHOD(pic_map_intr, bcm_intc_map_intr),
|
DEVMETHOD(pic_map_intr, bcm_intc_map_intr),
|
||||||
@ -434,7 +434,7 @@ static devclass_t bcm_intc_devclass;
|
|||||||
|
|
||||||
DRIVER_MODULE(intc, simplebus, bcm_intc_driver, bcm_intc_devclass, 0, 0);
|
DRIVER_MODULE(intc, simplebus, bcm_intc_driver, bcm_intc_devclass, 0, 0);
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
int
|
int
|
||||||
arm_get_next_irq(int last_irq)
|
arm_get_next_irq(int last_irq)
|
||||||
{
|
{
|
||||||
|
@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <dev/ofw/ofw_bus_subr.h>
|
#include <dev/ofw/ofw_bus_subr.h>
|
||||||
#include <dev/ofw/ofw_bus.h>
|
#include <dev/ofw/ofw_bus.h>
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#include "pic_if.h"
|
#include "pic_if.h"
|
||||||
#else
|
#else
|
||||||
#include <arm/broadcom/bcm2835/bcm2836.h>
|
#include <arm/broadcom/bcm2835/bcm2836.h>
|
||||||
@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#define MAILBOX0_IRQEN (1 << 0)
|
#define MAILBOX0_IRQEN (1 << 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#define BCM_LINTC_CONTROL_REG 0x00
|
#define BCM_LINTC_CONTROL_REG 0x00
|
||||||
#define BCM_LINTC_PRESCALER_REG 0x08
|
#define BCM_LINTC_PRESCALER_REG 0x08
|
||||||
#define BCM_LINTC_GPU_ROUTING_REG 0x0c
|
#define BCM_LINTC_GPU_ROUTING_REG 0x0c
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#ifndef _BCM2815_BCM2836_H
|
#ifndef _BCM2815_BCM2836_H
|
||||||
#define _BCM2815_BCM2836_H
|
#define _BCM2815_BCM2836_H
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
#define BCM2836_GPU_IRQ 8
|
#define BCM2836_GPU_IRQ 8
|
||||||
|
|
||||||
int bcm2836_get_next_irq(int);
|
int bcm2836_get_next_irq(int);
|
||||||
|
@ -139,7 +139,7 @@ platform_mp_start_ap(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
void
|
void
|
||||||
pic_ipi_send(cpuset_t cpus, u_int ipi)
|
pic_ipi_send(cpuset_t cpus, u_int ipi)
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ ident A20
|
|||||||
include "std.armv6"
|
include "std.armv6"
|
||||||
include "../allwinner/a20/std.a20"
|
include "../allwinner/a20/std.a20"
|
||||||
|
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
options SOC_ALLWINNER_A20
|
options SOC_ALLWINNER_A20
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ options DDB #Enable the kernel debugger
|
|||||||
|
|
||||||
# Interrupt controller
|
# Interrupt controller
|
||||||
device gic
|
device gic
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
# Pseudo devices
|
# Pseudo devices
|
||||||
device loop
|
device loop
|
||||||
|
@ -62,7 +62,7 @@ device pci
|
|||||||
|
|
||||||
# Interrupt controllers
|
# Interrupt controllers
|
||||||
device gic
|
device gic
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
# Timers
|
# Timers
|
||||||
device mpcore_timer
|
device mpcore_timer
|
||||||
|
@ -28,7 +28,7 @@ include "../ti/am335x/std.am335x"
|
|||||||
|
|
||||||
makeoptions MODULES_EXTRA="dtb/am335x am335x_dmtpps"
|
makeoptions MODULES_EXTRA="dtb/am335x am335x_dmtpps"
|
||||||
|
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
options HZ=100
|
options HZ=100
|
||||||
options SCHED_4BSD # 4BSD scheduler
|
options SCHED_4BSD # 4BSD scheduler
|
||||||
|
@ -87,7 +87,7 @@ device dwmmc
|
|||||||
|
|
||||||
# Interrupt controller
|
# Interrupt controller
|
||||||
device gic
|
device gic
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
# ARM Generic Timer
|
# ARM Generic Timer
|
||||||
device generic_timer
|
device generic_timer
|
||||||
|
@ -22,7 +22,7 @@ ident IMX6
|
|||||||
include "std.armv6"
|
include "std.armv6"
|
||||||
include "../freescale/imx/std.imx6"
|
include "../freescale/imx/std.imx6"
|
||||||
|
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
options SOC_IMX6
|
options SOC_IMX6
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ options SMP # Enable multiple cores
|
|||||||
|
|
||||||
# Interrupt controller
|
# Interrupt controller
|
||||||
device gic
|
device gic
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
options FDT_DTB_STATIC
|
options FDT_DTB_STATIC
|
||||||
makeoptions FDT_DTS_FILE=odroidc1.dts
|
makeoptions FDT_DTS_FILE=odroidc1.dts
|
||||||
|
@ -60,7 +60,7 @@ options DDB # Enable the kernel debugger
|
|||||||
device fdt_pinctrl
|
device fdt_pinctrl
|
||||||
# Interrupt controller
|
# Interrupt controller
|
||||||
device gic
|
device gic
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
# ARM MPCore timer
|
# ARM MPCore timer
|
||||||
device mpcore_timer
|
device mpcore_timer
|
||||||
|
@ -47,7 +47,7 @@ options ROOTDEVNAME=\"ufs:/dev/mmcsd0\"
|
|||||||
|
|
||||||
# Interrupt controller
|
# Interrupt controller
|
||||||
device gic
|
device gic
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
# ARM MPCore timer
|
# ARM MPCore timer
|
||||||
device mpcore_timer
|
device mpcore_timer
|
||||||
|
@ -24,7 +24,7 @@ include "std.armv6"
|
|||||||
include "../broadcom/bcm2835/std.rpi"
|
include "../broadcom/bcm2835/std.rpi"
|
||||||
include "../broadcom/bcm2835/std.bcm2835"
|
include "../broadcom/bcm2835/std.bcm2835"
|
||||||
|
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
options HZ=100
|
options HZ=100
|
||||||
options SCHED_4BSD # 4BSD scheduler
|
options SCHED_4BSD # 4BSD scheduler
|
||||||
|
@ -24,7 +24,7 @@ include "std.armv6"
|
|||||||
include "../broadcom/bcm2835/std.rpi"
|
include "../broadcom/bcm2835/std.rpi"
|
||||||
include "../broadcom/bcm2835/std.bcm2836"
|
include "../broadcom/bcm2835/std.bcm2836"
|
||||||
|
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
options HZ=100
|
options HZ=100
|
||||||
options SCHED_ULE # ULE scheduler
|
options SCHED_ULE # ULE scheduler
|
||||||
|
@ -53,7 +53,7 @@ options INVARIANT_SUPPORT # Extra sanity checks of internal structures, require
|
|||||||
|
|
||||||
# Interrupt controller
|
# Interrupt controller
|
||||||
device gic
|
device gic
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
# ARM MPCore timer
|
# ARM MPCore timer
|
||||||
device mpcore_timer
|
device mpcore_timer
|
||||||
|
@ -47,7 +47,7 @@ options INVARIANT_SUPPORT # Extra sanity checks of internal structures, require
|
|||||||
|
|
||||||
# Interrupt controller
|
# Interrupt controller
|
||||||
device gic
|
device gic
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
# ARM Generic Timer
|
# ARM Generic Timer
|
||||||
device generic_timer
|
device generic_timer
|
||||||
|
@ -26,7 +26,7 @@ options SMP # Enable multiple cores
|
|||||||
|
|
||||||
# Interrupt controller
|
# Interrupt controller
|
||||||
device gic
|
device gic
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
options FDT_DTB_STATIC
|
options FDT_DTB_STATIC
|
||||||
makeoptions FDT_DTS_FILE=vsatv102-m6.dts
|
makeoptions FDT_DTS_FILE=vsatv102-m6.dts
|
||||||
|
@ -62,7 +62,7 @@ options NO_SWAPPING
|
|||||||
|
|
||||||
# Interrupt controller
|
# Interrupt controller
|
||||||
device gic
|
device gic
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
# ARM MPCore timer
|
# ARM MPCore timer
|
||||||
device mpcore_timer
|
device mpcore_timer
|
||||||
|
@ -52,7 +52,7 @@ options ROOTDEVNAME=\"ufs:mmcsd0s2a\"
|
|||||||
|
|
||||||
# Interrupt controller
|
# Interrupt controller
|
||||||
device gic
|
device gic
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
# Cache controller
|
# Cache controller
|
||||||
device pl310 # PL310 L2 cache controller
|
device pl310 # PL310 L2 cache controller
|
||||||
|
@ -58,7 +58,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
|
|
||||||
static uint32_t gpio1_node;
|
static uint32_t gpio1_node;
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
/*
|
/*
|
||||||
* Work around the linux workaround for imx6 erratum 006687, in which some
|
* Work around the linux workaround for imx6 erratum 006687, in which some
|
||||||
* ethernet interrupts don't go to the GPC and thus won't wake the system from
|
* ethernet interrupts don't go to the GPC and thus won't wake the system from
|
||||||
|
@ -54,7 +54,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int
|
static int
|
||||||
fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
int *pol)
|
int *pol)
|
||||||
@ -71,4 +71,4 @@ fdt_pic_decode_t fdt_pic_table[] = {
|
|||||||
&fdt_intc_decode_ic,
|
&fdt_intc_decode_ic,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
#endif /* ARM_INTRNG */
|
#endif /* INTRNG */
|
||||||
|
@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include "gpio_if.h"
|
#include "gpio_if.h"
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#include "pic_if.h"
|
#include "pic_if.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)
|
#define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)
|
||||||
#define NGPIO 32
|
#define NGPIO 32
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
struct gpio_irqsrc {
|
struct gpio_irqsrc {
|
||||||
struct intr_irqsrc gi_isrc;
|
struct intr_irqsrc gi_isrc;
|
||||||
u_int gi_irq;
|
u_int gi_irq;
|
||||||
@ -110,7 +110,7 @@ struct imx51_gpio_softc {
|
|||||||
bus_space_handle_t sc_ioh;
|
bus_space_handle_t sc_ioh;
|
||||||
int gpio_npins;
|
int gpio_npins;
|
||||||
struct gpio_pin gpio_pins[NGPIO];
|
struct gpio_pin gpio_pins[NGPIO];
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
struct gpio_irqsrc gpio_pic_irqsrc[NGPIO];
|
struct gpio_irqsrc gpio_pic_irqsrc[NGPIO];
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@ -155,7 +155,7 @@ static int imx51_gpio_pin_set(device_t, uint32_t, unsigned int);
|
|||||||
static int imx51_gpio_pin_get(device_t, uint32_t, unsigned int *);
|
static int imx51_gpio_pin_get(device_t, uint32_t, unsigned int *);
|
||||||
static int imx51_gpio_pin_toggle(device_t, uint32_t pin);
|
static int imx51_gpio_pin_toggle(device_t, uint32_t pin);
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static int
|
static int
|
||||||
gpio_pic_map_fdt(device_t dev, u_int ncells, pcell_t *cells, u_int *irqp,
|
gpio_pic_map_fdt(device_t dev, u_int ncells, pcell_t *cells, u_int *irqp,
|
||||||
enum intr_polarity *polp, enum intr_trigger *trigp)
|
enum intr_polarity *polp, enum intr_trigger *trigp)
|
||||||
@ -653,7 +653,7 @@ imx51_gpio_attach(device_t dev)
|
|||||||
*/
|
*/
|
||||||
WRITE4(sc, IMX_GPIO_IMR_REG, 0);
|
WRITE4(sc, IMX_GPIO_IMR_REG, 0);
|
||||||
for (irq = 0; irq < 2; irq++) {
|
for (irq = 0; irq < 2; irq++) {
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
if ((bus_setup_intr(dev, sc->sc_res[1 + irq], INTR_TYPE_CLK,
|
if ((bus_setup_intr(dev, sc->sc_res[1 + irq], INTR_TYPE_CLK,
|
||||||
gpio_pic_filter, NULL, sc, &sc->gpio_ih[irq]))) {
|
gpio_pic_filter, NULL, sc, &sc->gpio_ih[irq]))) {
|
||||||
device_printf(dev,
|
device_printf(dev,
|
||||||
@ -675,7 +675,7 @@ imx51_gpio_attach(device_t dev)
|
|||||||
"imx_gpio%d.%d", unit, i);
|
"imx_gpio%d.%d", unit, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
gpio_pic_register_isrcs(sc);
|
gpio_pic_register_isrcs(sc);
|
||||||
intr_pic_register(dev, OF_xref_from_node(ofw_bus_get_node(dev)));
|
intr_pic_register(dev, OF_xref_from_node(ofw_bus_get_node(dev)));
|
||||||
#endif
|
#endif
|
||||||
@ -713,7 +713,7 @@ static device_method_t imx51_gpio_methods[] = {
|
|||||||
DEVMETHOD(device_attach, imx51_gpio_attach),
|
DEVMETHOD(device_attach, imx51_gpio_attach),
|
||||||
DEVMETHOD(device_detach, imx51_gpio_detach),
|
DEVMETHOD(device_detach, imx51_gpio_detach),
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
/* Interrupt controller interface */
|
/* Interrupt controller interface */
|
||||||
DEVMETHOD(pic_disable_intr, gpio_pic_disable_intr),
|
DEVMETHOD(pic_disable_intr, gpio_pic_disable_intr),
|
||||||
DEVMETHOD(pic_enable_intr, gpio_pic_enable_intr),
|
DEVMETHOD(pic_enable_intr, gpio_pic_enable_intr),
|
||||||
|
@ -66,7 +66,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int
|
static int
|
||||||
fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
int *pol)
|
int *pol)
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
#include <dev/ofw/openfirm.h>
|
#include <dev/ofw/openfirm.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
|
|
||||||
#ifndef NIRQ
|
#ifndef NIRQ
|
||||||
#define NIRQ 1024 /* XXX - It should be an option. */
|
#define NIRQ 1024 /* XXX - It should be an option. */
|
||||||
@ -63,7 +63,7 @@ void intr_ipi_setup(u_int, const char *, intr_ipi_handler_t *, void *,
|
|||||||
|
|
||||||
int intr_pic_ipi_setup(u_int, const char *, intr_ipi_handler_t *, void *);
|
int intr_pic_ipi_setup(u_int, const char *, intr_ipi_handler_t *, void *);
|
||||||
#endif
|
#endif
|
||||||
#else /* ARM_INTRNG */
|
#else /* INTRNG */
|
||||||
|
|
||||||
/* XXX move to std.* files? */
|
/* XXX move to std.* files? */
|
||||||
#ifdef CPU_XSCALE_81342
|
#ifdef CPU_XSCALE_81342
|
||||||
@ -111,7 +111,7 @@ int gic_decode_fdt(phandle_t, pcell_t *, int *, int *, int *);
|
|||||||
int intr_fdt_map_irq(phandle_t, pcell_t *, int);
|
int intr_fdt_map_irq(phandle_t, pcell_t *, int);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* ARM_INTRNG */
|
#endif /* INTRNG */
|
||||||
|
|
||||||
void arm_irq_memory_barrier(uintptr_t);
|
void arm_irq_memory_barrier(uintptr_t);
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include <sys/_cpuset.h>
|
#include <sys/_cpuset.h>
|
||||||
#include <machine/pcb.h>
|
#include <machine/pcb.h>
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
enum {
|
enum {
|
||||||
IPI_AST,
|
IPI_AST,
|
||||||
IPI_PREEMPT,
|
IPI_PREEMPT,
|
||||||
@ -37,7 +37,7 @@ void ipi_cpu(int cpu, u_int ipi);
|
|||||||
void ipi_selected(cpuset_t cpus, u_int ipi);
|
void ipi_selected(cpuset_t cpus, u_int ipi);
|
||||||
|
|
||||||
/* PIC interface */
|
/* PIC interface */
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
void pic_ipi_send(cpuset_t cpus, u_int ipi);
|
void pic_ipi_send(cpuset_t cpus, u_int ipi);
|
||||||
void pic_ipi_clear(int ipi);
|
void pic_ipi_clear(int ipi);
|
||||||
int pic_ipi_read(int arg);
|
int pic_ipi_read(int arg);
|
||||||
|
@ -231,7 +231,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int
|
static int
|
||||||
fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
int *pol)
|
int *pol)
|
||||||
|
@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <dev/ofw/ofw_bus_subr.h>
|
#include <dev/ofw/ofw_bus_subr.h>
|
||||||
#include <dev/fdt/fdt_common.h>
|
#include <dev/fdt/fdt_common.h>
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#include "pic_if.h"
|
#include "pic_if.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#define MPIC_PPI 32
|
#define MPIC_PPI 32
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
struct mv_mpic_irqsrc {
|
struct mv_mpic_irqsrc {
|
||||||
struct intr_irqsrc mmi_isrc;
|
struct intr_irqsrc mmi_isrc;
|
||||||
u_int mmi_irq;
|
u_int mmi_irq;
|
||||||
@ -115,7 +115,7 @@ struct mv_mpic_softc {
|
|||||||
bus_space_tag_t drbl_bst;
|
bus_space_tag_t drbl_bst;
|
||||||
bus_space_handle_t drbl_bsh;
|
bus_space_handle_t drbl_bsh;
|
||||||
struct mtx mtx;
|
struct mtx mtx;
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
struct mv_mpic_irqsrc * mpic_isrcs;
|
struct mv_mpic_irqsrc * mpic_isrcs;
|
||||||
#endif
|
#endif
|
||||||
int nirqs;
|
int nirqs;
|
||||||
@ -151,7 +151,7 @@ static void mpic_mask_irq_err(uintptr_t nb);
|
|||||||
static void mpic_unmask_irq_err(uintptr_t nb);
|
static void mpic_unmask_irq_err(uintptr_t nb);
|
||||||
static int mpic_intr(void *arg);
|
static int mpic_intr(void *arg);
|
||||||
static void mpic_unmask_msi(void);
|
static void mpic_unmask_msi(void);
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static void arm_mask_irq_err(uintptr_t);
|
static void arm_mask_irq_err(uintptr_t);
|
||||||
static void arm_unmask_irq_err(uintptr_t);
|
static void arm_unmask_irq_err(uintptr_t);
|
||||||
#endif
|
#endif
|
||||||
@ -185,7 +185,7 @@ mv_mpic_probe(device_t dev)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static int
|
static int
|
||||||
mv_mpic_register_isrcs(struct mv_mpic_softc *sc)
|
mv_mpic_register_isrcs(struct mv_mpic_softc *sc)
|
||||||
{
|
{
|
||||||
@ -241,7 +241,7 @@ mv_mpic_attach(device_t dev)
|
|||||||
device_printf(dev, "could not allocate resources\n");
|
device_printf(dev, "could not allocate resources\n");
|
||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
}
|
}
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
if (sc->mpic_res[3] == NULL)
|
if (sc->mpic_res[3] == NULL)
|
||||||
device_printf(dev, "No interrupt to use.\n");
|
device_printf(dev, "No interrupt to use.\n");
|
||||||
else
|
else
|
||||||
@ -268,7 +268,7 @@ mv_mpic_attach(device_t dev)
|
|||||||
val = MPIC_READ(mv_mpic_sc, MPIC_CTRL);
|
val = MPIC_READ(mv_mpic_sc, MPIC_CTRL);
|
||||||
sc->nirqs = MPIC_CTRL_NIRQS(val);
|
sc->nirqs = MPIC_CTRL_NIRQS(val);
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
if (mv_mpic_register_isrcs(sc) != 0) {
|
if (mv_mpic_register_isrcs(sc) != 0) {
|
||||||
device_printf(dev, "could not register PIC ISRCs\n");
|
device_printf(dev, "could not register PIC ISRCs\n");
|
||||||
bus_release_resources(dev, mv_mpic_spec, sc->mpic_res);
|
bus_release_resources(dev, mv_mpic_spec, sc->mpic_res);
|
||||||
@ -286,7 +286,7 @@ mv_mpic_attach(device_t dev)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static int
|
static int
|
||||||
mpic_intr(void *arg)
|
mpic_intr(void *arg)
|
||||||
{
|
{
|
||||||
@ -370,7 +370,7 @@ static device_method_t mv_mpic_methods[] = {
|
|||||||
DEVMETHOD(device_probe, mv_mpic_probe),
|
DEVMETHOD(device_probe, mv_mpic_probe),
|
||||||
DEVMETHOD(device_attach, mv_mpic_attach),
|
DEVMETHOD(device_attach, mv_mpic_attach),
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
DEVMETHOD(pic_disable_intr, mpic_disable_intr),
|
DEVMETHOD(pic_disable_intr, mpic_disable_intr),
|
||||||
DEVMETHOD(pic_enable_intr, mpic_enable_intr),
|
DEVMETHOD(pic_enable_intr, mpic_enable_intr),
|
||||||
DEVMETHOD(pic_map_intr, mpic_map_intr),
|
DEVMETHOD(pic_map_intr, mpic_map_intr),
|
||||||
@ -391,7 +391,7 @@ static devclass_t mv_mpic_devclass;
|
|||||||
EARLY_DRIVER_MODULE(mpic, simplebus, mv_mpic_driver, mv_mpic_devclass, 0, 0,
|
EARLY_DRIVER_MODULE(mpic, simplebus, mv_mpic_driver, mv_mpic_devclass, 0, 0,
|
||||||
BUS_PASS_INTERRUPT);
|
BUS_PASS_INTERRUPT);
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
int
|
int
|
||||||
arm_get_next_irq(int last)
|
arm_get_next_irq(int last)
|
||||||
{
|
{
|
||||||
|
@ -2282,7 +2282,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int
|
static int
|
||||||
fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
int *pol)
|
int *pol)
|
||||||
|
@ -6,7 +6,7 @@ makeoptions CONF_CFLAGS="-march=armv7a"
|
|||||||
options KERNVIRTADDR = 0xc0200000
|
options KERNVIRTADDR = 0xc0200000
|
||||||
makeoptions KERNVIRTADDR = 0xc0200000
|
makeoptions KERNVIRTADDR = 0xc0200000
|
||||||
|
|
||||||
options ARM_INTRNG
|
options INTRNG
|
||||||
|
|
||||||
options IPI_IRQ_START=0
|
options IPI_IRQ_START=0
|
||||||
options IPI_IRQ_END=15
|
options IPI_IRQ_END=15
|
||||||
|
@ -41,7 +41,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
fdt_pic_decode_t fdt_pic_table[] = {
|
fdt_pic_decode_t fdt_pic_table[] = {
|
||||||
&gic_decode_fdt,
|
&gic_decode_fdt,
|
||||||
NULL
|
NULL
|
||||||
|
@ -42,7 +42,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int
|
static int
|
||||||
fdt_aintc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
fdt_aintc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
int *pol)
|
int *pol)
|
||||||
|
@ -53,7 +53,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int
|
static int
|
||||||
fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
int *pol)
|
int *pol)
|
||||||
|
@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <dev/ofw/ofw_bus.h>
|
#include <dev/ofw/ofw_bus.h>
|
||||||
#include <dev/ofw/ofw_bus_subr.h>
|
#include <dev/ofw/ofw_bus_subr.h>
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#include "pic_if.h"
|
#include "pic_if.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#define INTC_NIRQS 128
|
#define INTC_NIRQS 128
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
struct ti_aintc_irqsrc {
|
struct ti_aintc_irqsrc {
|
||||||
struct intr_irqsrc tai_isrc;
|
struct intr_irqsrc tai_isrc;
|
||||||
u_int tai_irq;
|
u_int tai_irq;
|
||||||
@ -81,7 +81,7 @@ struct ti_aintc_softc {
|
|||||||
bus_space_tag_t aintc_bst;
|
bus_space_tag_t aintc_bst;
|
||||||
bus_space_handle_t aintc_bsh;
|
bus_space_handle_t aintc_bsh;
|
||||||
uint8_t ver;
|
uint8_t ver;
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
struct ti_aintc_irqsrc aintc_isrcs[INTC_NIRQS];
|
struct ti_aintc_irqsrc aintc_isrcs[INTC_NIRQS];
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@ -105,7 +105,7 @@ static struct ofw_compat_data compat_data[] = {
|
|||||||
{NULL, 0},
|
{NULL, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static inline void
|
static inline void
|
||||||
ti_aintc_irq_eoi(struct ti_aintc_softc *sc)
|
ti_aintc_irq_eoi(struct ti_aintc_softc *sc)
|
||||||
{
|
{
|
||||||
@ -295,7 +295,7 @@ ti_aintc_attach(device_t dev)
|
|||||||
/*Set Priority Threshold */
|
/*Set Priority Threshold */
|
||||||
aintc_write_4(sc, INTC_THRESHOLD, 0xFF);
|
aintc_write_4(sc, INTC_THRESHOLD, 0xFF);
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
arm_post_filter = aintc_post_filter;
|
arm_post_filter = aintc_post_filter;
|
||||||
#else
|
#else
|
||||||
if (ti_aintc_pic_attach(sc) != 0) {
|
if (ti_aintc_pic_attach(sc) != 0) {
|
||||||
@ -310,7 +310,7 @@ static device_method_t ti_aintc_methods[] = {
|
|||||||
DEVMETHOD(device_probe, ti_aintc_probe),
|
DEVMETHOD(device_probe, ti_aintc_probe),
|
||||||
DEVMETHOD(device_attach, ti_aintc_attach),
|
DEVMETHOD(device_attach, ti_aintc_attach),
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
DEVMETHOD(pic_disable_intr, ti_aintc_disable_intr),
|
DEVMETHOD(pic_disable_intr, ti_aintc_disable_intr),
|
||||||
DEVMETHOD(pic_enable_intr, ti_aintc_enable_intr),
|
DEVMETHOD(pic_enable_intr, ti_aintc_enable_intr),
|
||||||
DEVMETHOD(pic_map_intr, ti_aintc_map_intr),
|
DEVMETHOD(pic_map_intr, ti_aintc_map_intr),
|
||||||
@ -334,7 +334,7 @@ EARLY_DRIVER_MODULE(aintc, simplebus, ti_aintc_driver, ti_aintc_devclass,
|
|||||||
0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE);
|
0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE);
|
||||||
SIMPLEBUS_PNP_INFO(compat_data);
|
SIMPLEBUS_PNP_INFO(compat_data);
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
int
|
int
|
||||||
arm_get_next_irq(int last_irq)
|
arm_get_next_irq(int last_irq)
|
||||||
{
|
{
|
||||||
|
@ -53,7 +53,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
#ifdef SOC_TI_AM335X
|
#ifdef SOC_TI_AM335X
|
||||||
static int
|
static int
|
||||||
fdt_aintc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
fdt_aintc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
@ -81,4 +81,4 @@ fdt_pic_decode_t fdt_pic_table[] = {
|
|||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
#endif /* !ARM_INTRNG */
|
#endif /* !INTRNG */
|
||||||
|
@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include "gpio_if.h"
|
#include "gpio_if.h"
|
||||||
#include "ti_gpio_if.h"
|
#include "ti_gpio_if.h"
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
#include "pic_if.h"
|
#include "pic_if.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
static int ti_gpio_intr(void *arg);
|
static int ti_gpio_intr(void *arg);
|
||||||
static int ti_gpio_detach(device_t);
|
static int ti_gpio_detach(device_t);
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static int ti_gpio_pic_attach(struct ti_gpio_softc *sc);
|
static int ti_gpio_pic_attach(struct ti_gpio_softc *sc);
|
||||||
static int ti_gpio_pic_detach(struct ti_gpio_softc *sc);
|
static int ti_gpio_pic_detach(struct ti_gpio_softc *sc);
|
||||||
#endif
|
#endif
|
||||||
@ -546,7 +546,7 @@ ti_gpio_pin_toggle(device_t dev, uint32_t pin)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
/**
|
/**
|
||||||
* ti_gpio_intr - ISR for all GPIO modules
|
* ti_gpio_intr - ISR for all GPIO modules
|
||||||
* @arg: the soft context pointer
|
* @arg: the soft context pointer
|
||||||
@ -655,7 +655,7 @@ static int
|
|||||||
ti_gpio_attach(device_t dev)
|
ti_gpio_attach(device_t dev)
|
||||||
{
|
{
|
||||||
struct ti_gpio_softc *sc;
|
struct ti_gpio_softc *sc;
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
#endif
|
#endif
|
||||||
int err;
|
int err;
|
||||||
@ -696,7 +696,7 @@ ti_gpio_attach(device_t dev)
|
|||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
if (ti_gpio_pic_attach(sc) != 0) {
|
if (ti_gpio_pic_attach(sc) != 0) {
|
||||||
device_printf(dev, "WARNING: unable to attach PIC\n");
|
device_printf(dev, "WARNING: unable to attach PIC\n");
|
||||||
ti_gpio_detach(dev);
|
ti_gpio_detach(dev);
|
||||||
@ -771,7 +771,7 @@ ti_gpio_detach(device_t dev)
|
|||||||
if (sc->sc_mem_res != NULL)
|
if (sc->sc_mem_res != NULL)
|
||||||
ti_gpio_intr_clr(sc, 0xffffffff);
|
ti_gpio_intr_clr(sc, 0xffffffff);
|
||||||
gpiobus_detach_bus(dev);
|
gpiobus_detach_bus(dev);
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
if (sc->sc_isrcs != NULL)
|
if (sc->sc_isrcs != NULL)
|
||||||
ti_gpio_pic_detach(sc);
|
ti_gpio_pic_detach(sc);
|
||||||
#else
|
#else
|
||||||
@ -798,7 +798,7 @@ ti_gpio_detach(device_t dev)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
static inline void
|
static inline void
|
||||||
ti_gpio_rwreg_set(struct ti_gpio_softc *sc, uint32_t reg, uint32_t mask)
|
ti_gpio_rwreg_set(struct ti_gpio_softc *sc, uint32_t reg, uint32_t mask)
|
||||||
{
|
{
|
||||||
@ -1300,7 +1300,7 @@ static device_method_t ti_gpio_methods[] = {
|
|||||||
DEVMETHOD(gpio_pin_set, ti_gpio_pin_set),
|
DEVMETHOD(gpio_pin_set, ti_gpio_pin_set),
|
||||||
DEVMETHOD(gpio_pin_toggle, ti_gpio_pin_toggle),
|
DEVMETHOD(gpio_pin_toggle, ti_gpio_pin_toggle),
|
||||||
|
|
||||||
#ifdef ARM_INTRNG
|
#ifdef INTRNG
|
||||||
/* Interrupt controller interface */
|
/* Interrupt controller interface */
|
||||||
DEVMETHOD(pic_disable_intr, ti_gpio_pic_disable_intr),
|
DEVMETHOD(pic_disable_intr, ti_gpio_pic_disable_intr),
|
||||||
DEVMETHOD(pic_enable_intr, ti_gpio_pic_enable_intr),
|
DEVMETHOD(pic_enable_intr, ti_gpio_pic_enable_intr),
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
*/
|
*/
|
||||||
#define MAX_GPIO_INTRS 8
|
#define MAX_GPIO_INTRS 8
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
struct ti_gpio_mask_arg {
|
struct ti_gpio_mask_arg {
|
||||||
void *softc;
|
void *softc;
|
||||||
int pin;
|
int pin;
|
||||||
@ -61,7 +61,7 @@ struct ti_gpio_irqsrc {
|
|||||||
struct ti_gpio_softc {
|
struct ti_gpio_softc {
|
||||||
device_t sc_dev;
|
device_t sc_dev;
|
||||||
device_t sc_busdev;
|
device_t sc_busdev;
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
/* Interrupt trigger type and level. */
|
/* Interrupt trigger type and level. */
|
||||||
enum intr_trigger *sc_irq_trigger;
|
enum intr_trigger *sc_irq_trigger;
|
||||||
enum intr_polarity *sc_irq_polarity;
|
enum intr_polarity *sc_irq_polarity;
|
||||||
@ -74,7 +74,7 @@ struct ti_gpio_softc {
|
|||||||
struct resource *sc_mem_res;
|
struct resource *sc_mem_res;
|
||||||
int sc_irq_rid;
|
int sc_irq_rid;
|
||||||
struct resource *sc_irq_res;
|
struct resource *sc_irq_res;
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
/* Interrupt events. */
|
/* Interrupt events. */
|
||||||
struct intr_event **sc_events;
|
struct intr_event **sc_events;
|
||||||
struct ti_gpio_mask_arg *sc_mask_args;
|
struct ti_gpio_mask_arg *sc_mask_args;
|
||||||
|
@ -50,7 +50,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int
|
static int
|
||||||
fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
int *pol)
|
int *pol)
|
||||||
|
@ -98,7 +98,7 @@ struct fdt_fixup_entry fdt_fixup_table[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ARM_INTRNG
|
#ifndef INTRNG
|
||||||
static int
|
static int
|
||||||
fdt_gic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
fdt_gic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
int *pol)
|
int *pol)
|
||||||
|
@ -45,8 +45,8 @@ arm/arm/hdmi_if.m optional hdmi
|
|||||||
arm/arm/identcpu.c standard
|
arm/arm/identcpu.c standard
|
||||||
arm/arm/in_cksum.c optional inet | inet6
|
arm/arm/in_cksum.c optional inet | inet6
|
||||||
arm/arm/in_cksum_arm.S optional inet | inet6
|
arm/arm/in_cksum_arm.S optional inet | inet6
|
||||||
arm/arm/intr.c optional !arm_intrng
|
arm/arm/intr.c optional !intrng
|
||||||
kern/subr_intr.c optional arm_intrng
|
kern/subr_intr.c optional intrng
|
||||||
arm/arm/locore.S standard no-obj
|
arm/arm/locore.S standard no-obj
|
||||||
arm/arm/machdep.c standard
|
arm/arm/machdep.c standard
|
||||||
arm/arm/machdep_intr.c standard
|
arm/arm/machdep_intr.c standard
|
||||||
@ -115,7 +115,7 @@ font.h optional sc \
|
|||||||
compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \
|
compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \
|
||||||
no-obj no-implicit-rule before-depend \
|
no-obj no-implicit-rule before-depend \
|
||||||
clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8"
|
clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8"
|
||||||
kern/pic_if.m optional arm_intrng
|
kern/pic_if.m optional intrng
|
||||||
kern/subr_busdma_bufalloc.c standard
|
kern/subr_busdma_bufalloc.c standard
|
||||||
kern/subr_sfbuf.c standard
|
kern/subr_sfbuf.c standard
|
||||||
libkern/arm/aeabi_unwind.c standard
|
libkern/arm/aeabi_unwind.c standard
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#$FreeBSD$
|
#$FreeBSD$
|
||||||
ARMV6 opt_global.h
|
ARMV6 opt_global.h
|
||||||
ARM_CACHE_LOCK_ENABLE opt_global.h
|
ARM_CACHE_LOCK_ENABLE opt_global.h
|
||||||
ARM_INTRNG opt_global.h
|
|
||||||
ARM_KERN_DIRECTMAP opt_vm.h
|
ARM_KERN_DIRECTMAP opt_vm.h
|
||||||
ARM_L2_PIPT opt_global.h
|
ARM_L2_PIPT opt_global.h
|
||||||
ARM_MANY_BOARD opt_global.h
|
ARM_MANY_BOARD opt_global.h
|
||||||
@ -24,6 +23,7 @@ DEV_PMU opt_global.h
|
|||||||
EFI opt_platform.h
|
EFI opt_platform.h
|
||||||
FLASHADDR opt_global.h
|
FLASHADDR opt_global.h
|
||||||
GIC_DEFAULT_ICFGR_INIT opt_global.h
|
GIC_DEFAULT_ICFGR_INIT opt_global.h
|
||||||
|
INTRNG opt_global.h
|
||||||
IPI_IRQ_START opt_smp.h
|
IPI_IRQ_START opt_smp.h
|
||||||
IPI_IRQ_END opt_smp.h
|
IPI_IRQ_END opt_smp.h
|
||||||
FREEBSD_BOOT_LOADER opt_global.h
|
FREEBSD_BOOT_LOADER opt_global.h
|
||||||
|
@ -144,5 +144,5 @@ PV_STATS opt_pmap.h
|
|||||||
#
|
#
|
||||||
# Options to use INTRNG code
|
# Options to use INTRNG code
|
||||||
#
|
#
|
||||||
MIPS_INTRNG opt_global.h
|
INTRNG opt_global.h
|
||||||
MIPS_NIRQ opt_global.h
|
MIPS_NIRQ opt_global.h
|
||||||
|
@ -45,7 +45,7 @@ struct fdt_sense_level {
|
|||||||
enum intr_polarity pol;
|
enum intr_polarity pol;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(__arm__) && !defined(ARM_INTRNG)
|
#if defined(__arm__) && !defined(INTRNG)
|
||||||
typedef int (*fdt_pic_decode_t)(phandle_t, pcell_t *, int *, int *, int *);
|
typedef int (*fdt_pic_decode_t)(phandle_t, pcell_t *, int *, int *, int *);
|
||||||
extern fdt_pic_decode_t fdt_pic_table[];
|
extern fdt_pic_decode_t fdt_pic_table[];
|
||||||
#endif
|
#endif
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
#ifndef _MACHINE_INTR_H_
|
#ifndef _MACHINE_INTR_H_
|
||||||
#define _MACHINE_INTR_H_
|
#define _MACHINE_INTR_H_
|
||||||
|
|
||||||
#ifdef MIPS_INTRNG
|
#ifdef INTRNG
|
||||||
|
|
||||||
#ifdef FDT
|
#ifdef FDT
|
||||||
#include <dev/ofw/openfirm.h>
|
#include <dev/ofw/openfirm.h>
|
||||||
@ -66,6 +66,6 @@ void cpu_establish_softintr(const char *, driver_filter_t *, void (*)(void*),
|
|||||||
/* MIPS interrupt C entry point */
|
/* MIPS interrupt C entry point */
|
||||||
void cpu_intr(struct trapframe *);
|
void cpu_intr(struct trapframe *);
|
||||||
|
|
||||||
#endif /* MIPS_INTRNG */
|
#endif /* INTRNG */
|
||||||
|
|
||||||
#endif /* _MACHINE_INTR_H */
|
#endif /* _MACHINE_INTR_H */
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <machine/pcb.h>
|
#include <machine/pcb.h>
|
||||||
|
|
||||||
#ifdef MIPS_INTRNG
|
#ifdef INTRNG
|
||||||
# define MIPS_IPI_COUNT 1
|
# define MIPS_IPI_COUNT 1
|
||||||
# define INTR_IPI_COUNT MIPS_IPI_COUNT
|
# define INTR_IPI_COUNT MIPS_IPI_COUNT
|
||||||
#endif
|
#endif
|
||||||
|
@ -646,7 +646,7 @@ NESTED_NOPROFILE(MipsKernIntr, KERN_EXC_FRAME_SIZE, ra)
|
|||||||
* Call the interrupt handler. a0 points at the saved frame.
|
* Call the interrupt handler. a0 points at the saved frame.
|
||||||
*/
|
*/
|
||||||
PTR_LA gp, _C_LABEL(_gp)
|
PTR_LA gp, _C_LABEL(_gp)
|
||||||
#ifdef MIPS_INTRNG
|
#ifdef INTRNG
|
||||||
PTR_LA k0, _C_LABEL(intr_irq_handler)
|
PTR_LA k0, _C_LABEL(intr_irq_handler)
|
||||||
#else
|
#else
|
||||||
PTR_LA k0, _C_LABEL(cpu_intr)
|
PTR_LA k0, _C_LABEL(cpu_intr)
|
||||||
@ -762,7 +762,7 @@ NESTED_NOPROFILE(MipsUserIntr, CALLFRAME_SIZ, ra)
|
|||||||
/*
|
/*
|
||||||
* Call the interrupt handler.
|
* Call the interrupt handler.
|
||||||
*/
|
*/
|
||||||
#ifdef MIPS_INTRNG
|
#ifdef INTRNG
|
||||||
PTR_LA k0, _C_LABEL(intr_irq_handler)
|
PTR_LA k0, _C_LABEL(intr_irq_handler)
|
||||||
#else
|
#else
|
||||||
PTR_LA k0, _C_LABEL(cpu_intr)
|
PTR_LA k0, _C_LABEL(cpu_intr)
|
||||||
@ -1198,7 +1198,7 @@ FPReturn:
|
|||||||
PTR_ADDU sp, sp, CALLFRAME_SIZ
|
PTR_ADDU sp, sp, CALLFRAME_SIZ
|
||||||
END(MipsFPTrap)
|
END(MipsFPTrap)
|
||||||
|
|
||||||
#ifndef MIPS_INTRNG
|
#ifndef INTRNG
|
||||||
/*
|
/*
|
||||||
* Interrupt counters for vmstat.
|
* Interrupt counters for vmstat.
|
||||||
*/
|
*/
|
||||||
@ -1225,7 +1225,7 @@ sintrcnt:
|
|||||||
#else
|
#else
|
||||||
.int INTRCNT_COUNT * (_MIPS_SZLONG / 8) * 2
|
.int INTRCNT_COUNT * (_MIPS_SZLONG / 8) * 2
|
||||||
#endif
|
#endif
|
||||||
#endif /* MIPS_INTRNG */
|
#endif /* INTRNG */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <machine/resource.h>
|
#include <machine/resource.h>
|
||||||
#include <machine/vmparam.h>
|
#include <machine/vmparam.h>
|
||||||
|
|
||||||
#ifdef MIPS_INTRNG
|
#ifdef INTRNG
|
||||||
#include <machine/intr.h>
|
#include <machine/intr.h>
|
||||||
#else
|
#else
|
||||||
#include <machine/intr_machdep.h>
|
#include <machine/intr_machdep.h>
|
||||||
@ -115,7 +115,7 @@ static int nexus_setup_intr(device_t dev, device_t child,
|
|||||||
driver_intr_t *intr, void *arg, void **cookiep);
|
driver_intr_t *intr, void *arg, void **cookiep);
|
||||||
static int nexus_teardown_intr(device_t, device_t, struct resource *,
|
static int nexus_teardown_intr(device_t, device_t, struct resource *,
|
||||||
void *);
|
void *);
|
||||||
#ifdef MIPS_INTRNG
|
#ifdef INTRNG
|
||||||
#ifdef SMP
|
#ifdef SMP
|
||||||
static int nexus_bind_intr(device_t, device_t, struct resource *, int);
|
static int nexus_bind_intr(device_t, device_t, struct resource *, int);
|
||||||
#endif
|
#endif
|
||||||
@ -148,7 +148,7 @@ static device_method_t nexus_methods[] = {
|
|||||||
DEVMETHOD(bus_activate_resource,nexus_activate_resource),
|
DEVMETHOD(bus_activate_resource,nexus_activate_resource),
|
||||||
DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource),
|
DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource),
|
||||||
DEVMETHOD(bus_hinted_child, nexus_hinted_child),
|
DEVMETHOD(bus_hinted_child, nexus_hinted_child),
|
||||||
#ifdef MIPS_INTRNG
|
#ifdef INTRNG
|
||||||
DEVMETHOD(bus_config_intr, nexus_config_intr),
|
DEVMETHOD(bus_config_intr, nexus_config_intr),
|
||||||
DEVMETHOD(bus_describe_intr, nexus_describe_intr),
|
DEVMETHOD(bus_describe_intr, nexus_describe_intr),
|
||||||
#ifdef SMP
|
#ifdef SMP
|
||||||
@ -458,7 +458,7 @@ nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags,
|
|||||||
driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep)
|
driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef MIPS_INTRNG
|
#ifdef INTRNG
|
||||||
return (intr_setup_irq(child, res, filt, intr, arg, flags, cookiep));
|
return (intr_setup_irq(child, res, filt, intr, arg, flags, cookiep));
|
||||||
#else
|
#else
|
||||||
int irq;
|
int irq;
|
||||||
@ -483,7 +483,7 @@ static int
|
|||||||
nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
|
nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef MIPS_INTRNG
|
#ifdef INTRNG
|
||||||
return (intr_teardown_irq(child, r, ih));
|
return (intr_teardown_irq(child, r, ih));
|
||||||
#else
|
#else
|
||||||
printf("Unimplemented %s at %s:%d\n", __func__, __FILE__, __LINE__);
|
printf("Unimplemented %s at %s:%d\n", __func__, __FILE__, __LINE__);
|
||||||
@ -491,7 +491,7 @@ nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MIPS_INTRNG
|
#ifdef INTRNG
|
||||||
static int
|
static int
|
||||||
nexus_config_intr(device_t dev, int irq, enum intr_trigger trig,
|
nexus_config_intr(device_t dev, int irq, enum intr_trigger trig,
|
||||||
enum intr_polarity pol)
|
enum intr_polarity pol)
|
||||||
@ -527,7 +527,7 @@ nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int icells,
|
|||||||
return (intr_fdt_map_irq(iparent, intr, icells));
|
return (intr_fdt_map_irq(iparent, intr, icells));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /* MIPS_INTRNG */
|
#endif /* INTRNG */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nexus_hinted_child(device_t bus, const char *dname, int dunit)
|
nexus_hinted_child(device_t bus, const char *dname, int dunit)
|
||||||
|
@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <machine/locore.h>
|
#include <machine/locore.h>
|
||||||
#include <machine/md_var.h>
|
#include <machine/md_var.h>
|
||||||
|
|
||||||
#ifdef MIPS_INTRNG
|
#ifdef INTRNG
|
||||||
#include <machine/intr.h>
|
#include <machine/intr.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -328,7 +328,7 @@ static int
|
|||||||
clock_attach(device_t dev)
|
clock_attach(device_t dev)
|
||||||
{
|
{
|
||||||
struct clock_softc *sc;
|
struct clock_softc *sc;
|
||||||
#ifndef MIPS_INTRNG
|
#ifndef INTRNG
|
||||||
int error;
|
int error;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -336,7 +336,7 @@ clock_attach(device_t dev)
|
|||||||
panic("can't attach more clocks");
|
panic("can't attach more clocks");
|
||||||
|
|
||||||
softc = sc = device_get_softc(dev);
|
softc = sc = device_get_softc(dev);
|
||||||
#ifdef MIPS_INTRNG
|
#ifdef INTRNG
|
||||||
cpu_establish_hardintr("clock", clock_intr, NULL, sc, 5, INTR_TYPE_CLK,
|
cpu_establish_hardintr("clock", clock_intr, NULL, sc, 5, INTR_TYPE_CLK,
|
||||||
NULL);
|
NULL);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user