[BACK]Return to sa1111_intr.h CVS log [TXT][DIR] Up to [local] / sys / arch / arm / sa11x0

File: [local] / sys / arch / arm / sa11x0 / sa1111_intr.h (download)

Revision 1.1, Wed Mar 5 11:19:01 2008 UTC (16 years, 2 months ago) by nbrk
Branch: MAIN
CVS Tags: HEAD

Add sacic, initial driver for SA-1111 Interrupt Controller.
This icu has many sources (55) and signals to main SA-1110 by generating
rising edge on INT line. SA-1111's INT line is routed to GPIO 0 on the SA-1110
GPIO controller (so we establish our dispatcher on host irq 0, rising edge)

/*	$Id: sa1111_intr.h,v 1.1 2008/03/05 11:19:01 nbrk Exp $	*/
#ifndef SA11X0_SA1111_INTR_H
#define SA11X0_SA1111_INTR_H

#include <machine/bus.h>	/* XXX unneeded here? */
#include <arm/sa11x0/sa1111_reg.h>

struct sacic_intrhandler {
	int	ih_xintr;
	int ih_level;	/* IST_EDGE_RISING, IST_EDGE_FALLING but not both */

	int	(*ih_func)(void *);
	void	*ih_arg;
	char	*ih_name;
};

struct sacic_softc {
	struct device	sc_dev;

	bus_space_tag_t	sc_bust;
	bus_space_handle_t	sc_bush;
	void *sc_hostih;	/* interrupt handler on host INTC */

	struct sacic_intrhandler	*sc_handlers[SACCIC_LEN];
};

void *sa11x1_intr_establish(int irq, int level, int (*func)(void *), 
								void *arg, char *name);
void sa11x1_intr_disestablish(void *cookie);
#ifdef NOTYET
void sa11x1_init_interrupt_masks(void);
#endif

#endif /* !SA11X0_SA1111_INTR_H */