/*
 * Copyright (c) 2018-2021, Renesas Electronics Corporation
 * All rights reserved.
 */

/******************************************************************************
 * @file          edc_init.c
 * - Version      : 0.01
 * @brief         Initial setting process of EDC.
 * .
 *****************************************************************************/
/******************************************************************************
 * History : DD.MM.YYYY Version  Description
 *         : 29.05.2020 0.01     First Release
 *****************************************************************************/

#include <mmio.h>
#include "axi_register.h"
#include "edc_init.h"

void edc_routing_err_init(void)
{
    uint32_t loop;
    const uint32_t edcrouerr_reg_tbl[][2] = {
        { EDC_EDCROUERREN, 0x00000001U },
        { EDC_EDCRERRINTEN0, 0xFFFF9CFFU },
        { EDC_EDCRERRINTEN1, 0xF7FFFFFFU },
        { EDC_EDCRERRINTEN2, 0xFFFFFFFFU },
        { EDC_EDCRERRINTEN3, 0xFC7FFFFFU },
        { EDC_EDCRERRINTEN4, 0xFFFFFFFFU },
        { EDC_EDCRERRINTEN5, 0x0000001EU }
    };


    for (loop = 0U;
        loop < (sizeof(edcrouerr_reg_tbl) /
                sizeof(edcrouerr_reg_tbl[0]));loop++)
    {
                mmio_write_32(edcrouerr_reg_tbl[loop][0],
                          edcrouerr_reg_tbl[loop][1]);
    }
}
/* End of function edc_routing_err_init */

