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

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

Merge "msm: ipa4: new qmap flow control pipe definitions"

parents c592caba e0609053
Loading
Loading
Loading
Loading
+81 −1
Original line number Diff line number Diff line
@@ -829,7 +829,6 @@ struct ipa_rx_page_data {
	bool is_tmp_alloc;
};


/**
 * enum ipa_irq_type - IPA Interrupt Type
 * Used to register handlers for IPA interrupts
@@ -1508,6 +1507,18 @@ int ipa_set_single_ndp_per_mbim(bool enable);
int ipa_tx_dp(enum ipa_client_type dst, struct sk_buff *skb,
		struct ipa_tx_meta *metadata);

/*
 * ipa_rmnet_ctl_xmit - QMAP Flow control TX
 *
 * @skb - tx QMAP control packet
 *
 * Note: This need to be called after client receive rmnet_ctl_
 * ready_cb and want to send TX flow control message.
 *
 * This funciton will return 0 on success, -EAGAIN if pipe if full.
 */
int ipa_rmnet_ctl_xmit(struct sk_buff *skb);

/*
 * To transfer multiple data packets
 * While passing the data descriptor list, the anchor node
@@ -1700,6 +1711,12 @@ int ipa_stop_gsi_channel(u32 clnt_hdl);

typedef void (*ipa_ready_cb)(void *user_data);

typedef void (*ipa_rmnet_ctl_ready_cb)(void *user_data);

typedef void (*ipa_rmnet_ctl_stop_cb)(void *user_data);

typedef void (*ipa_rmnet_ctl_rx_notify_cb)(void *user_data, void *rx_data);

/**
 * ipa_register_ipa_ready_cb() - register a callback to be invoked
 * when IPA core driver initialization is complete.
@@ -1722,6 +1739,45 @@ typedef void (*ipa_ready_cb)(void *user_data);
int ipa_register_ipa_ready_cb(void (*ipa_ready_cb)(void *user_data),
			      void *user_data);

/**
 * ipa_register_rmnet_ctl_cb() - register callbacks to be invoked
 * to rmnet_ctl for qmap flow control pipes setup/teardown/rx_notify.
 *
 * @ipa_rmnet_ctl_ready_cb:  CB to be called when pipes setup.
 * @user_data1: user_data for ipa_rmnet_ctl_ready_cb.
 * @ipa_rmnet_ctl_stop_cb: CB to be called when pipes teardown.
 * @user_data2: user_data for ipa_rmnet_ctl_stop_cb.
 * @ipa_rmnet_ctl_rx_notify_cb: CB to be called when receive rx pkts.
 * @user_data3: user_data for ipa_rmnet_ctl_rx_notify_cb.
 * @rx_data: RX data buffer.
 *
 * Note: This function is expected to be utilized for rmnet_ctl
 * module when new qmap flow control is enabled.
 *
 * The function will return 0 on success, -EAGAIN if IPA not ready,
 * -ENXIO is feature is not enabled, -EEXIST if already called.
 */
int ipa_register_rmnet_ctl_cb(
	void (*ipa_rmnet_ctl_ready_cb)(void *user_data1),
	void *user_data1,
	void (*ipa_rmnet_ctl_stop_cb)(void *user_data2),
	void *user_data2,
	void (*ipa_rmnet_ctl_rx_notify_cb)(void *user_data3, void *rx_data),
	void *user_data3);

/**
 * ipa_unregister_rmnet_ctl_cb() - unregister callbacks to be
 * invoked to rmnet_ctl for qmap flow control pipes
 * setup/teardown/rx_notify.
 *
 * Note: This function is expected to be utilized for rmnet_ctl
 * module when new qmap flow control is enabled.
 *
 * The function will return 0 on success, -EAGAIN if IPA not ready,
 * -ENXIO is feature is not enabled.
 */
int ipa_unregister_rmnet_ctl_cb(void);

/**
 * ipa_tz_unlock_reg - Unlocks memory regions so that they become accessible
 *	from AP.
@@ -2173,6 +2229,14 @@ static inline int ipa_tx_dp(enum ipa_client_type dst, struct sk_buff *skb,
	return -EPERM;
}

/*
 * QMAP Flow control TX
 */
static inline int ipa_rmnet_ctl_xmit(struct sk_buff *skb)
{
	return -EPERM;
}

