source: rtems/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h @ ce0922e

4.11
Last change on this file since ce0922e was ce0922e, checked in by Sebastian Huber <sebastian.huber@…>, on Dec 30, 2010 at 1:16:41 PM

2010-12-30 Sebastian Huber <sebastian.huber@…>

  • include/u-boot.h: Removed file.
  • include/u-boot-config.h, include/tsec-config.h: New files.
  • include/bsp.h, start/start.S, startup/bspstart.c: Use new U-Boot support.
  • network/network.c: Update for API changes.
  • Makefile.am, preinstall.am: Reflect changes above.
  • Property mode set to 100644
File size: 4.0 KB
Line 
1/*===============================================================*\
2| Project: RTEMS generic MPC83xx BSP                              |
3+-----------------------------------------------------------------+
4|                    Copyright (c) 2007                           |
5|                    Embedded Brains GmbH                         |
6|                    Obere Lagerstr. 30                           |
7|                    D-82178 Puchheim                             |
8|                    Germany                                      |
9|                    rtems@embedded-brains.de                     |
10+-----------------------------------------------------------------+
11| The license and distribution terms for this file may be         |
12| found in the file LICENSE in this distribution or at            |
13|                                                                 |
14| http://www.rtems.com/license/LICENSE.                           |
15|                                                                 |
16+-----------------------------------------------------------------+
17| this file contains board specific definitions                   |
18\*===============================================================*/
19
20#ifndef __GEN83xx_BSP_h
21#define __GEN83xx_BSP_h
22
23#define BSP_FEATURE_IRQ_EXTENSION
24
25#include <bspopts.h>
26
27#include <libcpu/powerpc-utility.h>
28
29#include <bsp/hwreg_vals.h>
30
31/*
32 * Some symbols defined in the linker command file.
33 */
34
35LINKER_SYMBOL(bsp_ram_start);
36LINKER_SYMBOL(bsp_ram_end);
37LINKER_SYMBOL(bsp_ram_size);
38
39LINKER_SYMBOL(bsp_rom_start);
40LINKER_SYMBOL(bsp_rom_end);
41LINKER_SYMBOL(bsp_rom_size);
42
43LINKER_SYMBOL(bsp_section_text_start);
44LINKER_SYMBOL(bsp_section_text_end);
45LINKER_SYMBOL(bsp_section_text_size);
46
47LINKER_SYMBOL(bsp_section_data_start);
48LINKER_SYMBOL(bsp_section_data_end);
49LINKER_SYMBOL(bsp_section_data_size);
50
51LINKER_SYMBOL(bsp_section_bss_start);
52LINKER_SYMBOL(bsp_section_bss_end);
53LINKER_SYMBOL(bsp_section_bss_size);
54
55LINKER_SYMBOL(bsp_interrupt_stack_start);
56LINKER_SYMBOL(bsp_interrupt_stack_end);
57LINKER_SYMBOL(bsp_interrupt_stack_size);
58
59LINKER_SYMBOL(bsp_work_area_start);
60
61LINKER_SYMBOL(IMMRBAR);
62
63#ifndef ASM
64
65#ifdef __cplusplus
66extern "C" {
67#endif
68
69#include <rtems.h>
70#include <rtems/console.h>
71#include <rtems/clockdrv.h>
72#include <bsp/vectors.h>
73#include <bsp/irq.h>
74
75/*
76 * indicate, that BSP has no IDE driver
77 */
78#undef RTEMS_BSP_HAS_IDE_DRIVER
79
80/* misc macros */
81#define BSP_ARRAY_CNT(arr) (sizeof(arr)/sizeof(arr[0]))
82
83/* functions */
84
85rtems_status_code bsp_register_i2c(void);
86rtems_status_code bsp_register_spi(void);
87
88/*
89 * Network driver configuration
90 */
91struct rtems_bsdnet_ifconfig;
92extern int BSP_tsec_attach(struct rtems_bsdnet_ifconfig *config,int attaching);
93#define RTEMS_BSP_NETWORK_DRIVER_ATTACH BSP_tsec_attach
94
95#ifdef MPC8313ERDB
96  #define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec2"
97  #define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec1"
98#else
99  #define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec1"
100  #define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec2"
101#endif
102
103#if defined(MPC8349EAMDS)
104/*
105 * i2c EEPROM device name
106 */
107#define RTEMS_BSP_I2C_EEPROM_DEVICE_NAME "eeprom"
108#define RTEMS_BSP_I2C_EEPROM_DEVICE_PATH "/dev/i2c1.eeprom"
109
110/*
111 * SPI Flash device name
112 */
113#define RTEMS_BSP_SPI_FLASH_DEVICE_NAME "flash"
114#define RTEMS_BSP_SPI_FLASH_DEVICE_PATH "/dev/spi.flash"
115#endif /* defined(MPC8349EAMDS) */
116
117#if defined(HSC_CM01)
118/*
119 * i2c EEPROM device name
120 */
121#define RTEMS_BSP_I2C_EEPROM_DEVICE_NAME "eeprom"
122#define RTEMS_BSP_I2C_EEPROM_DEVICE_PATH "/dev/i2c1.eeprom"
123
124/*
125 * SPI FRAM device name
126 */
127#define RTEMS_BSP_SPI_FRAM_DEVICE_NAME "fram"
128#define RTEMS_BSP_SPI_FRAM_DEVICE_PATH "/dev/spi.fram"
129#endif /* defined(HSC_CM01) */
130
131extern unsigned int BSP_bus_frequency;
132
133extern uint32_t bsp_clicks_per_usec;
134
135/*
136 *  Convert decrementer value to tenths of microseconds (used by shared timer
137 *  driver).
138 */
139#define BSP_Convert_decrementer( _value ) \
140  ((int) (((_value) * 10) / bsp_clicks_per_usec))
141
142void mpc83xx_zero_4( void *dest, size_t n);
143
144void cpu_init( void);
145
146#ifdef __cplusplus
147}
148#endif
149
150#endif /* ASM */
151
152#endif /* GEN83xx */
Note: See TracBrowser for help on using the repository browser.