source: rtems/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h @ dbffeac

Last change on this file since dbffeac was dbffeac, checked in by Till Straumann <strauman@…>, on 01/30/07 at 06:50:00
  • Makefile.am, preinstall.am, include/bsp.h,
  • vme/vmeconfig.c (removed), vme/VME.h (removed): cleaned up vme support - use files from libbsp/powerpc/shared/vme and define BSP specifica in VMEConfig.h. Use VME DMA support implemented by vmeUniverse and libbsp/powerpc/shared/vme/vme_universe_dma.c
  • Property mode set to 100644
File size: 3.4 KB
Line 
1/*
2 *  bsp.h  -- contain BSP API definition.
3 *
4 *  Copyright (C) 1999 Eric Valette. valette@crf.canon.fr
5 *
6 *  The license and distribution terms for this file may be
7 *  found in found in the file LICENSE in this distribution or at
8 *  http://www.rtems.com/license/LICENSE.
9 *
10 *  S. Kate Feng 12/03 : Modified it to support the MVME5500 board.
11 *
12 */
13
14#ifndef _BSP_H
15#define _BSP_H
16
17#include <bspopts.h>
18
19#include <rtems.h>
20#include <rtems/console.h>
21#include <rtems/clockdrv.h>
22#include <libcpu/io.h>
23#include <bsp/vectors.h>
24
25#include <bsp/bspMvme5500.h>
26
27/* fundamental addresses for this BSP (PREPxxx are from libcpu/io.h) */
28#define _IO_BASE GT64260_REG_BASE
29
30/* PCI0 Domain I/O space */
31#define PCI0_IO_BASE            0xf0000000
32#define PCI1_IO_BASE            0xf0800000
33
34/* PCI 0 memory space as seen from the CPU */
35#define PCI0_MEM_BASE           0x80000000
36#define PCI_MEM_BASE            0  /* glue for vmeUniverse */
37#define PCI_MEM_BASE_ADJUSTMENT        0
38
39/* address of our ram on the PCI bus */
40#define PCI_DRAM_OFFSET         0
41
42/* PCI 1 memory space as seen from the CPU */
43#define PCI1_MEM_BASE           0xe0000000
44#define PCI1_MEM_SIZE           0x10000000
45
46/* Needed for hot adding via PMCspan on the PCI0 local bus.
47 * This is board dependent, only because mvme5500
48 * supports hot adding and has more than one local PCI
49 * bus.
50 */
51#define BSP_MAX_PCI_BUS_ON_PCI0 8
52#define BSP_MAX_PCI_BUS_ON_PCI1 2
53#define BSP_MAX_PCI_BUS  (BSP_MAX_PCI_BUS_ON_PCI0+BSP_MAX_PCI_BUS_ON_PCI1)
54
55
56#if 0
57/* T.S, 2007/1: in order to let the universe acknowledge the interrupt
58 * (this allows for VME software priorities) corresponding support
59 * **MUST** be present in the interrupt controller driver
60 * Unless that's implemented DO NOT define BSP_PIC_DO_EOI.
61 */
62#define BSP_PIC_DO_EOI  inl(0xc34)  /* PCI IACK */
63#endif
64#define BSP_PCI_IRQ0 BSP_GPP_IRQ_LOWEST_OFFSET
65
66/*
67 *  confdefs.h overrides for this BSP:
68 *   - termios serial ports (defaults to 1)
69 *   - Interrupt stack space is not minimum if defined.
70 */
71
72#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
73#define CONFIGURE_INTERRUPT_STACK_MEMORY  (16 * 1024)
74
75/* uart.c uses out_8 instead of outb  */
76#define BSP_UART_IOBASE_COM1    GT64260_DEV1_BASE + 0x20000
77#define BSP_UART_IOBASE_COM2    GT64260_DEV1_BASE + 0x21000
78
79#define BSP_CONSOLE_PORT                BSP_UART_COM1  /* console */
80#define BSP_UART_BAUD_BASE              115200
81
82/*
83 * Vital Board data Start using DATA RESIDUAL
84 */
85/*
86 * Total memory using RESIDUAL DATA
87 */
88extern unsigned int BSP_mem_size;
89/*
90 * PCI Bus Frequency
91 */
92extern unsigned int BSP_bus_frequency;
93/*
94 * processor clock frequency
95 */
96extern unsigned int BSP_processor_frequency;
97/*
98 * Time base divisior (how many tick for 1 second).
99 */
100extern unsigned int BSP_time_base_divisor;
101
102#define BSP_Convert_decrementer( _value ) \
103  ((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
104
105extern rtems_configuration_table  BSP_Configuration;
106extern void BSP_panic(char *s);
107extern void rtemsReboot(void);
108/* extern int printk(const char *, ...) __attribute__((format(printf, 1, 2))); */
109extern int BSP_disconnect_clock_handler (void);
110extern int BSP_connect_clock_handler (void);
111
112extern unsigned long _BSP_clear_hostbridge_errors();
113
114#define RTEMS_BSP_NETWORK_DRIVER_NAME   "gt1"
115#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_GT64260eth_driver_attach
116
117extern int
118RTEMS_BSP_NETWORK_DRIVER_ATTACH(/* struct rtems_bsdnet_ifconfig * */);
119
120
121#endif
Note: See TracBrowser for help on using the repository browser.