RTEMS 6.1-rc7
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
92rtems_isr_entry set_vector(
93 rtems_isr_entry handler,
95 int type
96);
97
98/* Initial values for the interrupt level and priority registers (INTC_ICRn) */
99extern const uint8_t mcf548x_intc_icr_init_values[64];
100
101/*
102 * Network driver configuration
103 */
104struct rtems_bsdnet_ifconfig;
105extern int rtems_mcf548x_fec_driver_attach_detach(struct rtems_bsdnet_ifconfig *config,int attaching);
106#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_mcf548x_fec_driver_attach_detach
107
108#define RTEMS_BSP_NETWORK_DRIVER_NAME "fec1"
109#define RTEMS_BSP_NETWORK_DRIVER_NAME2 "fec2"
110
111#ifdef HAS_DBUG
112 typedef struct {
113 uint32_t console_baudrate;
114 uint8_t server_ip [4];
115 uint8_t client_ip [4];
116 uint8_t gateway_ip[4];
117 uint8_t netmask [4];
118 uint8_t spare[4];
119 uint8_t macaddr [6];
120 uint32_t ethport; /* default fec port: 1 = fec1, 2 = fec2 */
121 uint32_t uartport; /* default fec port: 1 = psc0, 2 = psc1... */
122 } dbug_settings_t;
123
124#define DBUG_SETTINGS (*(const dbug_settings_t *)0xFC020000)
125#endif /* HAS_DBUG */
126
127void bsp_cacr_set_flags(uint32_t flags);
128
129void bsp_cacr_set_self_clear_flags(uint32_t flags);
130
131void bsp_cacr_clear_flags(uint32_t flags);
132
133#ifdef __cplusplus
134}
135#endif
136
139#endif
This header file provides the kernel character input/output support API.
This header file provides the default definition of BSP_INITIAL_EXTENSION.
ISR_Handler_entry rtems_isr_entry
Interrupt service routines installed by rtems_interrupt_catch() shall have this type.
Definition: intr.h:134
ISR_Vector_number rtems_vector_number
This integer type represents interrupt vector numbers.
Definition: intr.h:102
This header file defines the RTEMS Classic API.
Definition: deflate.c:114