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

4.104.114.84.95
Last change on this file since 3299388d was e00bf285, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:52:11

2003-09-04 Joel Sherrill <joel@…>

  • clock/clockdrv.c, console/conscfg.c, include/bsp.h, startup/bspstart.c, startup/gdb-support.c, timer/timer.c: URL for license changed.
  • Property mode set to 100644
File size: 3.4 KB
RevLine 
[f849f3e]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
[e00bf285]11 *  http://www.rtems.com/license/LICENSE.
[f849f3e]12 *
13 *  $Id$
14 */
15
16#include <bsp.h>
17 
18#include <libchip/serial.h>
19#include <libchip/mg5uart.h>
20
[a355e3ea]21/* #define CONSOLE_USE_INTERRUPTS */
22
23#ifdef CONSOLE_USE_INTERRUPTS
[f849f3e]24#define MG5UART_FUNCTIONS &mg5uart_fns
25#else
26#define MG5UART_FUNCTIONS &mg5uart_fns_polled
27#endif
28
29
30console_tbl     Console_Port_Tbl[] = {
31{
[a9d8649]32  "/dev/com0",                             /* sDeviceName */
[f849f3e]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 */
[a9d8649]49},
50{
51  "/dev/com1",                             /* sDeviceName */
52   SERIAL_MG5UART,                         /* deviceType */
53   MG5UART_FUNCTIONS,                      /* pDeviceFns */
54   NULL,                                   /* deviceProbe, assume it is there */
55   NULL,                                   /* pDeviceFlow */
56   16,                                     /* ulMargin */
57   8,                                      /* ulHysteresis */
58   (void *) NULL,               /* NULL */ /* pDeviceParams */
59   MONGOOSEV_PERIPHERAL_COMMAND_REGISTER,  /* ulCtrlPort1 */
60   MONGOOSEV_UART1_BASE,                   /* ulCtrlPort2 */
61   MG5UART_UART1,                          /* ulDataPort */
62   NULL,                                   /* getRegister */
63   NULL,                                   /* setRegister */
64   NULL, /* unused */                      /* getData */
65   NULL, /* unused */                      /* setData */
66   CLOCK_RATE,                             /* ulClock */
67   MONGOOSEV_IRQ_UART1_RX_FRAME_ERROR      /* ulIntVector -- base for port */
68},
[f849f3e]69};
70
71/*
72 *  Declare some information used by the console driver
73 */
74
75#define NUM_CONSOLE_PORTS (sizeof(Console_Port_Tbl)/sizeof(console_tbl))
76
77unsigned long  Console_Port_Count = NUM_CONSOLE_PORTS;
78
79console_data  Console_Port_Data[NUM_CONSOLE_PORTS];
80
81rtems_device_minor_number  Console_Port_Minor;
82
83
84/*
85 *  printk() support that simply routes printk to stderr
86 */
87
[eb24fb1]88#include <rtems/bspIo.h>
[f849f3e]89
90void GENMG5_output_char(char c) { write( 2, &c, 1 ); }
91 
92BSP_output_char_function_type           BSP_output_char = GENMG5_output_char;
93BSP_polling_getchar_function_type       BSP_poll_char = NULL;
Note: See TracBrowser for help on using the repository browser.