source: rtems/bsps/arm/raspberrypi/include/bsp/vc.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.8 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup raspberrypi_vc
5 *
6 * @brief video core support.
7 *
8 */
9
10/*
11 * Copyright (c) 2015 Yang Qiao
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *
16 *  http://www.rtems.org/license/LICENSE
17 *
18 */
19
20#ifndef LIBBSP_ARM_RASPBERRYPI_VC_H
21#define LIBBSP_ARM_RASPBERRYPI_VC_H
22
23/**
24 * @defgroup raspberrypi_vc Register Definitions
25 *
26 * @ingroup arm_raspberrypi
27 *
28 * @brief Register Definitions
29 *
30 * @{
31 */
32
33typedef struct {
34  uint32_t width;
35  uint32_t height;
36} bcm2835_get_display_size_entries;
37
38int bcm2835_mailbox_get_display_size(
39  bcm2835_get_display_size_entries *_entries );
40
41typedef enum {
42  bcm2835_mailbox_pixel_order_bgr = 0,
43  bcm2835_mailbox_pixel_order_rgb = 1
44} bcm2835_pixel_order;
45
46typedef enum {
47  bcm2835_mailbox_alpha_mode_0_opaque       = 0,
48  bcm2835_mailbox_alpha_mode_0_transparent  = 1,
49  bcm2835_mailbox_alpha_mode_ignored        = 2
50} bcm2835_alpha_mode;
51
52typedef struct {
53  uint32_t xres;
54  uint32_t yres;
55  uint32_t xvirt;
56  uint32_t yvirt;
57  uint32_t depth;
58  bcm2835_pixel_order pixel_order;
59  bcm2835_alpha_mode alpha_mode;
60  uint32_t voffset_x;
61  uint32_t voffset_y;
62  uint32_t overscan_left;
63  uint32_t overscan_right;
64  uint32_t overscan_top;
65  uint32_t overscan_bottom;
66  uint32_t base;
67  size_t size;
68  uint32_t pitch;
69} bcm2835_init_frame_buffer_entries;
70
71int bcm2835_mailbox_init_frame_buffer(
72  bcm2835_init_frame_buffer_entries *_entries );
73
74typedef struct {
75  uint32_t pitch;
76} bcm2835_get_pitch_entries;
77
78int bcm2835_mailbox_get_pitch( bcm2835_get_pitch_entries *_entries );
79
80typedef struct {
81  char cmdline[ 1024 ];
82} bcm2835_get_cmdline_entries;
83
84int bcm2835_mailbox_get_cmdline( bcm2835_get_cmdline_entries *_entries );
85
86typedef enum {
87  bcm2835_mailbox_power_udid_sd_card = 0x00000000u,
88  bcm2835_mailbox_power_udid_uart0 = 0x00000001u,
89  bcm2835_mailbox_power_udid_uart1 = 0x00000002u,
90  bcm2835_mailbox_power_udid_usb_hcd = 0x00000003u,
91  bcm2835_mailbox_power_udid_i2c0 = 0x00000004u,
92  bcm2835_mailbox_power_udid_i2c1 = 0x00000005u,
93  bcm2835_mailbox_power_udid_i2c2 = 0x00000006u,
94  bcm2835_mailbox_power_udid_spi = 0x00000007u,
95  bcm2835_mailbox_power_udid_ccp2tx = 0x00000008u,
96} bcm2835_power_device_id;
97
98typedef struct {
99  bcm2835_power_device_id dev_id;
100  uint32_t state;
101} bcm2835_set_power_state_entries;
102
103#define BCM2835_MAILBOX_SET_POWER_STATE_REQ_ON ( 1 << 0 )
104#define BCM2835_MAILBOX_SET_POWER_STATE_REQ_WAIT ( 1 << 1 )
105#define BCM2835_MAILBOX_POWER_STATE_ON ( 1 << 0 )
106#define BCM2835_MAILBOX_POWER_STATE_NODEV ( 1 << 1 )
107int bcm2835_mailbox_set_power_state( bcm2835_set_power_state_entries *_entries );
108
109int bcm2835_mailbox_get_power_state( bcm2835_set_power_state_entries *_entries );
110
111typedef struct {
112  uint32_t base;
113  size_t size;
114} bcm2835_get_arm_memory_entries;
115
116int bcm2835_mailbox_get_arm_memory( bcm2835_get_arm_memory_entries *_entries );
117
118typedef struct {
119  uint32_t base;
120  size_t size;
121} bcm2835_get_vc_memory_entries;
122
123int bcm2835_mailbox_get_vc_memory( bcm2835_get_vc_memory_entries *_entries );
124
125typedef struct {
126  uint32_t fw_rev;
127} bcm2835_mailbox_get_fw_rev_entries;
128
129int bcm2835_mailbox_get_firmware_revision(
130  bcm2835_mailbox_get_fw_rev_entries *_entries );
131
132typedef struct {
133  uint32_t spec;
134} bcm2835_get_board_spec_entries;
135
136int bcm2835_mailbox_get_board_model( bcm2835_get_board_spec_entries *_entries );
137
138int bcm2835_mailbox_get_board_revision(
139  bcm2835_get_board_spec_entries *_entries );
140
141typedef struct {
142  uint64_t board_serial;
143} bcm2835_get_board_serial_entries;
144
145int bcm2835_mailbox_get_board_serial(
146  bcm2835_get_board_serial_entries *_entries );
147
148typedef struct {
149  uint32_t clock_id;
150  uint32_t clock_rate;
151} bcm2835_get_clock_rate_entries;
152
153int bcm2835_mailbox_get_clock_rate(
154  bcm2835_get_clock_rate_entries *_entries );
155/** @} */
156
157#endif /* LIBBSP_ARM_RASPBERRYPI_VC_H */
Note: See TracBrowser for help on using the repository browser.