/*
 * To transfer multiple data packets
 */
@@ -2591,6 +2655,22 @@ static inline int ipa_register_ipa_ready_cb(
	return -EPERM;
}

static inline int ipa_register_rmnet_ctl_cb(
	void (*ipa_rmnet_ctl_ready_cb)(void *user_data1),
	void *user_data1,
	void (*ipa_rmnet_ctl_stop_cb)(void *user_data2),
	void *user_data2,
	void (*ipa_rmnet_ctl_rx_notify_cb)(void *user_data3, void *rx_data),
	void *user_data3)
{
	return -EPERM;
}

static inline int ipa_unregister_rmnet_ctl_cb(void)
{
	return -EPERM;
}

static inline int ipa_tz_unlock_reg(struct ipa_tz_unlock_reg_info *reg_info,
	u16 num_regs)
{
+3 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
/*
 * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
 */

/*
@@ -2473,6 +2473,8 @@ enum ipa_ep_desc_type_enum_v01 {
	DATA_EP_DESC_TYPE_TETH_PROD_V01 = 0x07,
	DATA_EP_DESC_TYPE_TETH_RMNET_CONS_V01 = 0x08,
	DATA_EP_DESC_TYPE_TETH_RMNET_PROD_V01 = 0x09,
	DATA_EP_DESC_TYPE_EMB_FLOW_CTL_CONS_V01 = 0x0A,
	DATA_EP_DESC_TYPE_EMB_FLOW_CTL_PROD_V01 = 0x0B,
	IPA_EP_DESC_TYPE_ENUM_MAX_VAL_V01 = IPA_INT_MAX,
};

+11 −3
Original line number Diff line number Diff line
@@ -387,9 +387,12 @@ enum ipa_client_type {

	IPA_CLIENT_AQC_ETHERNET_PROD		= 102,
	IPA_CLIENT_AQC_ETHERNET_CONS		= 103,

	IPA_CLIENT_APPS_WAN_LOW_LAT_PROD	= 104,
	IPA_CLIENT_APPS_WAN_LOW_LAT_CONS	= 105,
};

#define IPA_CLIENT_MAX (IPA_CLIENT_AQC_ETHERNET_CONS + 1)
#define IPA_CLIENT_MAX (IPA_CLIENT_APPS_WAN_LOW_LAT_CONS + 1)

#define IPA_CLIENT_WLAN2_PROD IPA_CLIENT_A5_WLAN_AMPDU_PROD
#define IPA_CLIENT_Q6_DL_NLO_DATA_PROD IPA_CLIENT_Q6_DL_NLO_DATA_PROD
@@ -415,11 +418,13 @@ enum ipa_client_type {
#define IPA_CLIENT_IS_APPS_CONS(client) \
	((client) == IPA_CLIENT_APPS_LAN_CONS || \
	(client) == IPA_CLIENT_APPS_WAN_CONS || \
	(client) == IPA_CLIENT_APPS_WAN_COAL_CONS)
	(client) == IPA_CLIENT_APPS_WAN_COAL_CONS || \
	(client) == IPA_CLIENT_APPS_WAN_LOW_LAT_CONS)

#define IPA_CLIENT_IS_APPS_PROD(client) \
	((client) == IPA_CLIENT_APPS_LAN_PROD || \
	(client) == IPA_CLIENT_APPS_WAN_PROD)
	(client) == IPA_CLIENT_APPS_WAN_PROD || \
	(client) == IPA_CLIENT_APPS_WAN_LOW_LAT_PROD)

#define IPA_CLIENT_IS_USB_CONS(client) \
	((client) == IPA_CLIENT_USB_CONS || \
@@ -432,6 +437,9 @@ enum ipa_client_type {
	((client) == IPA_CLIENT_APPS_WAN_CONS || \
	(client) == IPA_CLIENT_APPS_WAN_COAL_CONS)

#define IPA_CLIENT_IS_LOW_LAT_CONS(client) \
	((client) == IPA_CLIENT_APPS_WAN_LOW_LAT_CONS)

#define IPA_CLIENT_IS_WLAN_CONS(client) \
	((client) == IPA_CLIENT_WLAN1_CONS || \
	(client) == IPA_CLIENT_WLAN2_CONS || \