Commit da1a782a authored by Alex Elder's avatar Alex Elder Committed by David S. Miller

net: ipa: kill ipa_cmd_dma_task_32b_addr_add()

A recent commit removed the only use of ipa_cmd_dma_task_32b_addr_add().
This function (and the IPA immediate command it implements) is no
longer needed, so get rid of it, along with all of the definitions
associated with it.  Isolate its removal in a commit so it can be
easily added back again if needed.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f30dcb7d
......@@ -103,28 +103,6 @@ struct ipa_cmd_ip_packet_init {
/* Field masks for ipa_cmd_ip_packet_init dest_endpoint field */
#define IPA_PACKET_INIT_DEST_ENDPOINT_FMASK GENMASK(4, 0)
/* IPA_CMD_DMA_TASK_32B_ADDR */
/* This opcode gets modified with a DMA operation count */
#define DMA_TASK_32B_ADDR_OPCODE_COUNT_FMASK GENMASK(15, 8)
struct ipa_cmd_hw_dma_task_32b_addr {
__le16 flags;
__le16 size;
__le32 addr;
__le16 packet_size;
u8 reserved[6];
};
/* Field masks for ipa_cmd_hw_dma_task_32b_addr flags field */
#define DMA_TASK_32B_ADDR_FLAGS_SW_RSVD_FMASK GENMASK(10, 0)
#define DMA_TASK_32B_ADDR_FLAGS_CMPLT_FMASK GENMASK(11, 11)
#define DMA_TASK_32B_ADDR_FLAGS_EOF_FMASK GENMASK(12, 12)
#define DMA_TASK_32B_ADDR_FLAGS_FLSH_FMASK GENMASK(13, 13)
#define DMA_TASK_32B_ADDR_FLAGS_LOCK_FMASK GENMASK(14, 14)
#define DMA_TASK_32B_ADDR_FLAGS_UNLOCK_FMASK GENMASK(15, 15)
/* IPA_CMD_DMA_SHARED_MEM */
/* For IPA v4.0+, this opcode gets modified with pipeline clear options */
......@@ -163,7 +141,6 @@ union ipa_cmd_payload {
struct ipa_cmd_hw_hdr_init_local hdr_init_local;
struct ipa_cmd_register_write register_write;
struct ipa_cmd_ip_packet_init ip_packet_init;
struct ipa_cmd_hw_dma_task_32b_addr dma_task_32b_addr;
struct ipa_cmd_hw_dma_mem_mem dma_shared_mem;
struct ipa_cmd_ip_packet_tag_status ip_packet_tag_status;
};
......@@ -508,42 +485,6 @@ static void ipa_cmd_ip_packet_init_add(struct gsi_trans *trans, u8 endpoint_id)
direction, opcode);
}
/* Use a 32-bit DMA command to zero a block of memory */
void ipa_cmd_dma_task_32b_addr_add(struct gsi_trans *trans, u16 size,
dma_addr_t addr, bool toward_ipa)
{
struct ipa *ipa = container_of(trans->gsi, struct ipa, gsi);
enum ipa_cmd_opcode opcode = IPA_CMD_DMA_TASK_32B_ADDR;
struct ipa_cmd_hw_dma_task_32b_addr *payload;
union ipa_cmd_payload *cmd_payload;
enum dma_data_direction direction;
dma_addr_t payload_addr;
u16 flags;
/* assert(addr <= U32_MAX); */
addr &= GENMASK_ULL(31, 0);
/* The opcode encodes the number of DMA operations in the high byte */
opcode |= u16_encode_bits(1, DMA_TASK_32B_ADDR_OPCODE_COUNT_FMASK);
direction = toward_ipa ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
/* complete: 0 = don't interrupt; eof: 0 = don't assert eot */
flags = DMA_TASK_32B_ADDR_FLAGS_FLSH_FMASK;
/* lock: 0 = don't lock endpoint; unlock: 0 = don't unlock */
cmd_payload = ipa_cmd_payload_alloc(ipa, &payload_addr);
payload = &cmd_payload->dma_task_32b_addr;
payload->flags = cpu_to_le16(flags);
payload->size = cpu_to_le16(size);
payload->addr = cpu_to_le32((u32)addr);
payload->packet_size = cpu_to_le16(size);
gsi_trans_cmd_add(trans, payload, sizeof(*payload), payload_addr,
direction, opcode);
}
/* Use a DMA command to read or write a block of IPA-resident memory */
void ipa_cmd_dma_shared_mem_add(struct gsi_trans *trans, u32 offset, u16 size,
dma_addr_t addr, bool toward_ipa)
......
......@@ -35,7 +35,6 @@ enum ipa_cmd_opcode {
IPA_CMD_HDR_INIT_LOCAL = 9,
IPA_CMD_REGISTER_WRITE = 12,
IPA_CMD_IP_PACKET_INIT = 16,
IPA_CMD_DMA_TASK_32B_ADDR = 17,
IPA_CMD_DMA_SHARED_MEM = 19,
IPA_CMD_IP_PACKET_TAG_STATUS = 20,
};
......@@ -147,16 +146,6 @@ void ipa_cmd_hdr_init_local_add(struct gsi_trans *trans, u32 offset, u16 size,
void ipa_cmd_register_write_add(struct gsi_trans *trans, u32 offset, u32 value,
u32 mask, bool clear_full);
/**
* ipa_cmd_dma_task_32b_addr_add() - Add a 32-bit DMA command to a transaction
* @trans: GSi transaction
* @size: Number of bytes to be memory to be transferred
* @addr: DMA address of buffer to be read into or written from
* @toward_ipa: true means write to IPA memory; false means read
*/
void ipa_cmd_dma_task_32b_addr_add(struct gsi_trans *trans, u16 size,
dma_addr_t addr, bool toward_ipa);
/**
* ipa_cmd_dma_shared_mem_add() - Add a DMA memory command to a transaction
* @trans: GSI transaction
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment