driver/misc/mods: kernel v6.2+ support for IVC init

- Add support for IVC channel init for kernel v6.2+

JIRA TM-949
Bug 3846090

Change-Id: I773d99b89067671c76ec2de3d45461fc5efe2814
Signed-off-by: Koen Zhao <koenz@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2887332
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
koenz
2023-04-07 01:06:20 +08:00
committed by mobile promotions
parent 82d83f4250
commit 94064b64d3

View File

@@ -287,12 +287,24 @@ static int bpmp_ipc_channel_init(struct mods_client *client,
int err;
ktime_t end;
#if (KERNEL_VERSION(6, 2, 0) <= MODS_KERNEL_VERSION)
struct iosys_map rx, tx;
iosys_map_set_vaddr_iomem(&rx, bpmp_ipc_ch->resp_base);
iosys_map_set_vaddr_iomem(&tx, bpmp_ipc_ch->req_base);
err = tegra_ivc_init(&bpmp_ipc_ch->ivc, NULL,
&rx, bpmp_ipc_ch->resp_phys_addr,
&tx, bpmp_ipc_ch->req_phys_addr,
1, MRQ_MSG_SIZE,
bpmp_ivc_notify, bpmp_ipc_ch);
#else
err = tegra_ivc_init(&bpmp_ipc_ch->ivc, NULL,
bpmp_ipc_ch->resp_base, 0,
bpmp_ipc_ch->req_base, 0,
1, MRQ_MSG_SIZE,
bpmp_ivc_notify, bpmp_ipc_ch);
#endif
if (err != 0) {
cl_error("tegra-ivc init failed: %d\n", err);