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

4.115
Last change on this file since 8a54204 was 8a54204, checked in by Sebastian Huber <sebastian.huber@…>, on 11/12/10 at 14:16:57

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

  • console/console.h, console/console.c, console/config.c, console/ns16550cfg.c: Removed files.
  • console/console-config.c: New file.
  • Makefile.am: Reflect changes above.
  • configure.ac: New BSP options.
  • include/bsp.h: Use new BSP options.
  • network/network.c: Avoid memory leak.
  • startup/bspstart.c: Initialize console port table.
  • spi/spi_init.c: Update for SD card API changes.
  • Property mode set to 100644
File size: 4.2 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#ifdef HAS_UBOOT
76  #ifdef MPC8313ERDB
77    #define CONFIG_MPC83XX
78    #define CONFIG_HAS_ETH1
79  #endif
80
81  #include <bsp/u-boot.h>
82
83  extern bd_t bsp_uboot_board_info;
84  extern const size_t bsp_uboot_board_info_size;
85#endif
86
87/*
88 * indicate, that BSP has no IDE driver
89 */
90#undef RTEMS_BSP_HAS_IDE_DRIVER
91
92/* misc macros */
93#define BSP_ARRAY_CNT(arr) (sizeof(arr)/sizeof(arr[0]))
94
95/* functions */
96
97rtems_status_code bsp_register_i2c(void);
98rtems_status_code bsp_register_spi(void);
99
100/*
101 * Network driver configuration
102 */
103struct rtems_bsdnet_ifconfig;
104extern int BSP_tsec_attach(struct rtems_bsdnet_ifconfig *config,int attaching);
105#define RTEMS_BSP_NETWORK_DRIVER_ATTACH BSP_tsec_attach
106
107#ifdef MPC8313ERDB
108  #define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec2"
109  #define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec1"
110#else
111  #define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec1"
112  #define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec2"
113#endif
114
115#if defined(MPC8349EAMDS)
116/*
117 * i2c EEPROM device name
118 */
119#define RTEMS_BSP_I2C_EEPROM_DEVICE_NAME "eeprom"
120#define RTEMS_BSP_I2C_EEPROM_DEVICE_PATH "/dev/i2c1.eeprom"
121
122/*
123 * SPI Flash device name
124 */
125#define RTEMS_BSP_SPI_FLASH_DEVICE_NAME "flash"
126#define RTEMS_BSP_SPI_FLASH_DEVICE_PATH "/dev/spi.flash"
127#endif /* defined(MPC8349EAMDS) */
128
129#if defined(HSC_CM01)
130/*
131 * i2c EEPROM device name
132 */
133#define RTEMS_BSP_I2C_EEPROM_DEVICE_NAME "eeprom"
134#define RTEMS_BSP_I2C_EEPROM_DEVICE_PATH "/dev/i2c1.eeprom"
135
136/*
137 * SPI FRAM device name
138 */
139#define RTEMS_BSP_SPI_FRAM_DEVICE_NAME "fram"
140#define RTEMS_BSP_SPI_FRAM_DEVICE_PATH "/dev/spi.fram"
141#endif /* defined(HSC_CM01) */
142
143extern unsigned int BSP_bus_frequency;
144
145extern uint32_t bsp_clicks_per_usec;
146
147/*
148 *  Convert decrementer value to tenths of microseconds (used by shared timer
149 *  driver).
150 */
151#define BSP_Convert_decrementer( _value ) \
152  ((int) (((_value) * 10) / bsp_clicks_per_usec))
153
154void mpc83xx_zero_4( void *dest, size_t n);
155
156void cpu_init( void);
157
158#ifdef __cplusplus
159}
160#endif
161
162#endif /* ASM */
163
164#endif /* GEN83xx */
Note: See TracBrowser for help on using the repository browser.