source: rtems/bsps/m68k/include/mcf5206/mcfuart.h @ 2afb22b

5
Last change on this file since 2afb22b was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

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.

  • Property mode set to 100644
File size: 3.2 KB
Line 
1/*
2 *  Generic UART Serial driver for Motorola Coldfire processors definitions
3 *
4 *  Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russian Fed.
5 *  Author: Victor V. Vengerov <vvv@oktet.ru>
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.org/license/LICENSE.
10 */
11
12#ifndef __MCFUART_H__
13#define __MCFUART_H__
14
15#include <termios.h>
16#include "bsp.h"
17#include "mcf5206e.h"
18
19/*
20 * The MCF5206e System Clock Frequency; 54MHz default
21 */
22#ifndef SYSTEM_CLOCK_FREQUENCY
23#define SYSTEM_CLOCK_FREQUENCY BSP_SYSTEM_FREQUENCY
24#endif
25
26/*
27 * The following structure is a descriptor of single UART channel.
28 * It contains the initialization information about channel and
29 * current operating values
30 */
31typedef struct mcfuart {
32   uint32_t            chn;              /* UART channel number */
33   uint8_t             intvec;           /* UART interrupt vector number, or
34                                                0 if polled I/O */
35   void               *tty;              /* termios channel descriptor */
36
37   volatile const char     *tx_buf;      /* Transmit buffer from termios */
38   volatile uint32_t        tx_buf_len;  /* Transmit buffer length */
39   volatile uint32_t        tx_ptr;      /* Index of next char to transmit*/
40   rtems_isr_entry          old_handler; /* Saved interrupt handler */
41
42   tcflag_t                 c_iflag;    /* termios input mode flags */
43   bool                     parerr_mark_flag; /* Parity error processing
44                                                  state */
45} mcfuart;
46
47/* mcfuart_init --
48 *     This function verifies the input parameters and perform initialization
49 *     of the Motorola Coldfire on-chip UART descriptor structure.
50 *
51 */
52rtems_status_code
53mcfuart_init(mcfuart *uart, void *tty, uint8_t   intvec,
54             uint32_t   chn);
55
56/* mcfuart_reset --
57 *     This function perform the hardware initialization of Motorola
58 *     Coldfire processor on-chip UART controller using parameters
59 *     filled by the mcfuart_init function.
60 */
61rtems_status_code
62mcfuart_reset(mcfuart *uart);
63
64/* mcfuart_disable --
65 *     This function disable the operations on Motorola Coldfire UART
66 *     controller
67 */
68rtems_status_code
69mcfuart_disable(mcfuart *uart);
70
71/* mcfuart_set_attributes --
72 *     This function parse the termios attributes structure and perform
73 *     the appropriate settings in hardware.
74 */
75int
76mcfuart_set_attributes(mcfuart *mcf, const struct termios *t);
77
78/* mcfuart_poll_read --
79 *     This function tried to read character from MCF UART and perform
80 *     error handling.
81 */
82int
83mcfuart_poll_read(mcfuart *uart);
84
85/* mcfuart_interrupt_write --
86 *     This function initiate transmitting of the buffer in interrupt mode.
87 */
88ssize_t
89mcfuart_interrupt_write(mcfuart *uart, const char *buf, size_t len);
90
91/* mcfuart_poll_write --
92 *     This function transmit buffer byte-by-byte in polling mode.
93 */
94ssize_t
95mcfuart_poll_write(mcfuart *uart, const char *buf, size_t len);
96
97/* mcfuart_stop_remote_tx --
98 *     This function stop data flow from remote device.
99 */
100int
101mcfuart_stop_remote_tx(mcfuart *uart);
102
103/* mcfuart_start_remote_tx --
104 *     This function resume data flow from remote device.
105 */
106int
107mcfuart_start_remote_tx(mcfuart *uart);
108
109#endif
Note: See TracBrowser for help on using the repository browser.