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

Commit c0b7ede1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: add support for wifi offload"

parents 50c3e2d9 dee9033f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2352,6 +2352,12 @@ static int ipa_init(const struct ipa_plat_drv_res *resource_p,
	}

	ipa_debugfs_init();
	result = ipa_wdi_init();
	if (result)
		IPAERR(":wdi init failed (%d)\n", -result);
	else
		IPADBG(":wdi init ok\n");

	ipa_dec_client_disable_clks();

	pr_info("IPA driver initialization was successful.\n");
+1221 −0

File changed.

Preview size limit exceeded, changes collapsed.

+7 −0
Original line number Diff line number Diff line
@@ -106,6 +106,10 @@ static void ipa_wq_write_done_status(int src_pipe)
	u32 cnt;

	WARN_ON(src_pipe >= IPA_NUM_PIPES);

	if (!ipa_ctx->ep[src_pipe].status.status_en)
		return;

	sys = ipa_ctx->ep[src_pipe].sys;
	if (!sys) {
		IPAERR("null sys pipe src %d\n", src_pipe);
@@ -2083,9 +2087,11 @@ void ipa_lan_rx_cb(void *priv, enum ipa_dp_evt_type evt, unsigned long data)
	struct ipa_hw_pkt_status *status;
	struct ipa_ep_context *ep;
	unsigned int src_pipe;
	u32 metadata;

	status = (struct ipa_hw_pkt_status *)rx_skb->data;
	src_pipe = status->endp_src_idx;
	metadata = status->metadata;
	ep = &ipa_ctx->ep[src_pipe];
	if (unlikely(src_pipe >= IPA_NUM_PIPES ||
		!ep->valid ||
@@ -2100,6 +2106,7 @@ void ipa_lan_rx_cb(void *priv, enum ipa_dp_evt_type evt, unsigned long data)
				IPA_LAN_RX_HEADER_LENGTH);
	else
		skb_pull(rx_skb, IPA_PKT_STATUS_SIZE);
	*(u8 *)rx_skb->cb = (metadata >> 16) & 0xFF;
	ep->client_notify(ep->priv, IPA_RECEIVE, (unsigned long)(rx_skb));
}

+15 −0
Original line number Diff line number Diff line
@@ -408,6 +408,7 @@ struct ipa_ep_context {
	bool keep_ipa_awake;
	bool resume_on_connect;
	struct ipa_wlan_stats wstats;
	u32 wdi_state;

	/* sys MUST be the last element of this struct */
	struct ipa_sys_context *sys;
@@ -644,6 +645,17 @@ struct ipa_active_clients {

struct ipa_controller;

struct ipa_wdi_ctx {
	bool uc_loaded;
	bool uc_failed;
	struct IpaHwSharedMemWdiMapping_t *ipa_sram_mmio;
	struct mutex lock;
	struct completion cmd_rsp;
	u32 pending_cmd;
	u32 last_resp;
	struct dma_pool *dma_pool;
};

/**
 * struct ipa_context - IPA context
 * @class: pointer to the struct class
@@ -776,6 +788,7 @@ struct ipa_context {
	u32 curr_ipa_clk_rate;

	struct ipa_wlan_comm_memb wc_memb;
	struct ipa_wdi_ctx wdi;
};

/**
@@ -996,5 +1009,7 @@ int ipa_tag_aggr_force_close(int pipe_num);
void ipa_active_clients_lock(void);
int ipa_active_clients_trylock(void);
void ipa_active_clients_unlock(void);
int ipa_wdi_init(void);
int ipa_write_qmapid_wdi_pipe(u32 clnt_hdl, u8 qmap_id);

#endif /* _IPA_I_H_ */
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -44,7 +44,7 @@
#define IPA_CANARY_SIZE 4
#define IPA_CANARY_VAL 0xdeadbeef

#define IPA_v2_RAM_OFST_START 0
#define IPA_v2_RAM_OFST_START 128
#define IPA_v2_RAM_V4_FLT_OFST IPA_v2_RAM_OFST_START
#define IPA_v2_RAM_V4_FLT_SIZE 88
#define IPA_v2_RAM_V6_FLT_OFST (IPA_v2_RAM_V4_FLT_OFST + \
@@ -68,7 +68,7 @@
#define IPA_v2_RAM_V6_RT_SIZE (IPA_v2_RAM_V6_NUM_INDEX * 4)
#define IPA_v2_RAM_MODEM_HDR_OFST (IPA_v2_RAM_V6_RT_OFST + \
		IPA_v2_RAM_V6_RT_SIZE + IPA_CANARY_SIZE)
#define IPA_v2_RAM_MODEM_HDR_SIZE 320
#define IPA_v2_RAM_MODEM_HDR_SIZE 192
#define IPA_v2_RAM_APPS_HDR_OFST (IPA_v2_RAM_MODEM_HDR_OFST + \
		IPA_v2_RAM_MODEM_HDR_SIZE)
#define IPA_v2_RAM_APPS_HDR_SIZE 72
Loading