Skip to content

Commit da1a782

Browse files
Alex Elderdavem330
authored andcommitted
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: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f30dcb7 commit da1a782

2 files changed

Lines changed: 0 additions & 70 deletions

File tree

‎drivers/net/ipa/ipa_cmd.c‎

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -103,28 +103,6 @@ struct ipa_cmd_ip_packet_init {
103103
/* Field masks for ipa_cmd_ip_packet_init dest_endpoint field */
104104
#define IPA_PACKET_INIT_DEST_ENDPOINT_FMASK GENMASK(4, 0)
105105

106-
/* IPA_CMD_DMA_TASK_32B_ADDR */
107-
108-
/* This opcode gets modified with a DMA operation count */
109-
110-
#define DMA_TASK_32B_ADDR_OPCODE_COUNT_FMASK GENMASK(15, 8)
111-
112-
struct ipa_cmd_hw_dma_task_32b_addr {
113-
__le16 flags;
114-
__le16 size;
115-
__le32 addr;
116-
__le16 packet_size;
117-
u8 reserved[6];
118-
};
119-
120-
/* Field masks for ipa_cmd_hw_dma_task_32b_addr flags field */
121-
#define DMA_TASK_32B_ADDR_FLAGS_SW_RSVD_FMASK GENMASK(10, 0)
122-
#define DMA_TASK_32B_ADDR_FLAGS_CMPLT_FMASK GENMASK(11, 11)
123-
#define DMA_TASK_32B_ADDR_FLAGS_EOF_FMASK GENMASK(12, 12)
124-
#define DMA_TASK_32B_ADDR_FLAGS_FLSH_FMASK GENMASK(13, 13)
125-
#define DMA_TASK_32B_ADDR_FLAGS_LOCK_FMASK GENMASK(14, 14)
126-
#define DMA_TASK_32B_ADDR_FLAGS_UNLOCK_FMASK GENMASK(15, 15)
127-
128106
/* IPA_CMD_DMA_SHARED_MEM */
129107

130108
/* For IPA v4.0+, this opcode gets modified with pipeline clear options */
@@ -163,7 +141,6 @@ union ipa_cmd_payload {
163141
struct ipa_cmd_hw_hdr_init_local hdr_init_local;
164142
struct ipa_cmd_register_write register_write;
165143
struct ipa_cmd_ip_packet_init ip_packet_init;
166-
struct ipa_cmd_hw_dma_task_32b_addr dma_task_32b_addr;
167144
struct ipa_cmd_hw_dma_mem_mem dma_shared_mem;
168145
struct ipa_cmd_ip_packet_tag_status ip_packet_tag_status;
169146
};
@@ -508,42 +485,6 @@ static void ipa_cmd_ip_packet_init_add(struct gsi_trans *trans, u8 endpoint_id)
508485
direction, opcode);
509486
}
510487

511-
/* Use a 32-bit DMA command to zero a block of memory */
512-
void ipa_cmd_dma_task_32b_addr_add(struct gsi_trans *trans, u16 size,
513-
dma_addr_t addr, bool toward_ipa)
514-
{
515-
struct ipa *ipa = container_of(trans->gsi, struct ipa, gsi);
516-
enum ipa_cmd_opcode opcode = IPA_CMD_DMA_TASK_32B_ADDR;
517-
struct ipa_cmd_hw_dma_task_32b_addr *payload;
518-
union ipa_cmd_payload *cmd_payload;
519-
enum dma_data_direction direction;
520-
dma_addr_t payload_addr;
521-
u16 flags;
522-
523-
/* assert(addr <= U32_MAX); */
524-
addr &= GENMASK_ULL(31, 0);
525-
526-
/* The opcode encodes the number of DMA operations in the high byte */
527-
opcode |= u16_encode_bits(1, DMA_TASK_32B_ADDR_OPCODE_COUNT_FMASK);
528-
529-
direction = toward_ipa ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
530-
531-
/* complete: 0 = don't interrupt; eof: 0 = don't assert eot */
532-
flags = DMA_TASK_32B_ADDR_FLAGS_FLSH_FMASK;
533-
/* lock: 0 = don't lock endpoint; unlock: 0 = don't unlock */
534-
535-
cmd_payload = ipa_cmd_payload_alloc(ipa, &payload_addr);
536-
payload = &cmd_payload->dma_task_32b_addr;
537-
538-
payload->flags = cpu_to_le16(flags);
539-
payload->size = cpu_to_le16(size);
540-
payload->addr = cpu_to_le32((u32)addr);
541-
payload->packet_size = cpu_to_le16(size);
542-
543-
gsi_trans_cmd_add(trans, payload, sizeof(*payload), payload_addr,
544-
direction, opcode);
545-
}
546-
547488
/* Use a DMA command to read or write a block of IPA-resident memory */
548489
void ipa_cmd_dma_shared_mem_add(struct gsi_trans *trans, u32 offset, u16 size,
549490
dma_addr_t addr, bool toward_ipa)

‎drivers/net/ipa/ipa_cmd.h‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ enum ipa_cmd_opcode {
3535
IPA_CMD_HDR_INIT_LOCAL = 9,
3636
IPA_CMD_REGISTER_WRITE = 12,
3737
IPA_CMD_IP_PACKET_INIT = 16,
38-
IPA_CMD_DMA_TASK_32B_ADDR = 17,
3938
IPA_CMD_DMA_SHARED_MEM = 19,
4039
IPA_CMD_IP_PACKET_TAG_STATUS = 20,
4140
};
@@ -147,16 +146,6 @@ void ipa_cmd_hdr_init_local_add(struct gsi_trans *trans, u32 offset, u16 size,
147146
void ipa_cmd_register_write_add(struct gsi_trans *trans, u32 offset, u32 value,
148147
u32 mask, bool clear_full);
149148

150-
/**
151-
* ipa_cmd_dma_task_32b_addr_add() - Add a 32-bit DMA command to a transaction
152-
* @trans: GSi transaction
153-
* @size: Number of bytes to be memory to be transferred
154-
* @addr: DMA address of buffer to be read into or written from
155-
* @toward_ipa: true means write to IPA memory; false means read
156-
*/
157-
void ipa_cmd_dma_task_32b_addr_add(struct gsi_trans *trans, u16 size,
158-
dma_addr_t addr, bool toward_ipa);
159-
160149
/**
161150
* ipa_cmd_dma_shared_mem_add() - Add a DMA memory command to a transaction
162151
* @trans: GSI transaction

0 commit comments

Comments
 (0)