// SPDX-License-Identifier: GPL-2.0-only
/* Copyright(c) 2023 Intel Corporation */
#include "adf_common_drv.h"
#include "adf_gen4_hw_data.h"
#include "adf_gen4_ras.h"
#include "adf_sysfs_ras_counters.h"
#define BITS_PER_REG(_n_) (sizeof(_n_) * BITS_PER_BYTE)
static void enable_errsou_reporting(void __iomem *csr)
{
/* Enable correctable error reporting in ERRSOU0 */
ADF_CSR_WR(csr, ADF_GEN4_ERRMSK0, 0);
/* Enable uncorrectable error reporting in ERRSOU1 */
ADF_CSR_WR(csr, ADF_GEN4_ERRMSK1, 0);
/*
* Enable uncorrectable error reporting in ERRSOU2
* but disable PM interrupt and CFC attention interrupt by default
*/
ADF_CSR_WR(