blob: f57369fc3a70c499a6c256e405d54c6a8bd55603 [file] [log] [blame]
Wendy Liang3aebacf2017-09-13 11:02:42 -07001/*
Jolly Shah0bfd7002019-01-08 11:10:47 -08002 * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
Wendy Liang3aebacf2017-09-13 11:02:42 -07003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7/*
8 * Zynq UltraScale+ MPSoC IPI agent registers access management
9 */
10
Wendy Liang3aebacf2017-09-13 11:02:42 -070011#include <errno.h>
Wendy Liang3aebacf2017-09-13 11:02:42 -070012#include <string.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000013
14#include <common/debug.h>
15#include <common/runtime_svc.h>
16#include <lib/bakery_lock.h>
17#include <lib/mmio.h>
Jolly Shahb07fd0c2019-01-08 11:25:28 -080018
19#include <ipi.h>
Jolly Shah4c172372019-01-08 11:21:29 -080020#include <plat_ipi.h>
Jolly Shah0bfd7002019-01-08 11:10:47 -080021#include <plat_private.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000022
Wendy Liang3aebacf2017-09-13 11:02:42 -070023/* Zynqmp ipi configuration table */
Jolly Shahb07fd0c2019-01-08 11:25:28 -080024const static struct ipi_config zynqmp_ipi_table[] = {
Wendy Liang3aebacf2017-09-13 11:02:42 -070025 /* APU IPI */
26 {
27 .ipi_bit_mask = 0x1,
28 .ipi_reg_base = 0xFF300000,
29 .secure_only = 0,
30 },
31 /* RPU0 IPI */
32 {
33 .ipi_bit_mask = 0x100,
34 .ipi_reg_base = 0xFF310000,
35 .secure_only = 0,
36 },
37 /* RPU1 IPI */
38 {
39 .ipi_bit_mask = 0x200,
40 .ipi_reg_base = 0xFF320000,
41 .secure_only = 0,
42 },
43 /* PMU0 IPI */
44 {
45 .ipi_bit_mask = 0x10000,
46 .ipi_reg_base = 0xFF330000,
47 .secure_only = IPI_SECURE_MASK,
48 },
49 /* PMU1 IPI */
50 {
51 .ipi_bit_mask = 0x20000,
52 .ipi_reg_base = 0xFF331000,
Rajan Vajaba2b0562018-01-30 03:59:23 -080053 .secure_only = 0,
Wendy Liang3aebacf2017-09-13 11:02:42 -070054 },
55 /* PMU2 IPI */
56 {
57 .ipi_bit_mask = 0x40000,
58 .ipi_reg_base = 0xFF332000,
59 .secure_only = IPI_SECURE_MASK,
60 },
61 /* PMU3 IPI */
62 {
63 .ipi_bit_mask = 0x80000,
64 .ipi_reg_base = 0xFF333000,
65 .secure_only = IPI_SECURE_MASK,
66 },
67 /* PL0 IPI */
68 {
69 .ipi_bit_mask = 0x1000000,
70 .ipi_reg_base = 0xFF340000,
71 .secure_only = 0,
72 },
73 /* PL1 IPI */
74 {
75 .ipi_bit_mask = 0x2000000,
76 .ipi_reg_base = 0xFF350000,
77 .secure_only = 0,
78 },
79 /* PL2 IPI */
80 {
81 .ipi_bit_mask = 0x4000000,
82 .ipi_reg_base = 0xFF360000,
83 .secure_only = 0,
84 },
85 /* PL3 IPI */
86 {
87 .ipi_bit_mask = 0x8000000,
88 .ipi_reg_base = 0xFF370000,
89 .secure_only = 0,
90 },
91};
92
Jolly Shah2f952be2019-01-08 11:27:36 -080093/**
94 * zynqmp_ipi_config_table_init() - Initialize ZynqMP IPI configuration data
95 *
96 */
97void zynqmp_ipi_config_table_init(void)
98{
99 ipi_config_table_init(zynqmp_ipi_table, ARRAY_SIZE(zynqmp_ipi_table));
100}