diff options
| author | Yong Ding <yongding@codeaurora.org> | 2018-03-08 14:22:12 +0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-03-15 20:40:24 -0700 |
| commit | 6e8ff43c0db94d5ab8f77f0799a36e0023a83549 (patch) | |
| tree | 99224da49afa8c91f45f65e4ee5f0d400a5a4787 | |
| parent | 56fe93b3ca621436240ed166cee57fdf3461f797 (diff) | |
soc: qcom: hab: add some pchans for BufferQ and FDE
This is adding pchans based on the legacy header files.
Change-Id: I0abf6b7617f4e1e057891c1312a20538bc65d2ea
Signed-off-by: Yong Ding <yongding@codeaurora.org>
| -rw-r--r-- | drivers/soc/qcom/hab/hab.c | 21 | ||||
| -rw-r--r-- | drivers/soc/qcom/hab/hab.h | 2 | ||||
| -rw-r--r-- | drivers/soc/qcom/hab/hab_qvm.c | 3 | ||||
| -rw-r--r-- | include/uapi/linux/habmm.h | 10 |
4 files changed, 33 insertions, 3 deletions
diff --git a/drivers/soc/qcom/hab/hab.c b/drivers/soc/qcom/hab/hab.c index 5ca94579b6f1..4136f2995046 100644 --- a/drivers/soc/qcom/hab/hab.c +++ b/drivers/soc/qcom/hab/hab.c @@ -47,6 +47,8 @@ static struct hab_device hab_devices[] = { HAB_DEVICE_CNSTR(DEVICE_QCPE4_NAME, MM_QCPE_VM4, 17), HAB_DEVICE_CNSTR(DEVICE_CLK1_NAME, MM_CLK_VM1, 18), HAB_DEVICE_CNSTR(DEVICE_CLK2_NAME, MM_CLK_VM2, 19), + HAB_DEVICE_CNSTR(DEVICE_FDE1_NAME, MM_FDE_1, 20), + HAB_DEVICE_CNSTR(DEVICE_BUFFERQ1_NAME, MM_BUFFERQ_1, 21), }; struct hab_driver hab_driver = { @@ -624,7 +626,24 @@ static void hab_generate_pchan(struct local_vmid *settings, int i, int j) HABCFG_GET_BE(settings, i, j)); } break; - + case MM_FDE_START/100: + for (k = MM_FDE_START + 1; k < MM_FDE_END; k++) { + ret += hab_initialize_pchan_entry( + find_hab_device(k), + settings->self, + HABCFG_GET_VMID(settings, i), + HABCFG_GET_BE(settings, i, j)); + } + break; + case MM_BUFFERQ_START/100: + for (k = MM_BUFFERQ_START + 1; k < MM_BUFFERQ_END; k++) { + ret += hab_initialize_pchan_entry( + find_hab_device(k), + settings->self, + HABCFG_GET_VMID(settings, i), + HABCFG_GET_BE(settings, i, j)); + } + break; default: pr_err("failed to find mmid %d, i %d, j %d\n", HABCFG_GET_MMID(settings, i, j), i, j); diff --git a/drivers/soc/qcom/hab/hab.h b/drivers/soc/qcom/hab/hab.h index d94467e6bc76..f13d6f44b929 100644 --- a/drivers/soc/qcom/hab/hab.h +++ b/drivers/soc/qcom/hab/hab.h @@ -81,6 +81,8 @@ enum hab_payload_type { #define DEVICE_QCPE4_NAME "hab_qcpe_vm4" #define DEVICE_CLK1_NAME "hab_clock_vm1" #define DEVICE_CLK2_NAME "hab_clock_vm2" +#define DEVICE_FDE1_NAME "hab_fde1" +#define DEVICE_BUFFERQ1_NAME "hab_bufferq1" /* make sure concascaded name is less than this value */ #define MAX_VMID_NAME_SIZE 30 diff --git a/drivers/soc/qcom/hab/hab_qvm.c b/drivers/soc/qcom/hab/hab_qvm.c index 280eb3148337..9aa41320a33f 100644 --- a/drivers/soc/qcom/hab/hab_qvm.c +++ b/drivers/soc/qcom/hab/hab_qvm.c @@ -52,7 +52,8 @@ static struct shmem_irq_config pchan_factory_settings[] = { {0x1b011000, 24}, {0x1b012000, 25}, {0x1b013000, 26}, - + {0x1b014000, 27}, + {0x1b015000, 28}, }; static struct qvm_plugin_info { diff --git a/include/uapi/linux/habmm.h b/include/uapi/linux/habmm.h index 59b603a0fcf7..8586048e20c0 100644 --- a/include/uapi/linux/habmm.h +++ b/include/uapi/linux/habmm.h @@ -109,7 +109,15 @@ struct hab_unimport { #define MM_CLK_VM2 802 #define MM_CLK_END 803 -#define MM_ID_MAX 804 +#define MM_FDE_START 900 +#define MM_FDE_1 901 +#define MM_FDE_END 902 + +#define MM_BUFFERQ_START 1000 +#define MM_BUFFERQ_1 1001 +#define MM_BUFFERQ_END 1002 + +#define MM_ID_MAX 1003 #define HABMM_SOCKET_OPEN_FLAGS_SINGLE_BE_SINGLE_FE 0x00000000 #define HABMM_SOCKET_OPEN_FLAGS_SINGLE_BE_SINGLE_DOMU 0x00000001 |
