1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup QorIQ |
---|
5 | * |
---|
6 | * @brief BSP API. |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (c) 2010-2015 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 | |
---|
26 | #include <bspopts.h> |
---|
27 | |
---|
28 | #ifndef ASM |
---|
29 | |
---|
30 | #include <rtems.h> |
---|
31 | |
---|
32 | #include <bsp/default-initial-extension.h> |
---|
33 | |
---|
34 | #ifdef __cplusplus |
---|
35 | extern "C" { |
---|
36 | #endif /* __cplusplus */ |
---|
37 | |
---|
38 | #define BSP_FEATURE_IRQ_EXTENSION |
---|
39 | |
---|
40 | #define QORIQ_CHIP(alpha, num) ((alpha) * 10000 + (num)) |
---|
41 | |
---|
42 | #define QORIQ_CHIP_P1020 QORIQ_CHIP('P', 1020) |
---|
43 | |
---|
44 | #define QORIQ_CHIP_T2080 QORIQ_CHIP('T', 2080) |
---|
45 | |
---|
46 | #define QORIQ_CHIP_T4240 QORIQ_CHIP('T', 4240) |
---|
47 | |
---|
48 | #define QORIQ_CHIP_IS_T_VARIANT(variant) ((variant) / 10000 == 'T') |
---|
49 | |
---|
50 | extern unsigned BSP_bus_frequency; |
---|
51 | |
---|
52 | struct rtems_bsdnet_ifconfig; |
---|
53 | |
---|
54 | int BSP_tsec_attach( |
---|
55 | struct rtems_bsdnet_ifconfig *config, |
---|
56 | int attaching |
---|
57 | ); |
---|
58 | |
---|
59 | int qoriq_if_intercom_attach_detach( |
---|
60 | struct rtems_bsdnet_ifconfig *config, |
---|
61 | int attaching |
---|
62 | ); |
---|
63 | |
---|
64 | #if defined(HAS_UBOOT) |
---|
65 | /* Routine to obtain U-Boot environment variables */ |
---|
66 | const char *bsp_uboot_getenv( |
---|
67 | const char *name |
---|
68 | ); |
---|
69 | #endif |
---|
70 | |
---|
71 | /* Internal SMP startup function */ |
---|
72 | void qoriq_start_thread(void); |
---|
73 | |
---|
74 | void *bsp_idle_thread( uintptr_t ignored ); |
---|
75 | #define BSP_IDLE_TASK_BODY bsp_idle_thread |
---|
76 | |
---|
77 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH BSP_tsec_attach |
---|
78 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH4 qoriq_if_intercom_attach_detach |
---|
79 | |
---|
80 | #define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec1" |
---|
81 | #define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec2" |
---|
82 | #define RTEMS_BSP_NETWORK_DRIVER_NAME3 "tsec3" |
---|
83 | #define RTEMS_BSP_NETWORK_DRIVER_NAME4 "intercom1" |
---|
84 | |
---|
85 | #ifdef __cplusplus |
---|
86 | } |
---|
87 | #endif /* __cplusplus */ |
---|
88 | |
---|
89 | #endif /* ASM */ |
---|
90 | |
---|
91 | #endif /* LIBBSP_POWERPC_QORIQ_BSP_H */ |
---|