RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
bsp.h
Go to the documentation of this file.
1
9/*
10 * Copyright (c) 2010, 2017 embedded brains GmbH. All rights reserved.
11 *
12 * embedded brains GmbH
13 * Dornierstr. 4
14 * 82178 Puchheim
15 * Germany
16 * <rtems@embedded-brains.de>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
20 * http://www.rtems.org/license/LICENSE.
21 */
22
23#ifndef LIBBSP_POWERPC_QORIQ_BSP_H
24#define LIBBSP_POWERPC_QORIQ_BSP_H
25
36#include <bspopts.h>
37
38#ifdef QORIQ_IS_HYPERVISOR_GUEST
39#define QORIQ_THREAD_COUNT 1
40#else
41#define QORIQ_THREAD_COUNT QORIQ_PHYSICAL_THREAD_COUNT
42#endif
43
44#ifndef ASM
45
46#include <rtems.h>
47
49
50#ifdef __cplusplus
51extern "C" {
52#endif /* __cplusplus */
53
54#define BSP_FEATURE_IRQ_EXTENSION
55
56#define BSP_FDT_IS_SUPPORTED
57
58#define QORIQ_CHIP(alpha, num) ((alpha) * 10000 + (num))
59
60#define QORIQ_CHIP_P1020 QORIQ_CHIP('P', 1020)
61
62#define QORIQ_CHIP_T2080 QORIQ_CHIP('T', 2080)
63
64#define QORIQ_CHIP_T4240 QORIQ_CHIP('T', 4240)
65
66#define QORIQ_CHIP_VARIANT QORIQ_CHIP(QORIQ_CHIP_SERIES, QORIQ_CHIP_NUMBER)
67
68#define QORIQ_CHIP_IS_T_VARIANT(variant) ((variant) / 10000 == 'T')
69
70extern unsigned BSP_bus_frequency;
71
72struct rtems_bsdnet_ifconfig;
73
74int BSP_tsec_attach(
75 struct rtems_bsdnet_ifconfig *config,
76 int attaching
77);
78
79int qoriq_if_intercom_attach_detach(
80 struct rtems_bsdnet_ifconfig *config,
81 int attaching
82);
83
84#if defined(HAS_UBOOT)
85 /* Routine to obtain U-Boot environment variables */
86 const char *bsp_uboot_getenv(
87 const char *name
88 );
89#endif
90
91void bsp_restart(void *addr) RTEMS_NO_RETURN;
92
93void *bsp_idle_thread( uintptr_t ignored );
94#define BSP_IDLE_TASK_BODY bsp_idle_thread
95
96#define RTEMS_BSP_NETWORK_DRIVER_ATTACH BSP_tsec_attach
97#define RTEMS_BSP_NETWORK_DRIVER_ATTACH4 qoriq_if_intercom_attach_detach
98
99#define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec1"
100#define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec2"
101#define RTEMS_BSP_NETWORK_DRIVER_NAME3 "tsec3"
102#define RTEMS_BSP_NETWORK_DRIVER_NAME4 "intercom1"
103
104/* Internal data and functions */
105
106typedef struct {
107 uint64_t addr;
108 uint64_t r3;
109 uint32_t reserved_0;
110 uint32_t pir;
111 uint64_t r6;
112 uint32_t reserved_1[8];
114
116qoriq_start_spin_table_addr[QORIQ_CPU_COUNT / QORIQ_THREAD_COUNT];
117
118struct Per_CPU_Control;
119
120void qoriq_start_thread(struct Per_CPU_Control *);
121
122void qoriq_restart_secondary_processor(
123 const qoriq_start_spin_table *spin_table
125
126void qoriq_initialize_exceptions(void *interrupt_stack_begin);
127
128void qoriq_decrementer_dispatch(void);
129
130extern uint32_t bsp_time_base_frequency;
131
132extern uint32_t qoriq_clock_frequency;
133
134#ifdef __cplusplus
135}
136#endif /* __cplusplus */
137
138#endif /* ASM */
139
142#endif /* LIBBSP_POWERPC_QORIQ_BSP_H */
DEFAULT_INITIAL_EXTENSION Support.
void bsp_restart(const void *addr)
Restarts the bsp with "addr" address.
Definition: restart.c:25
void * bsp_idle_thread(uintptr_t ignored)
Optimized idle task.
Definition: bspidle.c:26
#define RTEMS_NO_RETURN
Definition: basedefs.h:102
Per CPU Core Structure.
Definition: percpu.h:347
Definition: deflate.c:115
Definition: bsp.h:106