clk: rockchip: do not register ddrclk if PSCI is not enabled on arm32

ARM32 system can run without trustos,
we should prevent arm_smccc_smc being called in such system.

Change-Id: Ic87b78107b464e3ab8dc72a3ca1fa9a64e358580
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
This commit is contained in:
Jacob Chen
2017-12-12 09:54:24 +08:00
committed by Tao Huang
parent dbe7301984
commit 01fe02229e

View File

@@ -25,6 +25,9 @@
#include <soc/rockchip/rockchip_sip.h>
#include <soc/rockchip/scpi.h>
#include <uapi/drm/drm_mode.h>
#ifdef CONFIG_ARM
#include <asm/psci.h>
#endif
#include "clk.h"
@@ -307,6 +310,11 @@ struct clk *rockchip_clk_register_ddrclk(const char *name, int flags,
struct clk_init_data init;
struct clk *clk;
#ifdef CONFIG_ARM
if (!psci_smp_available())
return NULL;
#endif
ddrclk = kzalloc(sizeof(*ddrclk), GFP_KERNEL);
if (!ddrclk)
return ERR_PTR(-ENOMEM);