diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-06-04 16:23:11 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-06-04 16:23:11 +0000 |
commit | 6e27be70e131b10e67b75ea033fccbd77c95cf6d (patch) | |
tree | f27a219383aa3cd5b9ad8ffdfdb9f0529c18027a /c/src/lib/libbsp/arm/gumstix/console | |
parent | 2009-06-04 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-6e27be70e131b10e67b75ea033fccbd77c95cf6d.tar.bz2 |
2009-06-04 Xi Yang <hiyangxi@gmail.com>
* .cvsignore, ChangeLog, Makefile.am, README, bsp_specs, configure.ac,
preinstall.am, console/uarts.c, include/bsp.h, include/bspopts.h.in,
include/tm27.h, start/start.S, startup/bspstart.c, startup/linkcmds,
startup/memmap.c: New files.
Diffstat (limited to 'c/src/lib/libbsp/arm/gumstix/console')
-rwxr-xr-x | c/src/lib/libbsp/arm/gumstix/console/uarts.c | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/gumstix/console/uarts.c b/c/src/lib/libbsp/arm/gumstix/console/uarts.c new file mode 100755 index 0000000000..2186aa53a0 --- /dev/null +++ b/c/src/lib/libbsp/arm/gumstix/console/uarts.c @@ -0,0 +1,71 @@ +/* + * Console driver for GUMSTIX by Yang Xi <hiyangxi@gmail.com> + * + * This driver uses the shared console driver in + * ...../libbsp/shared/console.c + * + * Copyright (c) 2003 by Cogent Computer Systems + * Written by Jay Monkman <jtm@lopingdog.com> + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include <bsp.h> +#include <rtems/libio.h> +#include <termios.h> +#include <rtems/bspIo.h> + +#include <pxa255.h> +#include <libchip/serial.h> +#include <libchip/sersupp.h> + +/* How many serial ports? */ +#define NUM_DEVS 1 + +/* These are used by code in console.c */ +unsigned long Console_Port_Count = NUM_DEVS; +console_data Console_Port_Data[NUM_DEVS]; + +/* rtems console uses the following minor number */ +rtems_device_minor_number Console_Port_Minor = 0; +extern console_fns ffuart_fns; + +/* + * There's one item in array for each UART. + * + * Some of these fields are marked "NOT USED". They are not used + * by console.c, but may be used by drivers in libchip + * + * when we add other types of UARTS we will need to move this + * structure to a generic uart.c file with only this in it + */ +console_tbl Console_Port_Tbl[] = { + { + "/dev/console", /* sDeviceName */ + SERIAL_CUSTOM, /* deviceType */ + &ffuart_fns, /* pDeviceFns */ + NULL, /* deviceProbe */ + NULL, /* pDeviceFlow */ + 0, /* ulMargin - NOT USED */ + 0, /* ulHysteresis - NOT USED */ + NULL, /* pDeviceParams */ + FFUART_BASE, /* ulCtrlPort1 - Pointer to DBGU regs */ + 0, /* ulCtrlPort2 - NOT USED */ + 0, /* ulDataPort - NOT USED */ + NULL, /* getRegister - NOT USED */ + NULL, /* setRegister - NOT USED */ + NULL, /* getData - NOT USED */ + NULL, /* setData - NOT USED */ + 0, /* ulClock - NOT USED */ + 0 /* ulIntVector - NOT USED */ + }}; + + +console_tbl *BSP_get_uart_from_minor(int minor) +{ + return &Console_Port_Tbl[minor]; +} |