source: rtems/c/src/lib/libbsp/arm/csb337/console/uarts.c @ b759b04

4.104.114.84.95
Last change on this file since b759b04 was b759b04, checked in by Jay Monkman <jtm@…>, on Jul 15, 2004 at 6:16:16 AM

2004-07-15 Jay Monkman

  • .cvsignore, ChangeLog?, Makefile.am, README, bsp_specs, configure.ac, times, console/uarts.c, include/.cvsignore, include/bsp.h, include/tm27.h, network/.cvsignore, network/network.c, start/.cvsignore, start/start.S, startup/.cvsignore, startup/bspstart.c, startup/exit.c, startup/linkcmds, startup/memmap.c: New files.
  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*
2 *  Console driver for CSB337
3 *
4 *  This driver uses the shared console driver in
5 *  ...../libbsp/shared/console.c
6 *
7 *  Copyright (c) 2003 by Cogent Computer Systems
8 *  Written by Jay Monkman <jtm@lopingdog.com>
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *
13 *  http://www.OARcorp.com/rtems/license.html.
14 *
15 *  $Id$
16 */
17#include <bsp.h>
18#include <rtems/libio.h>
19#include <termios.h>
20#include <rtems/bspIo.h>
21
22#include <at91rm9200.h>
23#include <at91rm9200_dbgu.h>
24#include <libchip/serial.h>
25#include <libchip/sersupp.h>
26
27/* How many serial ports? */
28#define NUM_DEVS       1
29
30/* These are used by code in console.c */
31unsigned long Console_Port_Count = NUM_DEVS;
32console_data  Console_Port_Data[NUM_DEVS];
33
34/* rtems console uses the following minor number */
35rtems_device_minor_number  Console_Port_Minor = 0;
36extern console_fns dbgu_fns;
37
38/*
39 * There's one item in array for each UART.
40 *
41 * Some of these fields are marked "NOT USED". They are not used
42 * by console.c, but may be used by drivers in libchip
43 *
44 * when we add other types of UARTS we will need to move this
45 * structure to a generic uart.c file with only this in it
46 */
47console_tbl Console_Port_Tbl[] = {
48    {
49        "/dev/console",    /* sDeviceName */
50        SERIAL_CUSTOM,     /* deviceType */
51        &dbgu_fns,         /* pDeviceFns */
52        NULL,              /* deviceProbe */
53        NULL,              /* pDeviceFlow */
54        0,                 /* ulMargin - NOT USED */
55        0,                 /* ulHysteresis - NOT USED */
56        NULL,              /* pDeviceParams */
57        DBGU_BASE,         /* ulCtrlPort1  - Pointer to DBGU regs */
58        0,                 /* ulCtrlPort2  - NOT USED */
59        0,                 /* ulDataPort  - NOT USED */
60        NULL,              /* getRegister - NOT USED */
61        NULL,              /* setRegister - NOT USED */
62        NULL,              /* getData - NOT USED */
63        NULL,              /* setData - NOT USED */
64        0,                 /* ulClock - NOT USED */
65        0                  /* ulIntVector - NOT USED */
66    }};
67
68
69console_tbl *BSP_get_uart_from_minor(int minor)
70{
71    return &Console_Port_Tbl[minor];
72}
Note: See TracBrowser for help on using the repository browser.