mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
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:
parent
dbe7301984
commit
01fe02229e
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user