1 /*
2  * Copyright (c) 2020 Gerson Fernando Budke <nandojve@gmail.com>
3  * Copyright (c) 2018 Vincent van der Locht
4  * Copyright (c) 2017 Justin Watson
5  * Copyright (c) 2016 Intel Corporation.
6  * Copyright (c) 2013-2015 Wind River Systems, Inc.
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 _ATMEL_SAM4S_SOC_H_
16 #define _ATMEL_SAM4S_SOC_H_
17 
18 #include <zephyr/sys/util.h>
19 
20 #ifndef _ASMLANGUAGE
21 
22 
23 #define DONT_USE_CMSIS_INIT
24 #define DONT_USE_PREDEFINED_CORE_HANDLERS
25 #define DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS
26 
27 #if defined(CONFIG_SOC_PART_NUMBER_SAM4S16C)
28 #include <sam4s16c.h>
29 #elif defined(CONFIG_SOC_PART_NUMBER_SAM4SA16C)
30 #include <sam4sa16c.h>
31 #elif defined(CONFIG_SOC_PART_NUMBER_SAM4S16B)
32 #include <sam4s16b.h>
33 #elif defined(CONFIG_SOC_PART_NUMBER_SAM4S8C)
34 #include <sam4s8c.h>
35 #elif defined(CONFIG_SOC_PART_NUMBER_SAM4S8B)
36 #include <sam4s8b.h>
37 #elif defined(CONFIG_SOC_PART_NUMBER_SAM4S4C)
38 #include <sam4s4c.h>
39 #elif defined(CONFIG_SOC_PART_NUMBER_SAM4S4B)
40 #include <sam4s4b.h>
41 #elif defined(CONFIG_SOC_PART_NUMBER_SAM4S4A)
42 #include <sam4s4a.h>
43 #elif defined(CONFIG_SOC_PART_NUMBER_SAM4S2C)
44 #include <sam4s2c.h>
45 #elif defined(CONFIG_SOC_PART_NUMBER_SAM4S2B)
46 #include <sam4s2b.h>
47 #elif defined(CONFIG_SOC_PART_NUMBER_SAM4S2A)
48 #include <sam4s2a.h>
49 #else
50 #error Library does not support the specified device.
51 #endif
52 
53 #include "../common/soc_pmc.h"
54 #include "../common/soc_gpio.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 /* _ATMEL_SAM4S_SOC_H_ */
66