ipa_cmd.c (98817a84ff1c755c347ac633ff017a623a631fad) ipa_cmd.c (6cb63ea6a39eac9640d109f274a237b34350c183)
1// SPDX-License-Identifier: GPL-2.0
2
3/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
4 * Copyright (C) 2019-2020 Linaro Ltd.
5 */
6
7#include <linux/types.h>
8#include <linux/device.h>

--- 572 unchanged lines hidden (view full) ---

581}
582
583/* Returns the number of commands required for the tag process */
584u32 ipa_cmd_tag_process_count(void)
585{
586 return 4;
587}
588
1// SPDX-License-Identifier: GPL-2.0
2
3/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
4 * Copyright (C) 2019-2020 Linaro Ltd.
5 */
6
7#include <linux/types.h>
8#include <linux/device.h>

--- 572 unchanged lines hidden (view full) ---

581}
582
583/* Returns the number of commands required for the tag process */
584u32 ipa_cmd_tag_process_count(void)
585{
586 return 4;
587}
588
589void ipa_cmd_tag_process(struct ipa *ipa)
590{
591 u32 count = ipa_cmd_tag_process_count();
592 struct gsi_trans *trans;
593
594 trans = ipa_cmd_trans_alloc(ipa, count);
595 if (trans) {
596 ipa_cmd_tag_process_add(trans);
597 gsi_trans_commit_wait(trans);
598 } else {
599 dev_err(&ipa->pdev->dev,
600 "error allocating %u entry tag transaction\n", count);
601 }
602}
603
589static struct ipa_cmd_info *
590ipa_cmd_info_alloc(struct ipa_endpoint *endpoint, u32 tre_count)
591{
592 struct gsi_channel *channel;
593
594 channel = &endpoint->ipa->gsi.channel[endpoint->channel_id];
595
596 return gsi_trans_pool_alloc(&channel->trans_info.info_pool, tre_count);

--- 17 unchanged lines hidden ---
604static struct ipa_cmd_info *
605ipa_cmd_info_alloc(struct ipa_endpoint *endpoint, u32 tre_count)
606{
607 struct gsi_channel *channel;
608
609 channel = &endpoint->ipa->gsi.channel[endpoint->channel_id];
610
611 return gsi_trans_pool_alloc(&channel->trans_info.info_pool, tre_count);

--- 17 unchanged lines hidden ---