RTEMS  5.0.0
bsp.h
Go to the documentation of this file.
1 
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.org/license/LICENSE.
21  */
22 
23 #ifndef LIBBSP_POWERPC_MPC55XXEVB_BSP_H
24 #define LIBBSP_POWERPC_MPC55XXEVB_BSP_H
25 
36 #include <bspopts.h>
37 
38 #define BSP_FEATURE_IRQ_EXTENSION
39 
40 #define MPC55XX_PERIPHERAL_CLOCK \
41  (MPC55XX_SYSTEM_CLOCK / MPC55XX_SYSTEM_CLOCK_DIVIDER)
42 
43 #ifndef ASM
44 
45 #include <rtems.h>
46 
47 #include <libcpu/powerpc-utility.h>
48 
49 #include <bsp/tictac.h>
50 #include <bsp/linker-symbols.h>
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif /* __cplusplus */
56 
58 extern unsigned int bsp_clock_speed;
59 
61 extern uint32_t bsp_clicks_per_usec;
62 
64 #define BSP_Convert_decrementer( _value ) \
65  (((unsigned long long) (_value)) / ((unsigned long long)bsp_clicks_per_usec))
66 
67 rtems_status_code mpc55xx_sd_card_init( bool mount);
68 
69 /* Network driver configuration */
70 
71 struct rtems_bsdnet_ifconfig;
72 
73 int smsc9218i_attach_detach(
74  struct rtems_bsdnet_ifconfig *config,
75  int attaching
76 );
77 
78 #define RTEMS_BSP_NETWORK_DRIVER_ATTACH smsc9218i_attach_detach
79 
80 #define RTEMS_BSP_NETWORK_DRIVER_NAME "eth0"
81 
82 rtems_status_code bsp_register_i2c(void);
83 
84 void bsp_restart(void *addr);
85 
86 void *bsp_idle_thread(uintptr_t arg);
87 
88 #define BSP_IDLE_TASK_BODY bsp_idle_thread
89 
90 LINKER_SYMBOL(bsp_section_dsram_begin)
91 LINKER_SYMBOL(bsp_section_dsram_end)
92 LINKER_SYMBOL(bsp_section_dsram_size)
93 LINKER_SYMBOL(bsp_section_dsram_load_begin)
94 LINKER_SYMBOL(bsp_section_dsram_load_end)
95 
96 #define BSP_DSRAM_SECTION __attribute__((section(".bsp_dsram")))
97 
98 LINKER_SYMBOL(bsp_section_sysram_begin)
99 LINKER_SYMBOL(bsp_section_sysram_end)
100 LINKER_SYMBOL(bsp_section_sysram_size)
101 LINKER_SYMBOL(bsp_section_sysram_load_begin)
102 LINKER_SYMBOL(bsp_section_sysram_load_end)
103 
104 #define BSP_SYSRAM_SECTION __attribute__((section(".bsp_sysram")))
105 
106 #ifdef __cplusplus
107 }
108 #endif /* __cplusplus */
109 
110 #endif /* ASM */
111 
114 #endif /* LIBBSP_POWERPC_MPC55XXEVB_BSP_H */
Definition: deflate.c:115
int mount(const char *source, const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data)
Mounts a file system instance at the specified target path.
Definition: mount.c:178
uint32_t bsp_clicks_per_usec
Time base clicks per micro second.
Definition: bspstart.c:99
Header file for tic-tac code.
unsigned int bsp_clock_speed
System clock frequency.
Definition: bspstart.c:48
DEFAULT_INITIAL_EXTENSION Support.
General purpose assembler macros, linker command file support and some inline functions for direct re...
rtems_status_code
Classic API Status.
Definition: status.h:43
void * bsp_idle_thread(uintptr_t ignored)
Optimized idle task.
Definition: bspidle.c:26
void bsp_restart(const void *addr)
Restarts the bsp with "addr" address.
Definition: restart.c:25