summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorzhiqiang liang <zhiqiang.liang@amlogic.com>2019-04-04 17:29:13 +0800
committerDongjin Kim <tobetter@gmail.com>2019-05-16 13:21:14 +0900
commitb2f6e3cb89f72c1c88ac213a57da5f5a4f5c447a (patch)
tree05e70a502d64cd16d21261309e9479823f49e301 /arch
parent9c8ef57485fd3ccc93b2e779b252e3616bf526ed (diff)
downloadu-boot-odroid-c1-b2f6e3cb89f72c1c88ac213a57da5f5a4f5c447a.tar.gz
tm2: add mailbox interface for dsp sec reg ops [2/3]
PD#SWPL-6583 Problem: tm2 dsp bring up Solution: add the mbox interface Verify: AB311 Change-Id: I80a97acd28de2c527150b5e2bec9fe3b91fac4df Signed-off-by: zhiqiang liang <zhiqiang.liang@amlogic.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv8/tm2/mailbox.c11
-rw-r--r--arch/arm/include/asm/arch-tm2/mailbox.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/tm2/mailbox.c b/arch/arm/cpu/armv8/tm2/mailbox.c
index acb6728354..772d8efd61 100644
--- a/arch/arm/cpu/armv8/tm2/mailbox.c
+++ b/arch/arm/cpu/armv8/tm2/mailbox.c
@@ -208,6 +208,17 @@ void send_pwm_delt(int32_t vcck_delt, int32_t ee_delt)
mb_message_end(LOW_PRIORITY);
}
+void init_dsp_cfg0(unsigned int id, unsigned int addr, unsigned int cfg0)
+{
+ mb_message_start(HIGH_PRIORITY);
+ writel(id, ap_mb_payload[HIGH_PRIORITY]);
+ writel(addr, (ap_mb_payload[HIGH_PRIORITY]+1));
+ writel(cfg0, (ap_mb_payload[HIGH_PRIORITY]+2));
+ mb_message_send(SCPI_CMD_INIT_DSP, HIGH_PRIORITY);
+ mb_message_wait(HIGH_PRIORITY);
+ mb_message_end(HIGH_PRIORITY);
+}
+
void set_boot_first_timeout(unsigned int command)
{
mb_message_start(LOW_PRIORITY);
diff --git a/arch/arm/include/asm/arch-tm2/mailbox.h b/arch/arm/include/asm/arch-tm2/mailbox.h
index 15935d9bcd..0c202e7ba1 100644
--- a/arch/arm/include/asm/arch-tm2/mailbox.h
+++ b/arch/arm/include/asm/arch-tm2/mailbox.h
@@ -32,6 +32,7 @@
#define SCPI_CMD_SENSOR_VALUE 0x1C
#define SCPI_CMD_SET_USR_DATA 0x20
+#define SCPI_CMD_INIT_DSP 0x34
#define SCPI_CMD_OPEN_SCP_LOG 0xC4
#define SCPI_CMD_THERMAL_CALIB 0xC5
@@ -87,6 +88,7 @@ int thermal_get_value(unsigned int sensor_id, unsigned int *value);
int send_usr_data(unsigned int clinet_id, unsigned int *val, unsigned int size);
void send_pwm_delt(int32_t vcck_delt, int32_t ee_delt);
void set_boot_first_timeout(unsigned int command);
+void init_dsp_cfg0(unsigned int id, unsigned int addr, unsigned int cfg0);
#ifdef CONFIG_RING
int efuse_get_value(unsigned char *efuseinfo);
#endif