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

Commit d9bda717 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa4: add wigig client"

parents ef5800bd 5eb2a0fd
Loading
Loading
Loading
Loading
+127 −2
Original line number Diff line number Diff line
@@ -191,7 +191,15 @@ const char *ipa_clients_strings[IPA_CLIENT_MAX] = {
	__stringify(IPA_CLIENT_ODL_DPL_CONS),
	__stringify(IPA_CLIENT_Q6_AUDIO_DMA_MHI_PROD),
	__stringify(IPA_CLIENT_Q6_AUDIO_DMA_MHI_CONS),
	__stringify(RESERVED_PROD_86),
	__stringify(IPA_CLIENT_WIGIG_PROD),
	__stringify(IPA_CLIENT_WIGIG1_CONS),
	__stringify(RESERVERD_PROD_88),
	__stringify(IPA_CLIENT_WIGIG2_CONS),
	__stringify(RESERVERD_PROD_90),
	__stringify(IPA_CLIENT_WIGIG3_CONS),
	__stringify(RESERVERD_PROD_92),
	__stringify(IPA_CLIENT_WIGIG4_CONS),
	__stringify(RESERVERD_PROD_94),
	__stringify(IPA_CLIENT_APPS_WAN_COAL_CONS),
};

@@ -1922,7 +1930,7 @@ EXPORT_SYMBOL(ipa_uc_wdi_get_dbpa);

/**
 * ipa_uc_reg_rdyCB() - To register uC
 * ready CB if uC not ready
 * ready CB if uC not ready, wdi only.
 * @inout:	[in/out] input/output parameters
 * from/to client
 *
@@ -1940,6 +1948,31 @@ int ipa_uc_reg_rdyCB(
}
EXPORT_SYMBOL(ipa_uc_reg_rdyCB);

/**
* ipa_wigig_uc_init() - get uc db and register uC
* ready CB if uC not ready, wigig only.
* @inout:	[in/out] uc ready input/output parameters
* from/to client
* @int_notify: [in] wigig misc interrupt handler function
*
* Returns:	0 on success, negative on failure
*
*/

int ipa_wigig_uc_init(
	struct ipa_wdi_uc_ready_params *inout,
	ipa_wigig_misc_int_cb int_notify,
	phys_addr_t *uc_db_pa)
{
	int ret;

	IPA_API_DISPATCH_RETURN(ipa_wigig_uc_init, inout,
		int_notify, uc_db_pa);

	return ret;
}
EXPORT_SYMBOL(ipa_wigig_uc_init);

/**
 * ipa_uc_dereg_rdyCB() - To de-register uC ready CB
 *
@@ -3367,6 +3400,98 @@ int ipa_disable_wdi_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx)
	return ret;
}

/**
 * ipa_wigig_uc_msi_init() - smmu map\unmap msi related wigig HW registers
 *	and init\deinit uC msi config
 */
int ipa_wigig_uc_msi_init(bool init,
	phys_addr_t periph_baddr_pa,
	phys_addr_t pseudo_cause_pa,
	phys_addr_t int_gen_tx_pa,
	phys_addr_t int_gen_rx_pa,
	phys_addr_t dma_ep_misc_pa)
{
	int ret;

	IPA_API_DISPATCH_RETURN(ipa_wigig_uc_msi_init, init,
		periph_baddr_pa,
		pseudo_cause_pa,
		int_gen_tx_pa,
		int_gen_rx_pa,
		dma_ep_misc_pa);

	return ret;
}
EXPORT_SYMBOL(ipa_wigig_uc_msi_init);

/**
 * ipa_conn_wigig_rx_pipe_i() - connect wigig rx pipe
 */
int ipa_conn_wigig_rx_pipe_i(void *in, struct ipa_wigig_conn_out_params *out)
{
	int ret;

	IPA_API_DISPATCH_RETURN(ipa_conn_wigig_rx_pipe_i, in, out);

	return ret;
}
EXPORT_SYMBOL(ipa_conn_wigig_rx_pipe_i);

/**
 * ipa_conn_wigig_client_i() - connect a wigig client
 */
int ipa_conn_wigig_client_i(void *in, struct ipa_wigig_conn_out_params *out)
{
	int ret;

	IPA_API_DISPATCH_RETURN(ipa_conn_wigig_client_i, in, out);

	return ret;
}
EXPORT_SYMBOL(ipa_conn_wigig_client_i);

/**
 * ipa_disconn_wigig_pipe_i() - disconnect a wigig pipe
 */
int ipa_disconn_wigig_pipe_i(enum ipa_client_type client,
	struct ipa_wigig_pipe_setup_info_smmu *pipe_smmu,
	void *dbuff)
{
	int ret;

	IPA_API_DISPATCH_RETURN(ipa_disconn_wigig_pipe_i, client,
		pipe_smmu, dbuff);

	return ret;
}
EXPORT_SYMBOL(ipa_disconn_wigig_pipe_i);

