source: rtems/c/src/lib/libbsp/powerpc/motorola_powerpc/include/bsp.h @ f9877d25

4.104.114.84.95
Last change on this file since f9877d25 was f9877d25, checked in by Joel Sherrill <joel.sherrill@…>, on 11/10/04 at 23:50:48

2004-11-10 Richard Campbell <richard.campbell@…>

  • Makefile.am, configure.ac, bootloader/Makefile.am, include/bsp.h, wrapup/Makefile.am: Add MVME2100 BSP and MPC8240 support. There was also a significant amount of spelling and whitespace cleanup.
  • README.MVME2100: New file.
  • Property mode set to 100644
File size: 3.9 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 * $Id$
11 */
12#ifndef LIBBSP_POWERPC_MOTOROLA_SHARED_BSP_H
13#define LIBBSP_POWERPC_MOTOROLA_SHARED_BSP_H
14
15#include <bspopts.h>
16
17#include <rtems.h>
18#include <rtems/console.h>
19#include <libcpu/io.h>
20#include <rtems/clockdrv.h>
21#include <bsp/vectors.h>
22
23/*
24 *  confdefs.h overrides for this BSP:
25 *   - termios serial ports (defaults to 1)
26 *   - Interrupt stack space is not minimum if defined.
27 */
28
29#if !defined(mvme2100)
30#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
31#endif
32
33#define CONFIGURE_INTERRUPT_STACK_MEMORY  (16 * 1024)
34
35/* fundamental addresses for BSP (CHRPxxx and PREPxxx are from libcpu/io.h) */
36#if defined(mvme2100)
37#define _IO_BASE                CHRP_ISA_IO_BASE
38#define _ISA_MEM_BASE           CHRP_ISA_MEM_BASE
39/* address of our ram on the PCI bus   */
40#define PCI_DRAM_OFFSET         CHRP_PCI_DRAM_OFFSET
41#define PCI_MEM_BASE            0x80000000
42#define PCI_MEM_BASE_ADJUSTMENT 0
43
44#else
45#define _IO_BASE                PREP_ISA_IO_BASE
46#define _ISA_MEM_BASE           PREP_ISA_MEM_BASE
47/* address of our ram on the PCI bus   */
48#define PCI_DRAM_OFFSET         PREP_PCI_DRAM_OFFSET
49/* offset of pci memory as seen from the CPU */
50#define PCI_MEM_BASE            PREP_ISA_MEM_BASE
51#define PCI_MEM_BASE_ADJUSTMENT PREP_ISA_MEM_BASE
52#endif
53
54
55/*
56 *  Base address definitions for several devices
57 *
58 *  MVME2100 is very similar but has fewer devices and uses on-CPU EPIC
59 *  implementation of OpenPIC controller.  It also cannot be probed to
60 *  find out what it is which is VERY different from other Motorola boards.
61 */
62
63#if defined(mvme2100)
64#define BSP_UART_IOBASE_COM1 ((_IO_BASE)+0x01e10000)
65/* #define BSP_UART_IOBASE_COM1     (0xffe10000) */
66#define BSP_OPEN_PIC_BASE_OFFSET 0x40000
67
68#define MVME_HAS_DEC21140
69#else
70#define BSP_UART_IOBASE_COM1 ((_IO_BASE)+0x3f8)
71#define BSP_UART_IOBASE_COM2 ((_IO_BASE)+0x2f8)
72
73#define BSP_KBD_IOBASE       ((_IO_BASE)+0x60)
74#define BSP_VGA_IOBASE       ((_IO_BASE)+0x3c0)
75
76#if defined(mvme2300)
77#define MVME_HAS_DEC21140
78#endif
79#endif
80
81#define BSP_CONSOLE_PORT        BSP_UART_COM1
82#define BSP_UART_BAUD_BASE      115200
83
84#include <bsp/openpic.h>
85#define BSP_PIC_DO_EOI openpic_eoi(0)
86
87#ifndef ASM
88#define outport_byte(port,value) outb(value,port)
89#define outport_word(port,value) outw(value,port)
90#define outport_long(port,value) outl(value,port)
91
92#define inport_byte(port,value) (value = inb(port))
93#define inport_word(port,value) (value = inw(port))
94#define inport_long(port,value) (value = inl(port))
95
96/*
97 * Vital Board data Start using DATA RESIDUAL
98 */
99
100/*
101 * Total memory using RESIDUAL DATA
102 */
103extern unsigned int BSP_mem_size;
104/*
105 * PCI Bus Frequency
106 */
107extern unsigned int BSP_bus_frequency;
108/*
109 * processor clock frequency
110 */
111extern unsigned int BSP_processor_frequency;
112/*
113 * Time base divisior (how many tick for 1 second).
114 */
115extern unsigned int BSP_time_base_divisor;
116
117#define BSP_Convert_decrementer( _value ) \
118  ((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
119
120extern rtems_configuration_table  BSP_Configuration;
121extern void BSP_panic(char *s);
122extern void rtemsReboot(void);
123/* extern int printk(const char *, ...) __attribute__((format(printf, 1, 2))); */
124extern int BSP_disconnect_clock_handler (void);
125extern int BSP_connect_clock_handler (void);
126
127/* clear hostbridge errors
128 *
129 * enableMCP: whether to enable MCP checkstop / machine check interrupts
130 *            on the hostbridge and in HID0.
131 *
132 *            NOTE: HID0 and MEREN are left alone if this flag is 0
133 *
134 * quiet    : be silent
135 *
136 * RETURNS  : raven MERST register contents (lowermost 16 bits), 0 if
137 *            there were no errors
138 */
139extern unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet);
140
141#endif
142
143#endif
Note: See TracBrowser for help on using the repository browser.