Dan Handley | fb42b12 | 2014-06-20 09:43:15 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2014, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Dan Handley | fb42b12 | 2014-06-20 09:43:15 +0100 | [diff] [blame] | 5 | */ |
| 6 | #include <arm_gic.h> |
| 7 | |
| 8 | /* |
| 9 | * The following platform GIC functions are weakly defined. They |
| 10 | * provide typical implementations that may be re-used by multiple |
| 11 | * platforms but may also be overridden by a platform if required. |
| 12 | */ |
| 13 | #pragma weak plat_ic_get_pending_interrupt_id |
| 14 | #pragma weak plat_ic_get_pending_interrupt_type |
| 15 | #pragma weak plat_ic_acknowledge_interrupt |
| 16 | #pragma weak plat_ic_get_interrupt_type |
| 17 | #pragma weak plat_ic_end_of_interrupt |
| 18 | #pragma weak plat_interrupt_type_to_line |
| 19 | |
| 20 | uint32_t plat_ic_get_pending_interrupt_id(void) |
| 21 | { |
| 22 | return arm_gic_get_pending_interrupt_id(); |
| 23 | } |
| 24 | |
| 25 | uint32_t plat_ic_get_pending_interrupt_type(void) |
| 26 | { |
| 27 | return arm_gic_get_pending_interrupt_type(); |
| 28 | } |
| 29 | |
| 30 | uint32_t plat_ic_acknowledge_interrupt(void) |
| 31 | { |
| 32 | return arm_gic_acknowledge_interrupt(); |
| 33 | } |
| 34 | |
| 35 | uint32_t plat_ic_get_interrupt_type(uint32_t id) |
| 36 | { |
| 37 | return arm_gic_get_interrupt_type(id); |
| 38 | } |
| 39 | |
| 40 | void plat_ic_end_of_interrupt(uint32_t id) |
| 41 | { |
| 42 | arm_gic_end_of_interrupt(id); |
| 43 | } |
| 44 | |
| 45 | uint32_t plat_interrupt_type_to_line(uint32_t type, |
| 46 | uint32_t security_state) |
| 47 | { |
| 48 | return arm_gic_interrupt_type_to_line(type, security_state); |
| 49 | } |