source: rtems/c/src/lib/libbsp/mips/genmongoosev/console/conscfg.c @ ef380d3f

4.104.114.84.95
Last change on this file since ef380d3f was ef380d3f, checked in by Joel Sherrill <joel.sherrill@…>, on 03/14/01 at 17:24:09

2001-03-14 Joel Sherrill <joel@…>

  • clock/clockdrv.c, console/conscfg.c, include/bsp.h, start/start.S, startup/bspstart.c, timer/timer.c: Comments corrected.
  • Property mode set to 100644
File size: 2.3 KB
Line 
1/*
2 *  This file contains the libchip configuration information
3 *  to instantiate the libchip driver for the on-CPU DUART
4 *  and any other serial ports in the system.
5 *
6 *  COPYRIGHT (c) 1989-2001.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16#include <bsp.h>
17 
18#include <libchip/serial.h>
19#include <libchip/mg5uart.h>
20
21#if (CONSOLE_USE_INTERRUPTS)
22#define MG5UART_FUNCTIONS &mg5uart_fns
23#else
24#define MG5UART_FUNCTIONS &mg5uart_fns_polled
25#endif
26
27extern int ClockRate;
28#define CLOCK_RATE (unsigned32) &ClockRate
29
30console_tbl     Console_Port_Tbl[] = {
31{
32  "/dev/com0",                            /* sDeviceName */
33   SERIAL_MG5UART,                         /* deviceType */
34   MG5UART_FUNCTIONS,                      /* pDeviceFns */
35   NULL,                                   /* deviceProbe, assume it is there */
36   NULL,                                   /* pDeviceFlow */
37   16,                                     /* ulMargin */
38   8,                                      /* ulHysteresis */
39   (void *) NULL,               /* NULL */ /* pDeviceParams */
40   MONGOOSEV_PERIPHERAL_COMMAND_REGISTER,  /* ulCtrlPort1 */
41   MONGOOSEV_UART0_BASE,                   /* ulCtrlPort2 */
42   MG5UART_UART0,                          /* ulDataPort */
43   NULL,                                   /* getRegister */
44   NULL,                                   /* setRegister */
45   NULL, /* unused */                      /* getData */
46   NULL, /* unused */                      /* setData */
47   CLOCK_RATE,                             /* ulClock */
48   MONGOOSEV_IRQ_UART0_RX_FRAME_ERROR      /* ulIntVector -- base for port */
49}
50};
51
52/*
53 *  Declare some information used by the console driver
54 */
55
56#define NUM_CONSOLE_PORTS (sizeof(Console_Port_Tbl)/sizeof(console_tbl))
57
58unsigned long  Console_Port_Count = NUM_CONSOLE_PORTS;
59
60console_data  Console_Port_Data[NUM_CONSOLE_PORTS];
61
62rtems_device_minor_number  Console_Port_Minor;
63
64
65/*
66 *  printk() support that simply routes printk to stderr
67 */
68
69#include <bspIo.h>
70
71void GENMG5_output_char(char c) { write( 2, &c, 1 ); }
72 
73BSP_output_char_function_type           BSP_output_char = GENMG5_output_char;
74BSP_polling_getchar_function_type       BSP_poll_char = NULL;
75   
76
Note: See TracBrowser for help on using the repository browser.