@@ -20,9 +20,16 @@
#include <linux/io.h>
#include <linux/compiler.h>
#include <asm/cpu_ops.h>
+#include <linux/psci.h>
#include <asm/smp_plat.h>
#include <asm/system_misc.h>
+static int (*invoke_psci_fn)(u64, u64, u64, u64);
+typedef int (*psci_initcall_t)(const struct device_node *);
+
+asmlinkage int __invoke_psci_fn_hvc(u64, u64, u64, u64);
+asmlinkage int __invoke_psci_fn_smc(u64, u64, u64, u64);
+
#define MTK_HDMI_READ_BANK(bank) \
static u32 mtk_hdmi_read_##bank(struct mtk_hdmi *hdmi, \
u32 offset) \
@@ -214,6 +221,10 @@ void mtk_hdmi_hw_vid_black(struct mtk_hdmi *hdmi,
void mtk_hdmi_hw_make_reg_writable(struct mtk_hdmi *hdmi,
bool enable)
{
+ invoke_psci_fn = __invoke_psci_fn_smc;
+ invoke_psci_fn(MTK_SIP_SET_AUTHORIZED_SECURE_REG,
+ 0x14000904, 0x80000000, 0);
+
if (enable) {
mtk_hdmi_mask_sys(hdmi, HDMI_SYS_CFG20, HDMI_PCLK_FREE_RUN,
HDMI_PCLK_FREE_RUN);
@@ -351,4 +351,5 @@
#define HDMI_PORD_INT_CLR BIT(17)
#define HDMI_FULL_INT_CLR BIT(20)
+#define MTK_SIP_SET_AUTHORIZED_SECURE_REG 0x82000001
#endif