1 /* 2 * Copyright (c) 2013-2015 Wind River Systems, Inc. 3 * Copyright (c) 2016 Intel Corporation. 4 * Copyright (c) 2017 Justin Watson 5 * Copyright (c) 2018 Vincent van der Locht 6 * Copyright (c) 2020-2024 Gerson Fernando Budke <nandojve@gmail.com> 7 * 8 * SPDX-License-Identifier: Apache-2.0 9 */ 10 11 /** 12 * @file SoC configuration macros for the Atmel SAM4S family processors. 13 */ 14 15 #ifndef _SOC_ATMEL_SAM_SAM4S_SOC_H_ 16 #define _SOC_ATMEL_SAM_SAM4S_SOC_H_ 17 18 #include <zephyr/sys/util.h> 19 20 #ifndef _ASMLANGUAGE 21 22 #define DONT_USE_CMSIS_INIT 23 #define DONT_USE_PREDEFINED_CORE_HANDLERS 24 #define DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS 25 26 #if defined(CONFIG_SOC_SAM4S16C) 27 #include <sam4s16c.h> 28 #elif defined(CONFIG_SOC_SAM4SA16C) 29 #include <sam4sa16c.h> 30 #elif defined(CONFIG_SOC_SAM4S16B) 31 #include <sam4s16b.h> 32 #elif defined(CONFIG_SOC_SAM4S8C) 33 #include <sam4s8c.h> 34 #elif defined(CONFIG_SOC_SAM4S8B) 35 #include <sam4s8b.h> 36 #elif defined(CONFIG_SOC_SAM4S4C) 37 #include <sam4s4c.h> 38 #elif defined(CONFIG_SOC_SAM4S4B) 39 #include <sam4s4b.h> 40 #elif defined(CONFIG_SOC_SAM4S4A) 41 #include <sam4s4a.h> 42 #elif defined(CONFIG_SOC_SAM4S2C) 43 #include <sam4s2c.h> 44 #elif defined(CONFIG_SOC_SAM4S2B) 45 #include <sam4s2b.h> 46 #elif defined(CONFIG_SOC_SAM4S2A) 47 #include <sam4s2a.h> 48 #else 49 #error Library does not support the specified device. 50 #endif 51 52 #include "../common/soc_pmc.h" 53 #include "../common/soc_gpio.h" 54 #include "../common/soc_supc.h" 55 #include "../common/atmel_sam_dt.h" 56 57 /** Processor Clock (HCLK) Frequency */ 58 #define SOC_ATMEL_SAM_HCLK_FREQ_HZ ATMEL_SAM_DT_CPU_CLK_FREQ_HZ 59 60 /** Master Clock (MCK) Frequency */ 61 #define SOC_ATMEL_SAM_MCK_FREQ_HZ SOC_ATMEL_SAM_HCLK_FREQ_HZ 62 63 #endif /* !_ASMLANGUAGE */ 64 65 #endif /* _SOC_ATMEL_SAM_SAM4S_SOC_H_ */ 66