blob: a1c457fa10fd186400727030c7134bf5a8ae281f [file] [log] [blame]
Tejas Patel354fe572018-12-14 00:55:37 -08001/*
2 * Copyright (c) 2019, Xilinx, Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7/*
8 * Top-level SMC handler for Versal power management calls and
9 * IPI setup functions for communication with PMC.
10 */
11
12#include <errno.h>
13#include <plat_private.h>
14#include "pm_client.h"
15#include "pm_ipi.h"
16
17/**
18 * pm_setup() - PM service setup
19 *
20 * @return On success, the initialization function must return 0.
21 * Any other return value will cause the framework to ignore
22 * the service
23 *
24 * Initialization functions for Versal power management for
25 * communicaton with PMC.
26 *
27 * Called from sip_svc_setup initialization function with the
28 * rt_svc_init signature.
29 */
30int pm_setup(void)
31{
32 int status, ret = 0;
33
34 status = pm_ipi_init(primary_proc);
35
36 if (status < 0) {
37 INFO("BL31: PM Service Init Failed, Error Code %d!\n", status);
38 ret = status;
39 }
40
41 return ret;
42}