162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ci *
362306a36Sopenharmony_ci * Copyright (c) 2021, MediaTek Inc.
462306a36Sopenharmony_ci * Copyright (c) 2021-2022, Intel Corporation.
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci * Authors:
762306a36Sopenharmony_ci *  Haijun Liu <haijun.liu@mediatek.com>
862306a36Sopenharmony_ci *  Sreehari Kancharla <sreehari.kancharla@intel.com>
962306a36Sopenharmony_ci *
1062306a36Sopenharmony_ci * Contributors:
1162306a36Sopenharmony_ci *  Amir Hanania <amir.hanania@intel.com>
1262306a36Sopenharmony_ci *  Ricardo Martinez <ricardo.martinez@linux.intel.com>
1362306a36Sopenharmony_ci */
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci#ifndef __T7XX_MHCCIF_H__
1662306a36Sopenharmony_ci#define __T7XX_MHCCIF_H__
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci#include <linux/types.h>
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci#include "t7xx_pci.h"
2162306a36Sopenharmony_ci#include "t7xx_reg.h"
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci#define D2H_SW_INT_MASK (D2H_INT_EXCEPTION_INIT |		\
2462306a36Sopenharmony_ci			 D2H_INT_EXCEPTION_INIT_DONE |		\
2562306a36Sopenharmony_ci			 D2H_INT_EXCEPTION_CLEARQ_DONE |	\
2662306a36Sopenharmony_ci			 D2H_INT_EXCEPTION_ALLQ_RESET |		\
2762306a36Sopenharmony_ci			 D2H_INT_PORT_ENUM |			\
2862306a36Sopenharmony_ci			 D2H_INT_ASYNC_AP_HK |			\
2962306a36Sopenharmony_ci			 D2H_INT_ASYNC_MD_HK)
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_civoid t7xx_mhccif_mask_set(struct t7xx_pci_dev *t7xx_dev, u32 val);
3262306a36Sopenharmony_civoid t7xx_mhccif_mask_clr(struct t7xx_pci_dev *t7xx_dev, u32 val);
3362306a36Sopenharmony_ciu32 t7xx_mhccif_mask_get(struct t7xx_pci_dev *t7xx_dev);
3462306a36Sopenharmony_civoid t7xx_mhccif_init(struct t7xx_pci_dev *t7xx_dev);
3562306a36Sopenharmony_ciu32 t7xx_mhccif_read_sw_int_sts(struct t7xx_pci_dev *t7xx_dev);
3662306a36Sopenharmony_civoid t7xx_mhccif_h2d_swint_trigger(struct t7xx_pci_dev *t7xx_dev, u32 channel);
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci#endif /*__T7XX_MHCCIF_H__ */
39