diff options
author | Bai Ping <ping.bai@nxp.com> | 2018-04-18 16:16:48 +0800 |
---|---|---|
committer | Abel Vesa <abel.vesa@nxp.com> | 2018-06-11 10:33:03 +0300 |
commit | 02871d54a6beda8bb0c09e43aacfd138bd5fe35a (patch) | |
tree | 0591cda83547c2145ebff9e39191b6d8503dc8d9 /plat/imx/common/plat_imx8_gic.c | |
parent | e3e75661d00db8f88d35018a19a9c43b16bc8f9a (diff) |
plat: imx: add platfrom gicv3 save/restore
The GICv3 save/restore is necessary when GIC is going
to power off. the save/restore is common for all imx8
platform, so make it common for imx8.
Signed-off-by: Bai Ping <ping.bai@nxp.com>
Diffstat (limited to 'plat/imx/common/plat_imx8_gic.c')
-rw-r--r-- | plat/imx/common/plat_imx8_gic.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plat/imx/common/plat_imx8_gic.c b/plat/imx/common/plat_imx8_gic.c index e889f957..d6f33041 100644 --- a/plat/imx/common/plat_imx8_gic.c +++ b/plat/imx/common/plat_imx8_gic.c @@ -89,3 +89,17 @@ void plat_gic_pcpu_init(void) { gicv3_rdistif_init(plat_my_core_pos()); } + +void plat_gic_save(unsigned int proc_num, struct plat_gic_ctx *ctx) +{ + /* save the gic rdist/dist context */ + gicv3_rdistif_save(proc_num, &ctx->rdist_ctx); + gicv3_distif_save(&ctx->dist_ctx); +} + +void plat_gic_restore(unsigned int proc_num, struct plat_gic_ctx *ctx) +{ + /* restore the gic rdist/dist context */ + gicv3_rdistif_init_restore(proc_num, &ctx->rdist_ctx); + gicv3_distif_init_restore(&ctx->dist_ctx); +} |