nvmem: rockchip-efuse: Fix dependencies
authorFinley Xiao <finley.xiao@rock-chips.com>
Mon, 20 Mar 2017 03:18:31 +0000 (11:18 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 21 Mar 2017 02:41:53 +0000 (10:41 +0800)
Not every rockchip efuse depends on ROCKCHIP_SIP, so delete
dependencies in Kconfig. It is more appropriate to add
dependencies for sip_smc_secure_reg_read/write.

Change-Id: I7f551f9fe71ced847657531e3c3cf418766fa3a4
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
drivers/nvmem/Kconfig
include/linux/rockchip/rockchip_sip.h

index eaca3d2..584f11a 100644 (file)
@@ -52,7 +52,6 @@ config ROCKCHIP_EFUSE
        tristate "Rockchip eFuse Support"
        depends on ARCH_ROCKCHIP || COMPILE_TEST
        depends on HAS_IOMEM
-       depends on ROCKCHIP_SIP
        help
          This is a simple drive to dump specified values of Rockchip SoC
          from eFuse, such as cpu-leakage.
index 92a28c6..27b3546 100644 (file)
@@ -91,8 +91,13 @@ struct arm_smccc_res sip_smc_ddr_cfg(u32 arg0, u32 arg1,
                                     u32 arg2);
 struct arm_smccc_res sip_smc_get_share_mem_page(u32 page_num,
                                                share_page_type_t page_type);
+#ifdef CONFIG_ROCKCHIP_SIP
 u32 sip_smc_secure_reg_read(u32 addr_phy);
 int sip_smc_secure_reg_write(u32 addr_phy, u32 val);
+#else
+u32 sip_smc_secure_reg_read(u32 addr_phy) { return 0; }
+int sip_smc_secure_reg_write(u32 addr_phy, u32 val) { return 0; }
+#endif
 
 void psci_enable_fiq(void);
 u32 rockchip_psci_smc_get_tf_ver(void);