Return to tairqc.c CVS log | Up to [local] / funnyos / arch / testarm / dev |
File: [local] / funnyos / arch / testarm / dev / tairqc.c (download)
Revision 1.1, Mon Oct 29 20:12:18 2007 UTC (16 years, 7 months ago) by init
add tairqc, driver for testarm Interrupt Controller Unit; this irqc contains only three registers: intr status, mask and unmask. on testarm we will be invoked from low-level when CPU Ext. IRQ is asserted. devconfig machinery will support vectors-table allowing us to switch control flow based on this table into devices' interrupt handlers he-he, still more work on the road, but i need to commit it to work on it. |
/* * $Id: tairqc.c,v 1.1 2007/10/29 20:12:18 init Exp $ */ #include <sys/types.h> #include <sys/device.h> #include <sys/bus.h> #include <arch/testarm/dev/tairqcvar.h> #include <arch/testarm/dev/tairqcreg.h> /* * testarm Interrupt Controller Unit support. */ int tairqc_attach(struct device *self, uint32_t loc, uint8_t flags); void tairqc_irq(void); struct driver tairqc_dr = { sizeof(struct tairqc_dd), tairqc_attach, NULL }; int tairqc_attach(struct device *self, uint32_t loc, uint8_t flags) { struct tairqc_dd *ddp = self->dv_devdata; /* leap to parent's bus_handle */ ddp->td_bushandlep = self->dv_parent->dv_aux; } void tairqc_irq(void) { /* * Process an IRQ */ }