linux/drivers/edac/al_mc_edac.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 */
#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/edac.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include "edac_module.h"

/* Registers Offset */
#define AL_MC_ECC_CFG
#define AL_MC_ECC_CLEAR
#define AL_MC_ECC_ERR_COUNT
#define AL_MC_ECC_CE_ADDR0
#define AL_MC_ECC_CE_ADDR1
#define AL_MC_ECC_UE_ADDR0
#define AL_MC_ECC_UE_ADDR1
#define AL_MC_ECC_CE_SYND0
#define AL_MC_ECC_CE_SYND1
#define AL_MC_ECC_CE_SYND2
#define AL_MC_ECC_UE_SYND0
#define AL_MC_ECC_UE_SYND1
#define AL_MC_ECC_UE_SYND2

/* Registers Fields */
#define AL_MC_ECC_CFG_SCRUB_DISABLED

#define AL_MC_ECC_CLEAR_UE_COUNT
#define AL_MC_ECC_CLEAR_CE_COUNT
#define AL_MC_ECC_CLEAR_UE_ERR
#define AL_MC_ECC_CLEAR_CE_ERR

#define AL_MC_ECC_ERR_COUNT_UE
#define AL_MC_ECC_ERR_COUNT_CE

#define AL_MC_ECC_CE_ADDR0_RANK
#define AL_MC_ECC_CE_ADDR0_ROW

#define AL_MC_ECC_CE_ADDR1_BG
#define AL_MC_ECC_CE_ADDR1_BANK
#define AL_MC_ECC_CE_ADDR1_COLUMN

#define AL_MC_ECC_UE_ADDR0_RANK
#define AL_MC_ECC_UE_ADDR0_ROW

#define AL_MC_ECC_UE_ADDR1_BG
#define AL_MC_ECC_UE_ADDR1_BANK
#define AL_MC_ECC_UE_ADDR1_COLUMN

#define DRV_NAME
#define AL_MC_EDAC_MSG_MAX

struct al_mc_edac {};

static void prepare_msg(char *message, size_t buffer_size,
			enum hw_event_mc_err_type type,
			u8 rank, u32 row, u8 bg, u8 bank, u16 column,
			u32 syn0, u32 syn1, u32 syn2)
{}

static int handle_ce(struct mem_ctl_info *mci)
{}

static int handle_ue(struct mem_ctl_info *mci)
{}

static void al_mc_edac_check(struct mem_ctl_info *mci)
{}

static irqreturn_t al_mc_edac_irq_handler_ue(int irq, void *info)
{}

static irqreturn_t al_mc_edac_irq_handler_ce(int irq, void *info)
{}

static enum scrub_type get_scrub_mode(void __iomem *mmio_base)
{}

static void devm_al_mc_edac_free(void *data)
{}

static void devm_al_mc_edac_del(void *data)
{}

static int al_mc_edac_probe(struct platform_device *pdev)
{}

static const struct of_device_id al_mc_edac_of_match[] =;

MODULE_DEVICE_TABLE(of, al_mc_edac_of_match);

static struct platform_driver al_mc_edac_driver =;

module_platform_driver();

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();