1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup mpc55xx |
---|
5 | * |
---|
6 | * @brief Global BSP variables and functions |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved. |
---|
11 | * |
---|
12 | * embedded brains GmbH |
---|
13 | * Obere Lagerstr. 30 |
---|
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.com/license/LICENSE. |
---|
21 | */ |
---|
22 | |
---|
23 | #ifndef LIBBSP_POWERPC_MPC55XXEVB_BSP_H |
---|
24 | #define LIBBSP_POWERPC_MPC55XXEVB_BSP_H |
---|
25 | |
---|
26 | #include <stdint.h> |
---|
27 | |
---|
28 | #include <rtems.h> |
---|
29 | #include <rtems/console.h> |
---|
30 | #include <rtems/clockdrv.h> |
---|
31 | |
---|
32 | #include <bspopts.h> |
---|
33 | |
---|
34 | #include <bsp/tictac.h> |
---|
35 | |
---|
36 | #ifdef __cplusplus |
---|
37 | extern "C" { |
---|
38 | #endif /* __cplusplus */ |
---|
39 | |
---|
40 | #define BSP_SMALL_MEMORY 1 |
---|
41 | |
---|
42 | #define BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN |
---|
43 | |
---|
44 | #define BSP_FEATURE_IRQ_EXTENSION |
---|
45 | |
---|
46 | #ifndef ASM |
---|
47 | |
---|
48 | /** @brief System clock frequency */ |
---|
49 | extern unsigned int bsp_clock_speed; |
---|
50 | |
---|
51 | /** @brief Time base clicks per micro second */ |
---|
52 | extern uint32_t bsp_clicks_per_usec; |
---|
53 | |
---|
54 | /** @brief Convert Decrementer ticks to microseconds */ |
---|
55 | #define BSP_Convert_decrementer( _value ) \ |
---|
56 | (((unsigned long long) (_value)) / ((unsigned long long)bsp_clicks_per_usec)) |
---|
57 | |
---|
58 | rtems_status_code mpc55xx_sd_card_init( bool mount); |
---|
59 | |
---|
60 | /* Network driver configuration */ |
---|
61 | |
---|
62 | struct rtems_bsdnet_ifconfig; |
---|
63 | |
---|
64 | int smsc9218i_attach_detach( |
---|
65 | struct rtems_bsdnet_ifconfig *config, |
---|
66 | int attaching |
---|
67 | ); |
---|
68 | |
---|
69 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH smsc9218i_attach_detach |
---|
70 | |
---|
71 | #define RTEMS_BSP_NETWORK_DRIVER_NAME "eth0" |
---|
72 | |
---|
73 | rtems_status_code bsp_register_i2c(void); |
---|
74 | |
---|
75 | void bsp_restart(void *addr); |
---|
76 | |
---|
77 | void *bsp_idle_thread(uintptr_t arg); |
---|
78 | |
---|
79 | #define BSP_IDLE_TASK_BODY bsp_idle_thread |
---|
80 | |
---|
81 | #endif /* ASM */ |
---|
82 | |
---|
83 | #ifdef __cplusplus |
---|
84 | } |
---|
85 | #endif /* __cplusplus */ |
---|
86 | |
---|
87 | #endif /* LIBBSP_POWERPC_MPC55XXEVB_BSP_H */ |
---|