summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/shared/comm
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-12-23 18:18:56 +1100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-25 08:45:26 +0100
commit2afb22b7e1ebcbe40373ff7e0efae7d207c655a9 (patch)
tree44759efe9374f13200a97e96d91bd9a2b7e5ce2a /c/src/lib/libbsp/i386/shared/comm
parentMAINTAINERS: Add myself to Write After Approval. (diff)
downloadrtems-2afb22b7e1ebcbe40373ff7e0efae7d207c655a9.tar.bz2
Remove make preinstall
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
Diffstat (limited to 'c/src/lib/libbsp/i386/shared/comm')
-rw-r--r--c/src/lib/libbsp/i386/shared/comm/i386_io.h73
-rw-r--r--c/src/lib/libbsp/i386/shared/comm/tty_drv.h104
-rw-r--r--c/src/lib/libbsp/i386/shared/comm/uart.h191
3 files changed, 0 insertions, 368 deletions
diff --git a/c/src/lib/libbsp/i386/shared/comm/i386_io.h b/c/src/lib/libbsp/i386/shared/comm/i386_io.h
deleted file mode 100644
index 1308d58b6b..0000000000
--- a/c/src/lib/libbsp/i386/shared/comm/i386_io.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * @file
- * @ingroup i386_io
- * @brief I/O
- */
-
-/*
- * Copyright (c) 2000 - Rosimildo da Silva. All Rights Reserved.
- *
- * MODULE DESCRIPTION:
- *
- * IO Functions for the PC platform equivalent to DOS/Linux. They make
- * eaiser the porting of code from these platforms.
- *
- * by: Rosimildo da Silva: rdasilva@connecttel.com
- *
- */
-
-/**
- * @defgroup i386_io I/O
- * @ingroup i386_comm
- * @brief I/O
- * @{
- */
-
-#ifndef i386_io_h__
-#define i386_io_h__
-
-#define rtems_inb(port) \
-({ \
- register int _inb_result; \
- \
- __asm__ volatile ("xorl %%eax,%%eax; inb %%dx,%%al" : \
- "=a" (_inb_result) : "d" (port)); \
- _inb_result; \
-})
-
-#define rtems_inw(port) \
-({ \
- register int _inbw_result; \
- \
- __asm__ volatile ("xorl %%eax,%%eax; inw %%dx,%%ax" : \
- "=a" (_inbw_result) : "d" (port)); \
- _inbw_result; \
-})
-
-#define rtems_outb(port, data) \
- __asm__ volatile ("outb %%al,%%dx" : : "a" (data), "d" (port))
-
-#define rtems_outw(port, data) \
- __asm__ volatile ("outw %%ax,%%dx" : : "a" (data), "d" (port))
-
-#define outp(port, val) rtems_outb(port,val)
-#define inp(port) rtems_inb(port)
-
-#define outb(val, port) rtems_outb(port,val)
-#define inb(port) rtems_inb(port)
-
-#define outb_p(val, port) rtems_outb(port,val)
-#define inb_p(port) rtems_inb(port)
-
-#define outportb(port,val) rtems_outb(port,val)
-#define inportb(port) rtems_inb(port)
-
-#define outw(val, port) rtems_outw(port,val)
-#define inw(port) rtems_inw(port)
-
-#define cli() __asm__ __volatile__("cli")
-#define sti() __asm__ __volatile__("sti");
-
-#endif /* i386_io_h__ */
-
-/** @} */
diff --git a/c/src/lib/libbsp/i386/shared/comm/tty_drv.h b/c/src/lib/libbsp/i386/shared/comm/tty_drv.h
deleted file mode 100644
index cbfb346f22..0000000000
--- a/c/src/lib/libbsp/i386/shared/comm/tty_drv.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * @file
- * @ingroup i386_tty
- * @brief ttySx driver
- */
-
-#ifndef __tty_drv__
-#define __tty_drv__
-/***************************************************************************
- *
- * Copyright (c) 1999 ConnectTel, Inc. All Rights Reserved.
- *
- * MODULE DESCRIPTION: Prototype routines for the ttySx driver.
- *
- * by: Rosimildo da Silva:
- * rdasilva@connecttel.com
- * http://www.connecttel.com
- *
- ****************************************************************************/
-
-/**
- * @defgroup i386_tty ttSx
- * @ingroup i386_comm
- * @brief i386 tySx driver
- * @{
- */
-
-/* functions */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** @brief ttyS1 entry points */
-rtems_device_driver tty1_initialize(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver tty1_open(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver tty1_control(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-/** @brief tty1 & tty2 shared entry points */
-rtems_device_driver tty_close(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver tty_read(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver tty_write(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-/** @brief tty2 entry points */
-rtems_device_driver tty2_initialize(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver tty2_open(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver tty2_control(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-#define TTY1_DRIVER_TABLE_ENTRY \
- { tty1_initialize, tty1_open, tty_close, \
- tty_read, tty_write, tty1_control }
-
-#define TTY2_DRIVER_TABLE_ENTRY \
- { tty2_initialize, tty2_open, tty_close, \
- tty_read, tty_write, tty2_control }
-
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __tty_drv__ */
diff --git a/c/src/lib/libbsp/i386/shared/comm/uart.h b/c/src/lib/libbsp/i386/shared/comm/uart.h
deleted file mode 100644
index 96e4a312b4..0000000000
--- a/c/src/lib/libbsp/i386/shared/comm/uart.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/**
- * @file
- * @ingroup i386_uart
- * @brief i386 UART definitions
- */
-
-/*
- * This software is Copyright (C) 1998 by T.sqware - all rights limited
- * It is provided in to the public domain "as is", can be freely modified
- * as far as this copyight notice is kept unchanged, but does not imply
- * an endorsement by T.sqware of the product in which it is included.
- */
-
-/**
- * @defgroup i386_uart UART
- * @ingroup i386_comm
- * @brief i386 UART definitions
- * @{
- */
-
-#ifndef _BSPUART_H
-#define _BSPUART_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void BSP_uart_init(int uart, unsigned long baud, unsigned long databits, unsigned long parity, unsigned long stopbits, int hwFlow);
-void BSP_uart_set_attributes(int uart, unsigned long baud, unsigned long databits, unsigned long parity, unsigned long stopbits);
-void BSP_uart_set_baud(int uart, unsigned long baud);
-void BSP_uart_intr_ctrl(int uart, int cmd);
-void BSP_uart_throttle(int uart);
-void BSP_uart_unthrottle(int uart);
-int BSP_uart_polled_status(int uart);
-void BSP_uart_polled_write(int uart, int val);
-int BSP_uart_polled_read(int uart);
-void BSP_uart_termios_set(int uart, void *ttyp);
-int BSP_uart_termios_read_com1(int uart);
-int BSP_uart_termios_read_com2(int uart);
-ssize_t BSP_uart_termios_write_com1(int minor, const char *buf, size_t len);
-ssize_t BSP_uart_termios_write_com2(int minor, const char *buf, size_t len);
-void BSP_uart_termios_isr_com1(void *);
-void BSP_uart_termios_isr_com2(void *);
-void BSP_uart_dbgisr_com1(void);
-void BSP_uart_dbgisr_com2(void);
-extern int BSP_poll_char_via_serial(void);
-extern void BSP_output_char_via_serial(char val);
-extern int BSPConsolePort;
-extern int BSPBaseBaud;
-
-/** @brief
- * Command values for BSP_uart_intr_ctrl(),
- * values are strange in order to catch errors
- * with assert
- */
-#define BSP_UART_INTR_CTRL_DISABLE (0)
-#define BSP_UART_INTR_CTRL_GDB (0xaa) ///< RX only
-#define BSP_UART_INTR_CTRL_ENABLE (0xbb) ///< Normal operations
-#define BSP_UART_INTR_CTRL_TERMIOS (0xcc) ///< RX & line status
-
-/** @brief Return values for uart_polled_status() */
-#define BSP_UART_STATUS_ERROR (-1) ///< No character
-#define BSP_UART_STATUS_NOCHAR (0) ///< No character
-#define BSP_UART_STATUS_CHAR (1) ///< Character present
-#define BSP_UART_STATUS_BREAK (2) ///< Break point is detected
-
-/** @brief PC UART definitions */
-#define BSP_UART_COM1 (0)
-#define BSP_UART_COM2 (1)
-
-/** @brief
- * Base IO for UART
- */
-
-#define COM1_BASE_IO 0x3F8
-#define COM2_BASE_IO 0x2F8
-
-/** @brief
- * Offsets from base
- */
-
-/** @brief DLAB 0 */
-#define RBR (0) ///< Rx Buffer Register (read)
-#define THR (0) ///< Tx Buffer Register (write)
-#define IER (1) ///< Interrupt Enable Register
-
-/** @brief DLAB X */
-#define IIR (2) ///< Interrupt Ident Register (read)
-#define FCR (2) ///< FIFO Control Register (write)
-#define LCR (3) ///< Line Control Register
-#define MCR (4) ///< Modem Control Register
-#define LSR (5) ///< Line Status Register
-#define MSR (6) ///< Modem Status Register
-#define SCR (7) ///< Scratch register
-
-/** @brief DLAB 1 */
-#define DLL (0) ///< Divisor Latch, LSB
-#define DLM (1) ///< Divisor Latch, MSB
-#define AFR (2) ///< Alternate Function register
-
-/** @brief
- * Interrupt source definition via IIR
- */
-#define MODEM_STATUS 0
-#define NO_MORE_INTR 1
-#define TRANSMITTER_HODING_REGISTER_EMPTY 2
-#define RECEIVER_DATA_AVAIL 4
-#define RECEIVER_ERROR 6
-#define CHARACTER_TIMEOUT_INDICATION 12
-
-/** @brief
- * Bits definition of IER
- */
-#define RECEIVE_ENABLE 0x1
-#define TRANSMIT_ENABLE 0x2
-#define RECEIVER_LINE_ST_ENABLE 0x4
-#define MODEM_ENABLE 0x8
-#define INTERRUPT_DISABLE 0x0
-
-/** @brief
- * Bits definition of the Line Status Register (LSR)
- */
-#define DR 0x01 ///< Data Ready
-#define OE 0x02 ///< Overrun Error
-#define PE 0x04 ///< Parity Error
-#define FE 0x08 ///< Framing Error
-#define BI 0x10 ///< Break Interrupt
-#define THRE 0x20 ///< Transmitter Holding Register Empty
-#define TEMT 0x40 ///< Transmitter Empty
-#define ERFIFO 0x80 ///< Error receive Fifo
-
-/** @brief
- * Bits definition of the MODEM Control Register (MCR)
- */
-#define DTR 0x01 ///< Data Terminal Ready
-#define RTS 0x02 ///< Request To Send
-#define OUT_1 0x04 ///< Output 1, (reserved on COMPAQ I/O Board)
-#define OUT_2 0x08 ///< Output 2, Enable Asynchronous Port Interrupts
-#define LB 0x10 ///< Enable Internal Loop Back
-
-/** @brief
- * Bits definition of the Line Control Register (LCR)
- */
-#define CHR_5_BITS 0
-#define CHR_6_BITS 1
-#define CHR_7_BITS 2
-#define CHR_8_BITS 3
-
-#define WL 0x03 ///< Word length mask
-#define STB 0x04 ///< 1 Stop Bit, otherwise 2 Stop Bits
-#define PEN 0x08 ///< Parity Enabled
-#define EPS 0x10 ///< Even Parity Select, otherwise Odd
-#define SP 0x20 ///< Stick Parity
-#define BCB 0x40 ///< Break Control Bit
-#define DLAB 0x80 ///< Enable Divisor Latch Access
-
-/** @brief
- * Bits definition of the MODEM Status Register (MSR)
- */
-#define DCTS 0x01 ///< Delta Clear To Send
-#define DDSR 0x02 ///< Delta Data Set Ready
-#define TERI 0x04 ///< Trailing Edge Ring Indicator
-#define DDCD 0x08 ///< Delta Carrier Detect Indicator
-#define CTS 0x10 ///< Clear To Send (when loop back is active)
-#define DSR 0x20 ///< Data Set Ready (when loop back is active)
-#define RI 0x40 ///< Ring Indicator (when loop back is active)
-#define DCD 0x80 ///< Data Carrier Detect (when loop back is active)
-
-/** @brief
- * Bits definition of the FIFO Control Register : WD16C552 or NS16550
- */
-
-#define FIFO_CTRL 0x01 ///< Set to 1 permit access to other bits
-#define FIFO_EN 0x01 ///< Enable the FIFO
-#define XMIT_RESET 0x02 ///< Transmit FIFO Reset
-#define RCV_RESET 0x04 ///< Receive FIFO Reset
-#define FCR3 0x08 ///< do not understand manual!
-
-#define RECEIVE_FIFO_TRIGGER1 0x0 ///< trigger recieve interrupt after 1 byte
-#define RECEIVE_FIFO_TRIGGER4 0x40 ///< trigger recieve interrupt after 4 byte
-#define RECEIVE_FIFO_TRIGGER8 0x80 ///< trigger recieve interrupt after 8 byte
-#define RECEIVE_FIFO_TRIGGER12 0xc0 ///< trigger recieve interrupt after 12 byte
-#define TRIG_LEVEL 0xc0 ///< Mask for the trigger level
-
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _BSPUART_H */