[574fb67] | 1 | /** |
---|
| 2 | * @file |
---|
| 3 | * |
---|
| 4 | * @ingroup mpc55xx |
---|
| 5 | * |
---|
| 6 | * @brief Global BSP variables and functions |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | /* |
---|
[c838ca2d] | 10 | * Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved. |
---|
[574fb67] | 11 | * |
---|
[9e7758b] | 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. |
---|
[574fb67] | 21 | */ |
---|
| 22 | |
---|
[dbb3211a] | 23 | #ifndef LIBBSP_POWERPC_MPC55XXEVB_BSP_H |
---|
| 24 | #define LIBBSP_POWERPC_MPC55XXEVB_BSP_H |
---|
[574fb67] | 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 | |
---|
[91197a9] | 40 | #define BSP_SMALL_MEMORY 1 |
---|
| 41 | |
---|
[9e7758b] | 42 | #define BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN |
---|
| 43 | |
---|
[839dc97e] | 44 | #define BSP_FEATURE_IRQ_EXTENSION |
---|
| 45 | |
---|
[574fb67] | 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 | |
---|
[2f5435a4] | 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 | |
---|
[d374492] | 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" |
---|
[574fb67] | 72 | |
---|
[dbb3211a] | 73 | rtems_status_code bsp_register_i2c(void); |
---|
| 74 | |
---|
[c838ca2d] | 75 | void bsp_restart(void *addr); |
---|
| 76 | |
---|
[574fb67] | 77 | #endif /* ASM */ |
---|
| 78 | |
---|
| 79 | #ifdef __cplusplus |
---|
| 80 | } |
---|
| 81 | #endif /* __cplusplus */ |
---|
| 82 | |
---|
[dbb3211a] | 83 | #endif /* LIBBSP_POWERPC_MPC55XXEVB_BSP_H */ |
---|