RTEMS 7.0-rc1
Loading...
Searching...
No Matches
bsp.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/*
12 * Copyright (C) 2008, 2012 embedded brains GmbH & Co. KG
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
34 */
35
36#ifndef LIBBSP_POWERPC_MPC55XXEVB_BSP_H
37#define LIBBSP_POWERPC_MPC55XXEVB_BSP_H
38
49#include <bspopts.h>
50
51#define BSP_FEATURE_IRQ_EXTENSION
52
53#define MPC55XX_PERIPHERAL_CLOCK \
54 (MPC55XX_SYSTEM_CLOCK / MPC55XX_SYSTEM_CLOCK_DIVIDER)
55
56#ifndef ASM
57
58#include <rtems.h>
59
61
62#include <bsp/tictac.h>
63#include <bsp/linker-symbols.h>
65
66#ifdef __cplusplus
67extern "C" {
68#endif /* __cplusplus */
69
71extern unsigned int bsp_clock_speed;
72
74extern uint32_t bsp_clicks_per_usec;
75
77#define BSP_Convert_decrementer( _value ) \
78 (((unsigned long long) (_value)) / ((unsigned long long)bsp_clicks_per_usec))
79
80rtems_status_code mpc55xx_sd_card_init( bool mount);
81
82/* Network driver configuration */
83
84struct rtems_bsdnet_ifconfig;
85
86int smsc9218i_attach_detach(
87 struct rtems_bsdnet_ifconfig *config,
88 int attaching
89);
90
91#define RTEMS_BSP_NETWORK_DRIVER_ATTACH smsc9218i_attach_detach
92
93#define RTEMS_BSP_NETWORK_DRIVER_NAME "eth0"
94
95rtems_status_code bsp_register_i2c(void);
96
97void bsp_restart(void *addr);
98
99void *bsp_idle_thread(uintptr_t arg);
100
101#define BSP_IDLE_TASK_BODY bsp_idle_thread
102
103LINKER_SYMBOL(bsp_section_dsram_begin)
104LINKER_SYMBOL(bsp_section_dsram_end)
105LINKER_SYMBOL(bsp_section_dsram_size)
106LINKER_SYMBOL(bsp_section_dsram_load_begin)
107LINKER_SYMBOL(bsp_section_dsram_load_end)
108
109#define BSP_DSRAM_SECTION __attribute__((section(".bsp_dsram")))
110
111LINKER_SYMBOL(bsp_section_sysram_begin)
112LINKER_SYMBOL(bsp_section_sysram_end)
113LINKER_SYMBOL(bsp_section_sysram_size)
114LINKER_SYMBOL(bsp_section_sysram_load_begin)
115LINKER_SYMBOL(bsp_section_sysram_load_end)
116
117#define BSP_SYSRAM_SECTION __attribute__((section(".bsp_sysram")))
118
119#ifdef __cplusplus
120}
121#endif /* __cplusplus */
122
123#endif /* ASM */
124
127#endif /* LIBBSP_POWERPC_MPC55XXEVB_BSP_H */
This header file provides the default definition of BSP_INITIAL_EXTENSION.
int mount(const char *source, const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data)
Mounts a file system instance at the specified target path.
Definition: mount.c:197
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
void * bsp_idle_thread(uintptr_t ignored)
Optimized idle task.
Definition: bspidle.c:39
uint32_t bsp_clicks_per_usec
Time base clicks per micro second.
Definition: bspstart.c:103
unsigned int bsp_clock_speed
System clock frequency.
Definition: bspstart.c:61
This header file provides interfaces to BSP-specific linker symbols and sections.
General purpose assembler macros, linker command file support and some inline functions for direct re...
This header file defines the RTEMS Classic API.
Header file for tic-tac code.