Lines Matching refs:type
17 * registered interrupt handlers for each interrupt type.
25 * 'flags' : Bit[0], Routing model for this interrupt type when execution is
30 * Bit[1], Routing model for this interrupt type when execution is
46 * This function validates the interrupt type.
48 static int32_t validate_interrupt_type(uint32_t type)
50 if (plat_ic_has_interrupt_type(type)) {
58 * This function validates the routing model for this type of interrupt
60 static int32_t validate_routing_model(uint32_t type, uint32_t flags)
64 if (type == INTR_TYPE_S_EL1)
67 if (type == INTR_TYPE_NS)
70 if (type == INTR_TYPE_EL3)
95 * interrupt type. It uses it to update the SCR_EL3 in the cpu context and the
98 static void set_scr_el3_from_rm(uint32_t type,
105 bit_pos = plat_interrupt_type_to_line(type, security_state);
106 intr_type_descs[type].scr_el3[security_state] = (u_register_t)flag << bit_pos;
123 int32_t set_routing_model(uint32_t type, uint32_t flags)
127 rc = validate_interrupt_type(type);
131 rc = validate_routing_model(type, flags);
136 intr_type_descs[type].flags = flags;
137 set_scr_el3_from_rm(type, flags, SECURE);
138 set_scr_el3_from_rm(type, flags, NON_SECURE);
144 * This function disables the routing model of interrupt 'type' from the
147 * type.
149 int disable_intr_rm_local(uint32_t type, uint32_t security_state)
153 assert(intr_type_descs[type].handler != NULL);
157 bit_pos = plat_interrupt_type_to_line(type, security_state);
164 * This function enables the routing model of interrupt 'type' from the
167 int enable_intr_rm_local(uint32_t type, uint32_t security_state)
171 assert(intr_type_descs[type].handler != NULL);
173 flag = get_interrupt_rm_flag(intr_type_descs[type].flags,
176 bit_pos = plat_interrupt_type_to_line(type, security_state);
183 * This function registers a handler for the 'type' of interrupt specified. It
184 * also validates the routing model specified in the 'flags' for this type of
187 int32_t register_interrupt_type_handler(uint32_t type,
202 if (intr_type_descs[type].handler != NULL)
205 rc = set_routing_model(type, flags);
210 intr_type_descs[type].handler = handler;
217 * handler for the interrupt type (if registered). It returns NULL if the
218 * interrupt type is not supported or its handler has not been registered.
220 interrupt_type_handler_t get_interrupt_type_handler(uint32_t type)
222 if (validate_interrupt_type(type) != 0)
225 return intr_type_descs[type].handler;