Jeenu Viswambharan | aeb267c | 2017-09-22 08:32:09 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 7 | #ifndef INTERRUPT_PROPS_H |
| 8 | #define INTERRUPT_PROPS_H |
Jeenu Viswambharan | aeb267c | 2017-09-22 08:32:09 +0100 | [diff] [blame] | 9 | |
Julius Werner | 53456fc | 2019-07-09 13:49:11 -0700 | [diff] [blame] | 10 | #ifndef __ASSEMBLER__ |
Jeenu Viswambharan | aeb267c | 2017-09-22 08:32:09 +0100 | [diff] [blame] | 11 | |
| 12 | /* Create an interrupt property descriptor from various interrupt properties */ |
| 13 | #define INTR_PROP_DESC(num, pri, grp, cfg) \ |
| 14 | { \ |
Sathees Balya | 30952cc | 2018-09-27 14:41:02 +0100 | [diff] [blame] | 15 | .intr_num = (num), \ |
| 16 | .intr_pri = (pri), \ |
| 17 | .intr_grp = (grp), \ |
| 18 | .intr_cfg = (cfg), \ |
Jeenu Viswambharan | aeb267c | 2017-09-22 08:32:09 +0100 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | typedef struct interrupt_prop { |
| 22 | unsigned int intr_num:10; |
| 23 | unsigned int intr_pri:8; |
| 24 | unsigned int intr_grp:2; |
| 25 | unsigned int intr_cfg:2; |
| 26 | } interrupt_prop_t; |
| 27 | |
Julius Werner | 53456fc | 2019-07-09 13:49:11 -0700 | [diff] [blame] | 28 | #endif /* __ASSEMBLER__ */ |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 29 | #endif /* INTERRUPT_PROPS_H */ |