soc: qcom: smp2p: Add support for TZ subsystem
The TZ subsystem now supports SMP2P communication, so add the necessary support to allow the apps subsystem to talk to the TZ subsystem. Change-Id: I09512a9af6f5f8da486156c7e063fd1155ece402 Signed-off-by: Steven Cahail <scahail@codeaurora.org>
This commit is contained in:
parent
683a20c2e0
commit
d01018dca3
|
@ -185,7 +185,9 @@ added to the end of the list (Table 3).
|
|||
-------------------------------------------------
|
||||
| Power processor | 6 |
|
||||
-------------------------------------------------
|
||||
| NUM PROCESSORS | 7 |
|
||||
| TrustZone processor | 7 |
|
||||
-------------------------------------------------
|
||||
| NUM PROCESSORS | 8 |
|
||||
-------------------------------------------------
|
||||
Table 3 - Processor IDs
|
||||
|
||||
|
@ -201,21 +203,23 @@ particular edge, the remote processor ID (Table 3) is added to the base item ID
|
|||
for the local processor (Table 4). For example, the Apps ==> Modem (id 1) SMEM
|
||||
Item ID will be 427 + 1 = 428.
|
||||
|
||||
--------------------------------------------------
|
||||
| Description | SMEM ID value |
|
||||
--------------------------------------------------
|
||||
| Apps SMP2P SMEM Item base | 427 |
|
||||
--------------------------------------------------
|
||||
| Modem SMP2P SMEM Item base | 435 |
|
||||
--------------------------------------------------
|
||||
| Audio SMP2P SMEM Item base | 443 |
|
||||
--------------------------------------------------
|
||||
| Sensors SMP2P SMEM Item base | 481 |
|
||||
--------------------------------------------------
|
||||
| Wireless SMP2P SMEM Item base | 451 |
|
||||
--------------------------------------------------
|
||||
| Power SMP2P SMEM Item base | 459 |
|
||||
--------------------------------------------------
|
||||
---------------------------------------------------
|
||||
| Description | SMEM ID value |
|
||||
---------------------------------------------------
|
||||
| Apps SMP2P SMEM Item base | 427 |
|
||||
---------------------------------------------------
|
||||
| Modem SMP2P SMEM Item base | 435 |
|
||||
---------------------------------------------------
|
||||
| Audio SMP2P SMEM Item base | 443 |
|
||||
---------------------------------------------------
|
||||
| Sensors SMP2P SMEM Item base | 481 |
|
||||
---------------------------------------------------
|
||||
| Wireless SMP2P SMEM Item base | 451 |
|
||||
---------------------------------------------------
|
||||
| Power SMP2P SMEM Item base | 459 |
|
||||
---------------------------------------------------
|
||||
| TrustZone SMP2P SMEM Item base | 489 |
|
||||
---------------------------------------------------
|
||||
Table 4 - SMEM Items Base IDs
|
||||
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@ Unit test devices ("smp2p" entries):
|
|||
"qcom,smp2pgpio_test_smp2p_3_in"
|
||||
"qcom,smp2pgpio_test_smp2p_4_out"
|
||||
"qcom,smp2pgpio_test_smp2p_4_in"
|
||||
"qcom,smp2pgpio_test_smp2p_7_out"
|
||||
"qcom,smp2pgpio_test_smp2p_7_in"
|
||||
"qcom,smp2pgpio_test_smp2p_15_out"
|
||||
"qcom,smp2pgpio_test_smp2p_15_in"
|
||||
-gpios : the relevant gpio pins of the entry
|
||||
|
|
|
@ -95,6 +95,10 @@ static int smp2p_gpio_test_probe(struct platform_device *pdev)
|
|||
gpio_info_ptr = &gpio_info[SMP2P_WIRELESS_PROC].in;
|
||||
} else if (strcmp("qcom,smp2pgpio_test_smp2p_4_out", node->name) == 0) {
|
||||
gpio_info_ptr = &gpio_info[SMP2P_WIRELESS_PROC].out;
|
||||
} else if (strcmp("qcom,smp2pgpio_test_smp2p_7_in", node->name) == 0) {
|
||||
gpio_info_ptr = &gpio_info[SMP2P_TZ_PROC].in;
|
||||
} else if (strcmp("qcom,smp2pgpio_test_smp2p_7_out", node->name) == 0) {
|
||||
gpio_info_ptr = &gpio_info[SMP2P_TZ_PROC].out;
|
||||
} else if (strcmp("qcom,smp2pgpio_test_smp2p_15_in", node->name) == 0) {
|
||||
gpio_info_ptr = &gpio_info[SMP2P_REMOTE_MOCK_PROC].in;
|
||||
} else if (
|
||||
|
@ -144,6 +148,10 @@ static struct of_device_id msm_smp2p_match_table[] = {
|
|||
{.compatible = "qcom,smp2pgpio_test_smp2p_4_out", },
|
||||
{.compatible = "qcom,smp2pgpio_test_smp2p_4_in", },
|
||||
|
||||
/* TZ */
|
||||
{.compatible = "qcom,smp2pgpio_test_smp2p_7_out", },
|
||||
{.compatible = "qcom,smp2pgpio_test_smp2p_7_in", },
|
||||
|
||||
/* mock loopback */
|
||||
{.compatible = "qcom,smp2pgpio_test_smp2p_15_out", },
|
||||
{.compatible = "qcom,smp2pgpio_test_smp2p_15_in", },
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* drivers/soc/qcom/smp2p.c
|
||||
*
|
||||
* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -214,6 +214,7 @@ static struct smp2p_interrupt_config smp2p_int_cfgs[SMP2P_NUM_PROCS] = {
|
|||
[SMP2P_AUDIO_PROC].name = "lpass",
|
||||
[SMP2P_SENSOR_PROC].name = "dsps",
|
||||
[SMP2P_WIRELESS_PROC].name = "wcnss",
|
||||
[SMP2P_TZ_PROC].name = "tz",
|
||||
[SMP2P_REMOTE_MOCK_PROC].name = "mock",
|
||||
};
|
||||
|
||||
|
@ -335,6 +336,9 @@ static int smp2p_get_smem_item_id(int write_pid, int read_pid)
|
|||
case SMP2P_POWER_PROC:
|
||||
ret = SMEM_SMP2P_POWER_BASE + read_pid;
|
||||
break;
|
||||
case SMP2P_TZ_PROC:
|
||||
ret = SMEM_SMP2P_TZ_BASE + read_pid;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -33,6 +33,7 @@ enum {
|
|||
SMP2P_WIRELESS_PROC = 4,
|
||||
SMP2P_RESERVED_PROC_2 = 5,
|
||||
SMP2P_POWER_PROC = 6,
|
||||
SMP2P_TZ_PROC = 7,
|
||||
/* add new processors here */
|
||||
|
||||
SMP2P_REMOTE_MOCK_PROC = 15,
|
||||
|
|
|
@ -372,6 +372,11 @@ static void smp2p_ut_remote_spinlock_wcnss(struct seq_file *s)
|
|||
smp2p_ut_remote_spinlock_pid(s, SMP2P_WIRELESS_PROC, false);
|
||||
}
|
||||
|
||||
static void smp2p_ut_remote_spinlock_tz(struct seq_file *s)
|
||||
{
|
||||
smp2p_ut_remote_spinlock_pid(s, SMP2P_TZ_PROC, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* smp2p_ut_remote_spinlock_rpm - Verify remote spinlock.
|
||||
*
|
||||
|
@ -746,6 +751,11 @@ static void smp2p_ut_remote_spinlock_track_wcnss(struct seq_file *s)
|
|||
smp2p_ut_remote_spinlock_track(s, SMP2P_WIRELESS_PROC);
|
||||
}
|
||||
|
||||
static void smp2p_ut_remote_spinlock_track_tz(struct seq_file *s)
|
||||
{
|
||||
smp2p_ut_remote_spinlock_track(s, SMP2P_TZ_PROC);
|
||||
}
|
||||
|
||||
static int __init smp2p_debugfs_init(void)
|
||||
{
|
||||
/*
|
||||
|
@ -771,6 +781,8 @@ static int __init smp2p_debugfs_init(void)
|
|||
smp2p_ut_remote_spinlock_dsps);
|
||||
smp2p_debug_create("ut_remote_spinlock_wcnss",
|
||||
smp2p_ut_remote_spinlock_wcnss);
|
||||
smp2p_debug_create("ut_remote_spinlock_tz",
|
||||
smp2p_ut_remote_spinlock_tz);
|
||||
smp2p_debug_create("ut_remote_spinlock_rpm",
|
||||
smp2p_ut_remote_spinlock_rpm);
|
||||
smp2p_debug_create_u32("ut_remote_spinlock_time",
|
||||
|
@ -785,6 +797,8 @@ static int __init smp2p_debugfs_init(void)
|
|||
&smp2p_ut_remote_spinlock_track_dsps);
|
||||
smp2p_debug_create("ut_remote_spinlock_track_wcnss",
|
||||
&smp2p_ut_remote_spinlock_track_wcnss);
|
||||
smp2p_debug_create("ut_remote_spinlock_track_tz",
|
||||
&smp2p_ut_remote_spinlock_track_tz);
|
||||
return 0;
|
||||
}
|
||||
module_init(smp2p_debugfs_init);
|
||||
|
|
Loading…
Reference in New Issue