Path: blob/main/sys/contrib/dev/athk/ath10k/snoc.h
48375 views
/* SPDX-License-Identifier: ISC */1/*2* Copyright (c) 2018 The Linux Foundation. All rights reserved.3*/45#ifndef _SNOC_H_6#define _SNOC_H_78#include <linux/notifier.h>910#include "hw.h"11#include "ce.h"12#include "qmi.h"1314struct ath10k_snoc_drv_priv {15enum ath10k_hw_rev hw_rev;16u64 dma_mask;17u32 msa_size;18};1920struct snoc_state {21u32 pipe_cfg_addr;22u32 svc_to_pipe_map;23};2425struct ath10k_snoc_pipe {26struct ath10k_ce_pipe *ce_hdl;27u8 pipe_num;28struct ath10k *hif_ce_state;29size_t buf_sz;30/* protect ce info */31spinlock_t pipe_lock;32struct ath10k_snoc *ar_snoc;33};3435struct ath10k_snoc_target_info {36u32 target_version;37u32 target_type;38u32 target_revision;39u32 soc_version;40};4142struct ath10k_snoc_ce_irq {43u32 irq_line;44};4546enum ath10k_snoc_flags {47ATH10K_SNOC_FLAG_REGISTERED,48ATH10K_SNOC_FLAG_UNREGISTERING,49ATH10K_SNOC_FLAG_MODEM_STOPPED,50ATH10K_SNOC_FLAG_RECOVERY,51ATH10K_SNOC_FLAG_8BIT_HOST_CAP_QUIRK,52};5354struct clk_bulk_data;55struct regulator_bulk_data;5657struct ath10k_snoc {58struct platform_device *dev;59struct ath10k *ar;60unsigned int use_tz;61struct ath10k_firmware {62struct device *dev;63dma_addr_t fw_start_addr;64struct iommu_domain *iommu_domain;65size_t mapped_mem_size;66} fw;67void __iomem *mem;68dma_addr_t mem_pa;69struct ath10k_snoc_target_info target_info;70size_t mem_len;71struct ath10k_snoc_pipe pipe_info[CE_COUNT_MAX];72struct ath10k_snoc_ce_irq ce_irqs[CE_COUNT_MAX];73struct ath10k_ce ce;74struct timer_list rx_post_retry;75struct regulator_bulk_data *vregs;76size_t num_vregs;77struct clk_bulk_data *clks;78size_t num_clks;79struct ath10k_qmi *qmi;80struct notifier_block nb;81void *notifier;82unsigned long flags;83bool xo_cal_supported;84u32 xo_cal_data;85DECLARE_BITMAP(pending_ce_irqs, CE_COUNT_MAX);86};8788static inline struct ath10k_snoc *ath10k_snoc_priv(struct ath10k *ar)89{90return (struct ath10k_snoc *)ar->drv_priv;91}9293int ath10k_snoc_fw_indication(struct ath10k *ar, u64 type);94void ath10k_snoc_fw_crashed_dump(struct ath10k *ar);9596#endif /* _SNOC_H_ */979899