4 typedef unsigned char intc_enum
;
11 #define INTC_VECT(enum_id, vect) { enum_id, vect }
15 intc_enum enum_ids
[32];
18 #define INTC_GROUP(enum_id, ids...) { enum_id, { ids } }
20 struct intc_mask_reg
{
21 unsigned long set_reg
, clr_reg
, reg_width
;
22 intc_enum enum_ids
[32];
26 struct intc_prio_reg
{
27 unsigned long set_reg
, clr_reg
, reg_width
, field_width
;
28 intc_enum enum_ids
[16];
32 #define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a)
36 intc_enum next_enum_id
;
38 int asserted
; /* emulates the interrupt signal line from device to intc */
41 int pending
; /* emulates the result of signal and masking */
42 struct intc_desc
*parent
;
46 struct intc_source
*sources
;
48 struct intc_mask_reg
*mask_regs
;
50 struct intc_prio_reg
*prio_regs
;
54 int pending
; /* number of interrupt sources that has pending set */
57 int sh_intc_get_pending_vector(struct intc_desc
*desc
, int imask
);
58 struct intc_source
*sh_intc_source(struct intc_desc
*desc
, intc_enum id
);
59 void sh_intc_toggle_source(struct intc_source
*source
,
60 int enable_adj
, int assert_adj
);
62 void sh_intc_register_sources(struct intc_desc
*desc
,
63 struct intc_vect
*vectors
,
65 struct intc_group
*groups
,
68 int sh_intc_init(struct intc_desc
*desc
,
70 struct intc_mask_reg
*mask_regs
,
72 struct intc_prio_reg
*prio_regs
,
75 #endif /* __SH_INTC_H__ */