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

4.115
Last change on this file since 7a752161 was 7a752161, checked in by Sebastian Huber <sebastian.huber@…>, on 09/26/11 at 10:08:29

2011-09-27 Sebastian Huber <sebastian.huber@…>

  • make/custom/mpc8309som.cfg, startup/linkcmds.mpc8309som: New file.
  • Makefile.am, preinstall.am: Reflect changes above.
  • configure.ac, console/console-config.c, include/bsp.h, include/hwreg_vals.h, include/irq.h, network/network.c, spi/spi_init.c, startup/cpuinit.c: Renamed various BSP options.
  • make/custom/gen83xx.inc, make/custom/hsc_cm01.cfg, make/custom/mpc8313erdb.cfg, make/custom/mpc8349eamds.cfg: Avoid special linkcmds.
  • Property mode set to 100644
File size: 4.1 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/*
21 *  $Id$
22 */
23
24#ifndef __GEN83xx_BSP_h
25#define __GEN83xx_BSP_h
26
27#define BSP_FEATURE_IRQ_EXTENSION
28
29#include <bspopts.h>
30
31#include <libcpu/powerpc-utility.h>
32
33#include <bsp/hwreg_vals.h>
34
35/*
36 * Some symbols defined in the linker command file.
37 */
38
39LINKER_SYMBOL(bsp_ram_start);
40LINKER_SYMBOL(bsp_ram_end);
41LINKER_SYMBOL(bsp_ram_size);
42
43LINKER_SYMBOL(bsp_rom_start);
44LINKER_SYMBOL(bsp_rom_end);
45LINKER_SYMBOL(bsp_rom_size);
46
47LINKER_SYMBOL(bsp_section_text_start);
48LINKER_SYMBOL(bsp_section_text_end);
49LINKER_SYMBOL(bsp_section_text_size);
50
51LINKER_SYMBOL(bsp_section_data_start);
52LINKER_SYMBOL(bsp_section_data_end);
53LINKER_SYMBOL(bsp_section_data_size);
54
55LINKER_SYMBOL(bsp_section_bss_start);
56LINKER_SYMBOL(bsp_section_bss_end);
57LINKER_SYMBOL(bsp_section_bss_size);
58
59LINKER_SYMBOL(bsp_interrupt_stack_start);
60LINKER_SYMBOL(bsp_interrupt_stack_end);
61LINKER_SYMBOL(bsp_interrupt_stack_size);
62
63LINKER_SYMBOL(bsp_work_area_start);
64
65LINKER_SYMBOL(IMMRBAR);
66
67#ifndef ASM
68
69#ifdef __cplusplus
70extern "C" {
71#endif
72
73#include <rtems.h>
74#include <rtems/console.h>
75#include <rtems/clockdrv.h>
76#include <bsp/vectors.h>
77#include <bsp/irq.h>
78
79/*
80 * indicate, that BSP has no IDE driver
81 */
82#undef RTEMS_BSP_HAS_IDE_DRIVER
83
84/* misc macros */
85#define BSP_ARRAY_CNT(arr) (sizeof(arr)/sizeof(arr[0]))
86
87/* functions */
88
89rtems_status_code bsp_register_i2c(void);
90rtems_status_code bsp_register_spi(void);
91
92/*
93 * Network driver configuration
94 */
95struct rtems_bsdnet_ifconfig;
96extern int BSP_tsec_attach(struct rtems_bsdnet_ifconfig *config,int attaching);
97#define RTEMS_BSP_NETWORK_DRIVER_ATTACH BSP_tsec_attach
98
99#ifdef MPC83XX_BOARD_MPC8313ERDB
100  #define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec2"
101  #define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec1"
102#else
103  #define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec1"
104  #define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec2"
105#endif
106
107#if defined(MPC83XX_BOARD_MPC8349EAMDS)
108/*
109 * i2c EEPROM device name
110 */
111#define RTEMS_BSP_I2C_EEPROM_DEVICE_NAME "eeprom"
112#define RTEMS_BSP_I2C_EEPROM_DEVICE_PATH "/dev/i2c1.eeprom"
113
114/*
115 * SPI Flash device name
116 */
117#define RTEMS_BSP_SPI_FLASH_DEVICE_NAME "flash"
118#define RTEMS_BSP_SPI_FLASH_DEVICE_PATH "/dev/spi.flash"
119#endif /* defined(MPC83XX_BOARD_MPC8349EAMDS) */
120
121#if defined(MPC83XX_BOARD_HSC_CM01)
122/*
123 * i2c EEPROM device name
124 */
125#define RTEMS_BSP_I2C_EEPROM_DEVICE_NAME "eeprom"
126#define RTEMS_BSP_I2C_EEPROM_DEVICE_PATH "/dev/i2c1.eeprom"
127
128/*
129 * SPI FRAM device name
130 */
131#define RTEMS_BSP_SPI_FRAM_DEVICE_NAME "fram"
132#define RTEMS_BSP_SPI_FRAM_DEVICE_PATH "/dev/spi.fram"
133#endif /* defined(MPC83XX_BOARD_HSC_CM01) */
134
135extern unsigned int BSP_bus_frequency;
136
137extern uint32_t bsp_clicks_per_usec;
138
139/*
140 *  Convert decrementer value to tenths of microseconds (used by shared timer
141 *  driver).
142 */
143#define BSP_Convert_decrementer( _value ) \
144  ((int) (((_value) * 10) / bsp_clicks_per_usec))
145
146void mpc83xx_zero_4( void *dest, size_t n);
147
148void cpu_init( void);
149
150#ifdef __cplusplus
151}
152#endif
153
154#endif /* ASM */
155
156#endif /* GEN83xx */
Note: See TracBrowser for help on using the repository browser.