123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- #include <platform_def.h>
- #include <drivers/arm/gicv2.h>
- #include <plat/arm/common/plat_arm.h>
- #include <plat/common/platform.h>
- #pragma weak plat_arm_gic_driver_init
- #pragma weak plat_arm_gic_init
- #pragma weak plat_arm_gic_cpuif_enable
- #pragma weak plat_arm_gic_cpuif_disable
- #pragma weak plat_arm_gic_pcpu_init
- static const interrupt_prop_t arm_interrupt_props[] = {
- PLAT_ARM_G1S_IRQ_PROPS(GICV2_INTR_GROUP0),
- PLAT_ARM_G0_IRQ_PROPS(GICV2_INTR_GROUP0)
- };
- static unsigned int target_mask_array[PLATFORM_CORE_COUNT];
- static const gicv2_driver_data_t arm_gic_data = {
- .gicd_base = PLAT_ARM_GICD_BASE,
- .gicc_base = PLAT_ARM_GICC_BASE,
- .interrupt_props = arm_interrupt_props,
- .interrupt_props_num = ARRAY_SIZE(arm_interrupt_props),
- .target_masks = target_mask_array,
- .target_masks_num = ARRAY_SIZE(target_mask_array),
- };
- void plat_arm_gic_driver_init(void)
- {
- gicv2_driver_init(&arm_gic_data);
- }
- void plat_arm_gic_init(void)
- {
- gicv2_distif_init();
- gicv2_pcpu_distif_init();
- gicv2_set_pe_target_mask(plat_my_core_pos());
- gicv2_cpuif_enable();
- }
- void plat_arm_gic_cpuif_enable(void)
- {
- gicv2_cpuif_enable();
- }
- void plat_arm_gic_cpuif_disable(void)
- {
- gicv2_cpuif_disable();
- }
- void plat_arm_gic_pcpu_init(void)
- {
- gicv2_pcpu_distif_init();
- gicv2_set_pe_target_mask(plat_my_core_pos());
- }
- void plat_arm_gic_redistif_on(void)
- {
- return;
- }
- void plat_arm_gic_redistif_off(void)
- {
- return;
- }
- void plat_arm_gic_save(void)
- {
- return;
- }
- void plat_arm_gic_resume(void)
- {
- gicv2_distif_init();
- gicv2_pcpu_distif_init();
- }
|