source: rtems/c/src/lib/libbsp/arm/gumstix/console/uarts.c @ 32b8506

4.104.115
Last change on this file since 32b8506 was 32b8506, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/29/09 at 14:53:02

Whitespace removal.

  • Property mode set to 100755
File size: 2.2 KB
Line 
1/*
2 *  Console driver for GUMSTIX by Yang Xi <hiyangxi@gmail.com>
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 *  http://www.rtems.com/license/LICENSE.
13 *
14 *  $Id$
15 */
16
17#include <bsp.h>
18#include <rtems/libio.h>
19#include <termios.h>
20#include <rtems/bspIo.h>
21
22#include <pxa255.h>
23#include <libchip/serial.h>
24#include <libchip/sersupp.h>
25
26/* How many serial ports? */
27#define NUM_DEVS       1
28
29/* These are used by code in console.c */
30unsigned long Console_Port_Count = NUM_DEVS;
31console_data  Console_Port_Data[NUM_DEVS];
32
33/* rtems console uses the following minor number */
34rtems_device_minor_number  Console_Port_Minor = 0;
35extern console_fns ffuart_fns;
36
37/*
38 * There's one item in array for each UART.
39 *
40 * Some of these fields are marked "NOT USED". They are not used
41 * by console.c, but may be used by drivers in libchip
42 *
43 * when we add other types of UARTS we will need to move this
44 * structure to a generic uart.c file with only this in it
45 */
46console_tbl Console_Port_Tbl[] = {
47    {
48        "/dev/console",    /* sDeviceName */
49        SERIAL_CUSTOM,     /* deviceType */
50        &ffuart_fns,         /* pDeviceFns */
51        NULL,              /* deviceProbe */
52        NULL,              /* pDeviceFlow */
53        0,                 /* ulMargin - NOT USED */
54        0,                 /* ulHysteresis - NOT USED */
55        NULL,              /* pDeviceParams */
56        FFUART_BASE,         /* ulCtrlPort1  - Pointer to DBGU regs */
57        0,                 /* ulCtrlPort2  - NOT USED */
58        0,                 /* ulDataPort  - NOT USED */
59        NULL,              /* getRegister - NOT USED */
60        NULL,              /* setRegister - NOT USED */
61        NULL,              /* getData - NOT USED */
62        NULL,              /* setData - NOT USED */
63        0,                 /* ulClock - NOT USED */
64        0                  /* ulIntVector - NOT USED */
65    }};
66
67
68console_tbl *BSP_get_uart_from_minor(int minor)
69{
70    return &Console_Port_Tbl[minor];
71}
Note: See TracBrowser for help on using the repository browser.