mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-25 19:54:35 +00:00
This patch adds mt8195 IPC support by using mailbox. On mt8195 resource, there are two mboxes used to handle ipc request and reply. We create a mtk-adsp-ipc client device to request mbox controllers. Signed-off-by: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20220512082215.3018-3-tinghan.shen@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
54 lines
1.3 KiB
C
54 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/*
|
|
* Copyright (c) 2021 MediaTek Corporation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef __MTK_ADSP_HELPER_H__
|
|
#define __MTK_ADSP_HELPER_H__
|
|
|
|
#include <linux/firmware/mediatek/mtk-adsp-ipc.h>
|
|
|
|
/*
|
|
* Global important adsp data structure.
|
|
*/
|
|
struct mtk_adsp_chip_info {
|
|
phys_addr_t pa_sram;
|
|
phys_addr_t pa_dram; /* adsp dram physical base */
|
|
phys_addr_t pa_shared_dram; /* adsp dram physical base */
|
|
phys_addr_t pa_cfgreg;
|
|
u32 sramsize;
|
|
u32 dramsize;
|
|
u32 cfgregsize;
|
|
void __iomem *va_sram; /* corresponding to pa_sram */
|
|
void __iomem *va_dram; /* corresponding to pa_dram */
|
|
void __iomem *va_cfgreg;
|
|
void __iomem *shared_sram; /* part of va_sram */
|
|
void __iomem *shared_dram; /* part of va_dram */
|
|
phys_addr_t adsp_bootup_addr;
|
|
int dram_offset; /*dram offset between system and dsp view*/
|
|
|
|
phys_addr_t pa_secreg;
|
|
u32 secregsize;
|
|
void __iomem *va_secreg;
|
|
|
|
phys_addr_t pa_busreg;
|
|
u32 busregsize;
|
|
void __iomem *va_busreg;
|
|
};
|
|
|
|
struct adsp_priv {
|
|
struct device *dev;
|
|
struct snd_sof_dev *sdev;
|
|
struct mtk_adsp_ipc *dsp_ipc;
|
|
struct platform_device *ipc_dev;
|
|
struct mtk_adsp_chip_info *adsp;
|
|
struct clk **clk;
|
|
u32 (*ap2adsp_addr)(u32 addr, void *data);
|
|
u32 (*adsp2ap_addr)(u32 addr, void *data);
|
|
|
|
void *private_data;
|
|
};
|
|
|
|
#endif
|