source: rtems/bsps/arm/atsam/include/bsp.h @ 6fc04f4c

Last change on this file since 6fc04f4c was 6fc04f4c, checked in by Joel Sherrill <joel@…>, on 06/27/22 at 13:46:02

bsps/arm/atsamv: Change license to BSD-2

Updates #3053.

  • Property mode set to 100644
File size: 4.0 KB
RevLine 
[6fc04f4c]1/* SPDX-License-Identifier: BSD-2-Clause */
2
[c991eeec]3/**
4 * @file
5 *
6 * @ingroup RTEMSBSPsARMAtsam
7 */
8
[f2e0f8e]9/*
10 * Copyright (c) 2016 embedded brains GmbH.  All rights reserved.
11 *
[6fc04f4c]12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 *    notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 *    notice, this list of conditions and the following disclaimer in the
19 *    documentation and/or other materials provided with the distribution.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
[f2e0f8e]32 */
33
34#ifndef LIBBSP_ARM_ATSAM_BSP_H
35#define LIBBSP_ARM_ATSAM_BSP_H
36
[c991eeec]37/**
38 * @defgroup RTEMSBSPsARMAtsam Atmel/Microchip SAM E70, S70, V70 and V71
39 *
40 * @ingroup RTEMSBSPsARM
41 *
42 * @brief Atmel/Microchip SAM E70, S70, V70 and V71 Board Support Package.
43 *
44 * @{
45 */
46
[f2e0f8e]47#include <bspopts.h>
48#include <bsp/default-initial-extension.h>
[aa95122]49#include <sys/ioccom.h>
[f2e0f8e]50
51#include <rtems.h>
52
53#ifdef __cplusplus
54extern "C" {
55#endif /* __cplusplus */
56
57#define BSP_FEATURE_IRQ_EXTENSION
58
59#define BSP_ARMV7M_IRQ_PRIORITY_DEFAULT (13 << 4)
60
61#define BSP_ARMV7M_SYSTICK_PRIORITY (14 << 4)
62
63uint32_t atsam_systick_frequency(void);
64
65#define BSP_ARMV7M_SYSTICK_FREQUENCY atsam_systick_frequency()
66
[fb29ca55]67struct rtems_bsdnet_ifconfig;
68
69int if_atsam_attach(struct rtems_bsdnet_ifconfig *config, int attaching);
70
71#define RTEMS_BSP_NETWORK_DRIVER_NAME "atsam0"
72
73#define RTEMS_BSP_NETWORK_DRIVER_ATTACH if_atsam_attach
74
75/**
76 * @brief Interface driver configuration.
77 */
78typedef struct {
79  /**
80   * @brief Maximum retries for MDIO communication.
81   */
82  uint32_t mdio_retries;
83
84  /**
85   * @brief Address of PHY.
86   *
[15f0f9b]87   * Use 0xff to search for a PHY.
[fb29ca55]88   */
[15f0f9b]89  uint8_t phy_addr;
[fb29ca55]90} if_atsam_config;
91
[891fa3e]92extern char atsam_memory_dtcm_begin[];
93extern char atsam_memory_dtcm_end[];
94extern char atsam_memory_dtcm_size[];
95
96extern char atsam_memory_intflash_begin[];
97extern char atsam_memory_intflash_end[];
98extern char atsam_memory_intflash_size[];
99
100extern char atsam_memory_intsram_begin[];
101extern char atsam_memory_intsram_end[];
102extern char atsam_memory_intsram_size[];
103
104extern char atsam_memory_itcm_begin[];
105extern char atsam_memory_itcm_end[];
106extern char atsam_memory_itcm_size[];
107
108extern char atsam_memory_nocache_begin[];
109extern char atsam_memory_nocache_end[];
110extern char atsam_memory_nocache_size[];
111
112extern char atsam_memory_qspiflash_begin[];
113extern char atsam_memory_qspiflash_end[];
114extern char atsam_memory_qspiflash_size[];
115
116extern char atsam_memory_sdram_begin[];
117extern char atsam_memory_sdram_end[];
118extern char atsam_memory_sdram_size[];
119
[e5fd901]120void atsam_rtc_get_time(rtems_time_of_day *tod);
121
[5d0f0de4]122
123
[2ae0acb]124void bsp_restart( const void *const addr );
125
[aa95122]126/*
127 * This ioctl enables the receive DMA for an UART. The DMA can be usefull if you
128 * loose characters in high interrupt load situations.
129 *
130 * Disabling the DMA again is only possible by closing all file descriptors of
131 * that UART.
132 *
133 * Note that every UART needs one DMA channel and the system has only a limited
134 * amount of DMAs. So only use it if you need it.
135 */
136#define ATSAM_UART_ENABLE_RX_DMA _IO('d', 0)
137
[f2e0f8e]138#ifdef __cplusplus
139}
140#endif /* __cplusplus */
141
[c991eeec]142/** @} */
143
[f2e0f8e]144#endif /* LIBBSP_ARM_ATSAM_BSP_H */
Note: See TracBrowser for help on using the repository browser.