bsp/imx: Avoid hard-coded GIC base address

Update #3869.
This commit is contained in:
Sebastian Huber
2020-02-11 09:17:02 +01:00
committed by Christian Mauderer
parent b2ddf4f7af
commit 8854a2b54b
2 changed files with 15 additions and 2 deletions
+4 -2
View File
@@ -47,9 +47,11 @@
extern "C" {
#endif /* __cplusplus */
#define BSP_ARM_GIC_DIST_BASE 0x31001000
extern uintptr_t imx_gic_dist_base;
#define BSP_ARM_GIC_CPUIF_BASE 0x31002000
#define BSP_ARM_GIC_DIST_BASE imx_gic_dist_base
#define BSP_ARM_GIC_CPUIF_BASE (BSP_ARM_GIC_DIST_BASE + 0x1000)
#define BSP_ARM_A9MPCORE_GT_BASE 0
+11
View File
@@ -82,8 +82,19 @@ void arm_generic_timer_get_config(
*irq = imx_get_irq_of_node(fdt, node, 0) - 16;
}
uintptr_t imx_gic_dist_base;
static void imx_find_gic(const void *fdt)
{
int node;
node = fdt_path_offset(fdt, "/interrupt-controller");
imx_gic_dist_base = (uintptr_t) imx_get_reg_of_node(fdt, node);
}
void bsp_start(void)
{
imx_find_gic(bsp_fdt_get());
bsp_interrupt_initialize();
rtems_cache_coherent_add_area(
bsp_section_nocacheheap_begin,