Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e8ff43c authored by Yong Ding's avatar Yong Ding Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarYong Ding <yongding@codeaurora.org>
parent 56fe93b3
Loading
Loading
Loading
Loading
+20 −1
Original line number Diff line number Diff line
@@ -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);
+2 −0
Original line number Diff line number Diff line
@@ -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
+2 −1
Original line number Diff line number Diff line
@@ -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 {
+9 −1
Original line number Diff line number Diff line
@@ -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