source: rtems/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h @ b762488e

4.115
Last change on this file since b762488e was b762488e, checked in by Sebastian Huber <sebastian.huber@…>, on Sep 28, 2012 at 2:02:28 PM

bsp/mpc55xx: Add e200z7 specific idle task

  • Property mode set to 100644
File size: 1.9 KB
Line 
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
37extern "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 */
49extern unsigned int bsp_clock_speed;
50
51/** @brief Time base clicks per micro second */
52extern 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
58rtems_status_code mpc55xx_sd_card_init( bool mount);
59
60/* Network driver configuration */
61
62struct rtems_bsdnet_ifconfig;
63
64int 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
73rtems_status_code bsp_register_i2c(void);
74
75void bsp_restart(void *addr);
76
77#if MPC55XX_CHIP_TYPE / 10 == 567
78  static void *mpc55xx_idle_task(uintptr_t arg)
79  {
80    while (true) {
81      __asm__ volatile ("wait");
82    }
83
84    return NULL;
85  }
86 
87  #define BSP_IDLE_TASK_BODY mpc55xx_idle_task
88#endif
89
90#endif /* ASM */
91
92#ifdef __cplusplus
93}
94#endif /* __cplusplus */
95
96#endif /* LIBBSP_POWERPC_MPC55XXEVB_BSP_H */
Note: See TracBrowser for help on using the repository browser.