Ignore:
Timestamp:
Jul 17, 2009, 1:53:04 PM (11 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, 5, master
Children:
ec5d4505
Parents:
9832a22
Message:

ARM bsp maintenance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/lpc24xx/console/console-config.c

    r9832a22 r7ae2775  
    2626#include <bsp/irq.h>
    2727
    28 #define LPC24XX_UART_NUMBER 1
    29 
    3028static uint8_t lpc24xx_uart_register( uint32_t addr, uint8_t i)
    3129{
     
    4240}
    4341
     42rtems_device_minor_number Console_Port_Minor = 0;
     43
     44console_tbl Console_Port_Tbl [] = {
     45  #ifdef LPC24XX_CONFIG_CONSOLE
     46    {
     47      .sDeviceName = "/dev/ttyS0",
     48      .deviceType = SERIAL_NS16550,
     49      .pDeviceFns = &ns16550_fns,
     50      .deviceProbe = NULL,
     51      .pDeviceFlow = NULL,
     52      .ulMargin = 16,
     53      .ulHysteresis = 8,
     54      .pDeviceParams = (void *) LPC24XX_UART_BAUD,
     55      .ulCtrlPort1 = UART0_BASE_ADDR,
     56      .ulCtrlPort2 = 0,
     57      .ulDataPort = UART0_BASE_ADDR,
     58      .getRegister = lpc24xx_uart_register,
     59      .setRegister = lpc24xx_uart_set_register,
     60      .getData = NULL,
     61      .setData = NULL,
     62      .ulClock = LPC24XX_CCLK,
     63      .ulIntVector = LPC24XX_IRQ_UART_0
     64    },
     65  #endif
     66  #ifdef LPC24XX_CONFIG_UART_1
     67    {
     68      .sDeviceName = "/dev/ttyS1",
     69      .deviceType = SERIAL_NS16550,
     70      .pDeviceFns = &ns16550_fns,
     71      .deviceProbe = NULL,
     72      .pDeviceFlow = NULL,
     73      .ulMargin = 16,
     74      .ulHysteresis = 8,
     75      .pDeviceParams = (void *) LPC24XX_UART_BAUD,
     76      .ulCtrlPort1 = UART1_BASE_ADDR,
     77      .ulCtrlPort2 = 0,
     78      .ulDataPort = UART1_BASE_ADDR,
     79      .getRegister = lpc24xx_uart_register,
     80      .setRegister = lpc24xx_uart_set_register,
     81      .getData = NULL,
     82      .setData = NULL,
     83      .ulClock = LPC24XX_CCLK,
     84      .ulIntVector = LPC24XX_IRQ_UART_1
     85    },
     86  #endif
     87  #ifdef LPC24XX_CONFIG_UART_2
     88    {
     89      .sDeviceName = "/dev/ttyS2",
     90      .deviceType = SERIAL_NS16550,
     91      .pDeviceFns = &ns16550_fns,
     92      .deviceProbe = NULL,
     93      .pDeviceFlow = NULL,
     94      .ulMargin = 16,
     95      .ulHysteresis = 8,
     96      .pDeviceParams = (void *) LPC24XX_UART_BAUD,
     97      .ulCtrlPort1 = UART2_BASE_ADDR,
     98      .ulCtrlPort2 = 0,
     99      .ulDataPort = UART2_BASE_ADDR,
     100      .getRegister = lpc24xx_uart_register,
     101      .setRegister = lpc24xx_uart_set_register,
     102      .getData = NULL,
     103      .setData = NULL,
     104      .ulClock = LPC24XX_CCLK,
     105      .ulIntVector = LPC24XX_IRQ_UART_2
     106    },
     107  #endif
     108  #ifdef LPC24XX_CONFIG_UART_3
     109    {
     110      .sDeviceName = "/dev/ttyS3",
     111      .deviceType = SERIAL_NS16550,
     112      .pDeviceFns = &ns16550_fns,
     113      .deviceProbe = NULL,
     114      .pDeviceFlow = NULL,
     115      .ulMargin = 16,
     116      .ulHysteresis = 8,
     117      .pDeviceParams = (void *) LPC24XX_UART_BAUD,
     118      .ulCtrlPort1 = UART3_BASE_ADDR,
     119      .ulCtrlPort2 = 0,
     120      .ulDataPort = UART3_BASE_ADDR,
     121      .getRegister = lpc24xx_uart_register,
     122      .setRegister = lpc24xx_uart_set_register,
     123      .getData = NULL,
     124      .setData = NULL,
     125      .ulClock = LPC24XX_CCLK,
     126      .ulIntVector = LPC24XX_IRQ_UART_3
     127    },
     128  #endif
     129};
     130
     131#define LPC24XX_UART_NUMBER \
     132  (sizeof( Console_Port_Tbl) / sizeof( Console_Port_Tbl [0]))
     133
    44134unsigned long Console_Port_Count = LPC24XX_UART_NUMBER;
    45135
    46 rtems_device_minor_number  Console_Port_Minor = 0;
    47 
    48 console_data  Console_Port_Data [LPC24XX_UART_NUMBER];
    49 
    50 console_tbl Console_Port_Tbl [LPC24XX_UART_NUMBER] = {
    51   {
    52     .sDeviceName = "/dev/ttyS0",
    53     .deviceType = SERIAL_NS16550,
    54     .pDeviceFns = &ns16550_fns,
    55     .deviceProbe = NULL,
    56     .pDeviceFlow = NULL,
    57     .ulMargin = 16,
    58     .ulHysteresis = 8,
    59     .pDeviceParams = (void *) LPC24XX_UART_BAUD,
    60     .ulCtrlPort1 = UART0_BASE_ADDR,
    61     .ulCtrlPort2 = 0,
    62     .ulDataPort = UART0_BASE_ADDR,
    63     .getRegister = lpc24xx_uart_register,
    64     .setRegister = lpc24xx_uart_set_register,
    65     .getData = NULL,
    66     .setData = NULL,
    67     .ulClock = LPC24XX_CCLK,
    68     .ulIntVector = LPC24XX_IRQ_UART_0
    69   }
    70 };
     136console_data Console_Port_Data [LPC24XX_UART_NUMBER];
Note: See TracChangeset for help on using the changeset viewer.