soc: atmel_sam0: Add GMAC fix-up for SAM D/E5x

This commit adds the MCLK clock configuration symbol fix-up for the
GMAC peripheral.

The APB-agnostic clock configuration fix-up symbols map to the
SoC-specific APB, in order to accommodate different SoC variants with
the GMAC on different APBs.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
Stephanos Ioannidis 2020-03-06 01:51:44 +09:00 committed by Kumar Gala
commit a399c90009
3 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,27 @@
/*
* Copyright (c) 2020 Stephanos Ioannidis <root@stephanos.io>
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* The following GMAC clock configuration fix-up symbols map to the applicable
* APB-specific symbols, in order to accommodate different SoC series with the
* GMAC core connected to different APBs.
*/
#ifdef MCLK_APBAMASK_GMAC
#define MCLK_GMAC (&MCLK->APBAMASK.reg)
#define MCLK_GMAC_MASK (MCLK_APBAMASK_GMAC)
#endif
#ifdef MCLK_APBBMASK_GMAC
#define MCLK_GMAC (&MCLK->APBBMASK.reg)
#define MCLK_GMAC_MASK (MCLK_APBBMASK_GMAC)
#endif
#ifdef MCLK_APBCMASK_GMAC
#define MCLK_GMAC (&MCLK->APBCMASK.reg)
#define MCLK_GMAC_MASK (MCLK_APBCMASK_GMAC)
#endif
#ifdef MCLK_APBDMASK_GMAC
#define MCLK_GMAC (&MCLK->APBDMASK.reg)
#define MCLK_GMAC_MASK (MCLK_APBDMASK_GMAC)
#endif

View file

@ -31,6 +31,7 @@
#include "sercom_fixup_samd5x.h"
#include "tc_fixup_samd5x.h"
#include "gmac_fixup_samd5x.h"
#define SOC_ATMEL_SAM0_OSC32K_FREQ_HZ 32768

View file

@ -29,6 +29,7 @@
#include "sercom_fixup_samd5x.h"
#include "tc_fixup_samd5x.h"
#include "gmac_fixup_samd5x.h"
#define SOC_ATMEL_SAM0_OSC32K_FREQ_HZ 32768