/**
 * ipa_enable_wigig_pipe() - enable a wigig pipe
 */
int ipa_enable_wigig_pipe_i(enum ipa_client_type client)
{
	int ret;

	IPA_API_DISPATCH_RETURN(ipa_enable_wigig_pipe_i, client);

	return ret;
}
EXPORT_SYMBOL(ipa_enable_wigig_pipe_i);

/**
 * ipa_disable_wigig_pipe_i() - disable a wigig pipe
 */
int ipa_disable_wigig_pipe_i(enum ipa_client_type client)
{
	int ret;

	IPA_API_DISPATCH_RETURN(ipa_disable_wigig_pipe_i, client);

	return ret;
}
EXPORT_SYMBOL(ipa_disable_wigig_pipe_i);

/**
 * ipa_tz_unlock_reg() - Allow AP access to memory regions controlled by TZ
 */
+27 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
 */

#include <linux/ipa_mhi.h>
@@ -421,6 +421,32 @@ struct ipa_api_controller {
	int (*ipa_is_vlan_mode)(enum ipa_vlan_ifaces iface, bool *res);

	bool (*ipa_pm_is_used)(void);

	int (*ipa_wigig_uc_init)(
		struct ipa_wdi_uc_ready_params *inout,
		ipa_wigig_misc_int_cb int_notify,
		phys_addr_t *uc_db_pa);

	int (*ipa_conn_wigig_rx_pipe_i)(void *in,
		struct ipa_wigig_conn_out_params *out);

	int (*ipa_conn_wigig_client_i)(void *in,
		struct ipa_wigig_conn_out_params *out);

	int (*ipa_disconn_wigig_pipe_i)(enum ipa_client_type client,
		struct ipa_wigig_pipe_setup_info_smmu *pipe_smmu,
		void *dbuff);

	int (*ipa_wigig_uc_msi_init)(bool init,
		phys_addr_t periph_baddr_pa,
		phys_addr_t pseudo_cause_pa,
		phys_addr_t int_gen_tx_pa,
		phys_addr_t int_gen_rx_pa,
		phys_addr_t dma_ep_misc_pa);

	int (*ipa_enable_wigig_pipe_i)(enum ipa_client_type client);

	int (*ipa_disable_wigig_pipe_i)(enum ipa_client_type client);
};

#ifdef CONFIG_IPA3
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only

obj-$(CONFIG_IPA3) += ipa_usb.o odu_bridge.o ipa_mhi_client.o ipa_uc_offload.o ipa_wdi3.o ipa_gsb.o
obj-$(CONFIG_IPA3) += ipa_usb.o odu_bridge.o ipa_mhi_client.o ipa_uc_offload.o ipa_wdi3.o ipa_gsb.o ipa_wigig.o
obj-$(CONFIG_IPA) += odu_bridge.o ipa_mhi_client.o ipa_uc_offload.o ipa_wdi3.o
obj-$(CONFIG_ECM_IPA) += ecm_ipa.o
obj-$(CONFIG_RNDIS_IPA) += rndis_ipa.o
+1326 −0

File added.

Preview size limit exceeded, changes collapsed.

+27 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 */

#include <linux/ipa_mhi.h>
@@ -13,6 +13,7 @@
#include <linux/ipa.h>
#include <linux/ipa_uc_offload.h>
#include <linux/ipa_wdi3.h>
#include <linux/ipa_wigig.h>
#include <linux/ratelimit.h>

#define WARNON_RATELIMIT_BURST 1
@@ -436,4 +437,29 @@ int ipa_smmu_free_sgt(struct sg_table **out_sgt_ptr);
int ipa_ut_module_init(void);
void ipa_ut_module_exit(void);

int ipa_wigig_uc_init(
	struct ipa_wdi_uc_ready_params *inout,
	ipa_wigig_misc_int_cb int_notify,
	phys_addr_t *uc_db_pa);

int ipa_conn_wigig_rx_pipe_i(void *in, struct ipa_wigig_conn_out_params *out);

int ipa_conn_wigig_client_i(void *in, struct ipa_wigig_conn_out_params *out);

int ipa_wigig_uc_msi_init(
	bool init,
	phys_addr_t periph_baddr_pa,
	phys_addr_t pseudo_cause_pa,
	phys_addr_t int_gen_tx_pa,
	phys_addr_t int_gen_rx_pa,
	phys_addr_t dma_ep_misc_pa);

int ipa_disconn_wigig_pipe_i(enum ipa_client_type client,
	struct ipa_wigig_pipe_setup_info_smmu *pipe_smmu,
	void *dbuff);

int ipa_enable_wigig_pipe_i(enum ipa_client_type client);

int ipa_disable_wigig_pipe_i(enum ipa_client_type client);

#endif /* _IPA_COMMON_I_H_ */
Loading