Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:22:49

0001 /*
0002  *  Console driver for GUMSTIX by Yang Xi <hiyangxi@gmail.com>
0003  *
0004  *  This driver uses the shared console driver in
0005  *  ...../libbsp/shared/console.c
0006  *
0007  *  Copyright (c) 2003 by Cogent Computer Systems
0008  *  Written by Jay Monkman <jtm@lopingdog.com>
0009  *
0010  *  The license and distribution terms for this file may be
0011  *  found in the file LICENSE in this distribution or at
0012  *  http://www.rtems.org/license/LICENSE.
0013  */
0014 
0015 #include <bsp.h>
0016 #include <rtems/libio.h>
0017 #include <termios.h>
0018 #include <rtems/bspIo.h>
0019 
0020 #include <pxa255.h>
0021 #include <libchip/serial.h>
0022 #include <libchip/sersupp.h>
0023 
0024 /* How many serial ports? */
0025 #define NUM_DEVS       1
0026 
0027 /* These are used by code in console.c */
0028 unsigned long Console_Configuration_Count = NUM_DEVS;
0029 
0030 extern const console_fns ffuart_fns;
0031 
0032 /*
0033  * There's one item in array for each UART.
0034  *
0035  * Some of these fields are marked "NOT USED". They are not used
0036  * by console.c, but may be used by drivers in libchip
0037  *
0038  * when we add other types of UARTS we will need to move this
0039  * structure to a generic uart.c file with only this in it
0040  */
0041 console_tbl Console_Configuration_Ports[] = {
0042     {
0043         "/dev/com0",       /* sDeviceName */
0044         SERIAL_CUSTOM,     /* deviceType */
0045         &ffuart_fns,       /* pDeviceFns */
0046         NULL,              /* deviceProbe */
0047         NULL,              /* pDeviceFlow */
0048         0,                 /* ulMargin - NOT USED */
0049         0,                 /* ulHysteresis - NOT USED */
0050         NULL,              /* pDeviceParams */
0051         FFUART_BASE,       /* ulCtrlPort1  - Pointer to DBGU regs */
0052         0,                 /* ulCtrlPort2  - NOT USED */
0053         0,                 /* ulDataPort  - NOT USED */
0054         NULL,              /* getRegister - NOT USED */
0055         NULL,              /* setRegister - NOT USED */
0056         NULL,              /* getData - NOT USED */
0057         NULL,              /* setData - NOT USED */
0058         0,                 /* ulClock - NOT USED */
0059         0                  /* ulIntVector - NOT USED */
0060     }};
0061 
0062 
0063 console_tbl *BSP_get_uart_from_minor(int minor)
0064 {
0065     return Console_Port_Tbl[minor];
0066 }