Commit a982f437 authored by Jeenu Viswambharan's avatar Jeenu Viswambharan
Browse files

uniphier: Migrate to using interrupt properties



Change-Id: I795ec540942130b5ddc0fa1fd7167f7e1d1ae967
Signed-off-by: default avatarJeenu Viswambharan <jeenu.viswambharan@arm.com>
parent b2c363b1
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <assert.h> #include <assert.h>
#include <gicv3.h> #include <gicv3.h>
#include <interrupt_props.h>
#include <platform.h> #include <platform.h>
#include <platform_def.h> #include <platform_def.h>
...@@ -13,19 +14,39 @@ ...@@ -13,19 +14,39 @@
static uintptr_t uniphier_rdistif_base_addrs[PLATFORM_CORE_COUNT]; static uintptr_t uniphier_rdistif_base_addrs[PLATFORM_CORE_COUNT];
static const unsigned int g0_interrupt_array[] = { static const interrupt_prop_t uniphier_interrupt_props[] = {
8, /* SGI0 */ /* G0 interrupts */
14, /* SGI6 */
}; /* SGI0 */
INTR_PROP_DESC(8, GIC_HIGHEST_SEC_PRIORITY, INTR_GROUP0,
GIC_INTR_CFG_EDGE),
/* SGI6 */
INTR_PROP_DESC(14, GIC_HIGHEST_SEC_PRIORITY, INTR_GROUP0,
GIC_INTR_CFG_EDGE),
/* G1S interrupts */
static const unsigned int g1s_interrupt_array[] = { /* Timer */
29, /* Timer */ INTR_PROP_DESC(29, GIC_HIGHEST_SEC_PRIORITY, INTR_GROUP1S,
9, /* SGI1 */ GIC_INTR_CFG_LEVEL),
10, /* SGI2 */ /* SGI1 */
11, /* SGI3 */ INTR_PROP_DESC(9, GIC_HIGHEST_SEC_PRIORITY, INTR_GROUP1S,
12, /* SGI4 */ GIC_INTR_CFG_EDGE),
13, /* SGI5 */ /* SGI2 */
15, /* SGI7 */ INTR_PROP_DESC(10, GIC_HIGHEST_SEC_PRIORITY, INTR_GROUP1S,
GIC_INTR_CFG_EDGE),
/* SGI3 */
INTR_PROP_DESC(11, GIC_HIGHEST_SEC_PRIORITY, INTR_GROUP1S,
GIC_INTR_CFG_EDGE),
/* SGI4 */
INTR_PROP_DESC(12, GIC_HIGHEST_SEC_PRIORITY, INTR_GROUP1S,
GIC_INTR_CFG_EDGE),
/* SGI5 */
INTR_PROP_DESC(13, GIC_HIGHEST_SEC_PRIORITY, INTR_GROUP1S,
GIC_INTR_CFG_EDGE),
/* SGI7 */
INTR_PROP_DESC(15, GIC_HIGHEST_SEC_PRIORITY, INTR_GROUP1S,
GIC_INTR_CFG_EDGE)
}; };
static unsigned int uniphier_mpidr_to_core_pos(u_register_t mpidr) static unsigned int uniphier_mpidr_to_core_pos(u_register_t mpidr)
...@@ -37,10 +58,8 @@ static const struct gicv3_driver_data uniphier_gic_driver_data[] = { ...@@ -37,10 +58,8 @@ static const struct gicv3_driver_data uniphier_gic_driver_data[] = {
[UNIPHIER_SOC_LD11] = { [UNIPHIER_SOC_LD11] = {
.gicd_base = 0x5fe00000, .gicd_base = 0x5fe00000,
.gicr_base = 0x5fe40000, .gicr_base = 0x5fe40000,
.g0_interrupt_num = ARRAY_SIZE(g0_interrupt_array), .interrupt_props = uniphier_interrupt_props,
.g1s_interrupt_num = ARRAY_SIZE(g1s_interrupt_array), .interrupt_props_num = ARRAY_SIZE(uniphier_interrupt_props),
.g0_interrupt_array = g0_interrupt_array,
.g1s_interrupt_array = g1s_interrupt_array,
.rdistif_num = PLATFORM_CORE_COUNT, .rdistif_num = PLATFORM_CORE_COUNT,
.rdistif_base_addrs = uniphier_rdistif_base_addrs, .rdistif_base_addrs = uniphier_rdistif_base_addrs,
.mpidr_to_core_pos = uniphier_mpidr_to_core_pos, .mpidr_to_core_pos = uniphier_mpidr_to_core_pos,
...@@ -48,10 +67,8 @@ static const struct gicv3_driver_data uniphier_gic_driver_data[] = { ...@@ -48,10 +67,8 @@ static const struct gicv3_driver_data uniphier_gic_driver_data[] = {
[UNIPHIER_SOC_LD20] = { [UNIPHIER_SOC_LD20] = {
.gicd_base = 0x5fe00000, .gicd_base = 0x5fe00000,
.gicr_base = 0x5fe80000, .gicr_base = 0x5fe80000,
.g0_interrupt_num = ARRAY_SIZE(g0_interrupt_array), .interrupt_props = uniphier_interrupt_props,
.g1s_interrupt_num = ARRAY_SIZE(g1s_interrupt_array), .interrupt_props_num = ARRAY_SIZE(uniphier_interrupt_props),
.g0_interrupt_array = g0_interrupt_array,
.g1s_interrupt_array = g1s_interrupt_array,
.rdistif_num = PLATFORM_CORE_COUNT, .rdistif_num = PLATFORM_CORE_COUNT,
.rdistif_base_addrs = uniphier_rdistif_base_addrs, .rdistif_base_addrs = uniphier_rdistif_base_addrs,
.mpidr_to_core_pos = uniphier_mpidr_to_core_pos, .mpidr_to_core_pos = uniphier_mpidr_to_core_pos,
...@@ -59,10 +76,8 @@ static const struct gicv3_driver_data uniphier_gic_driver_data[] = { ...@@ -59,10 +76,8 @@ static const struct gicv3_driver_data uniphier_gic_driver_data[] = {
[UNIPHIER_SOC_PXS3] = { [UNIPHIER_SOC_PXS3] = {
.gicd_base = 0x5fe00000, .gicd_base = 0x5fe00000,
.gicr_base = 0x5fe80000, .gicr_base = 0x5fe80000,
.g0_interrupt_num = ARRAY_SIZE(g0_interrupt_array), .interrupt_props = uniphier_interrupt_props,
.g1s_interrupt_num = ARRAY_SIZE(g1s_interrupt_array), .interrupt_props_num = ARRAY_SIZE(uniphier_interrupt_props),
.g0_interrupt_array = g0_interrupt_array,
.g1s_interrupt_array = g1s_interrupt_array,
.rdistif_num = PLATFORM_CORE_COUNT, .rdistif_num = PLATFORM_CORE_COUNT,
.rdistif_base_addrs = uniphier_rdistif_base_addrs, .rdistif_base_addrs = uniphier_rdistif_base_addrs,
.mpidr_to_core_pos = uniphier_mpidr_to_core_pos, .mpidr_to_core_pos = uniphier_mpidr_to_core_pos,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment