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 * RTEMS generic mcf548x BSP
13 *
14 * The file contains the BSP header of generic MCF548x BSP.
15 *
16 * Parts of the code has been derived from the "dBUG source code"
17 * package Freescale is providing for M548X EVBs. The usage of
18 * the modified or unmodified code and it's integration into the
19 * generic mcf548x BSP has been done according to the Freescale
20 * license terms.
21 *
22 * The Freescale license terms can be reviewed in the file
23 *
24 * LICENSE.Freescale
25 *
26 * The generic mcf548x BSP has been developed on the basic
27 * structures and modules of the av5282 BSP.
28 */
29
30/*
31 * Copyright (c) 2007 embedded brains GmbH & Co. KG
32 *
33 * Redistribution and use in source and binary forms, with or without
34 * modification, are permitted provided that the following conditions
35 * are met:
36 * 1. Redistributions of source code must retain the above copyright
37 * notice, this list of conditions and the following disclaimer.
38 * 2. Redistributions in binary form must reproduce the above copyright
39 * notice, this list of conditions and the following disclaimer in the
40 * documentation and/or other materials provided with the distribution.
41 *
42 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
43 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
44 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
45 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
46 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
47 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
48 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
49 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
50 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
51 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
52 * POSSIBILITY OF SUCH DAMAGE.
53 */
54
55#ifndef LIBBSP_M68K_GENMCF548X_BSP_H
56#define LIBBSP_M68K_GENMCF548X_BSP_H
57
58#include <bspopts.h>
60
71#include <rtems.h>
72#include <rtems/bspIo.h>
73
74/***************************************************************************/
76#include <mcf548x/mcf548x.h>
77
78#ifdef __cplusplus
79extern "C" {
80#endif
81
82/***************************************************************************/
85/* define which port the console should use - all other ports are then defined as general purpose */
86#define CONSOLE_PORT 0
87
88/* functions */
89
90uint32_t get_CPU_clock_speed(void);
91
92/* Initial values for the interrupt level and priority registers (INTC_ICRn) */
93extern const uint8_t mcf548x_intc_icr_init_values[64];
94
95/*
96 * Network driver configuration
97 */
98struct rtems_bsdnet_ifconfig;
99extern int rtems_mcf548x_fec_driver_attach_detach(struct rtems_bsdnet_ifconfig *config,int attaching);
100#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_mcf548x_fec_driver_attach_detach
101
102#define RTEMS_BSP_NETWORK_DRIVER_NAME "fec1"
103#define RTEMS_BSP_NETWORK_DRIVER_NAME2 "fec2"
104
105#ifdef HAS_DBUG
106 typedef struct {
107 uint32_t console_baudrate;
108 uint8_t server_ip [4];
109 uint8_t client_ip [4];
110 uint8_t gateway_ip[4];
111 uint8_t netmask [4];
112 uint8_t spare[4];
113 uint8_t macaddr [6];
114 uint32_t ethport; /* default fec port: 1 = fec1, 2 = fec2 */
115 uint32_t uartport; /* default fec port: 1 = psc0, 2 = psc1... */
116 } dbug_settings_t;
117
118#define DBUG_SETTINGS (*(const dbug_settings_t *)0xFC020000)
119#endif /* HAS_DBUG */
120
121void bsp_cacr_set_flags(uint32_t flags);
122
123void bsp_cacr_set_self_clear_flags(uint32_t flags);
124
125void bsp_cacr_clear_flags(uint32_t flags);
126
127#ifdef __cplusplus
128}
129#endif
130
133#endif
This header file provides the kernel character input/output support API.
This header file provides the default definition of BSP_INITIAL_EXTENSION.
This header file defines the RTEMS Classic API.