source: rtems-libbsd/rtemsbsd/include/machine/rtems-bsd-devicet.h @ 0ba4197

55-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since 0ba4197 was e599318, checked in by Sebastian Huber <sebastian.huber@…>, on 10/09/13 at 20:52:54

Update files to match FreeBSD layout

Add compatibility with Newlib header files. Some FreeBSD header files
are mapped by the translation script:

o rtems/bsd/sys/_types.h
o rtems/bsd/sys/errno.h
o rtems/bsd/sys/lock.h
o rtems/bsd/sys/param.h
o rtems/bsd/sys/resource.h
o rtems/bsd/sys/time.h
o rtems/bsd/sys/timespec.h
o rtems/bsd/sys/types.h
o rtems/bsd/sys/unistd.h

It is now possible to include <sys/socket.h> directly for example.

Generate one Makefile which builds everything including tests.

  • Property mode set to 100644
File size: 2.4 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup rtems_bsd_rtems
5 *
6 * @brief This file describes the divice structure.  It was derived
7 * from the libbsdport source.
8 */
9
10/*
11 * COPYRIGHT (c) 2012. On-Line Applications Research Corporation (OAR).
12 * All rights reserved.
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 * 1. Redistributions of source code must retain the above copyright
18 *    notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 *    notice, this list of conditions and the following disclaimer in the
21 *    documentation and/or other materials provided with the distribution.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 */
35
36#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_DEVICET_H_
37#define _RTEMS_BSD_MACHINE_RTEMS_BSD_DEVICET_H_
38
39#include <rtems.h>
40#include <rtems/bspIo.h>
41#include <stdarg.h>
42#include <stdio.h>
43
44#include <sys/queue.h>
45
46typedef struct device *device_t;
47
48typedef struct _pcidev_t {
49        unsigned short bus;
50        unsigned char  dev;
51        unsigned char  fun;
52} pcidev_t;
53
54#define DEVICE_SOFTC_ALIGNMENT 16
55
56struct device {
57        union {
58                pcidev_t        pci;
59        }            bushdr;
60        int      type;
61        STAILQ_ENTRY(device) list;
62        const char     *name;
63        char     nameunit[16];  /* NEVER use knowledge about the size of this -- we may change it */
64        int      unit;
65        char     *desc;
66        driver_t *drv;
67        int      attached;
68        void     *rawmem;       /* back pointer */
69        struct rtems_bsdnet_ifconfig *ifconfig;
70        char softc[] __attribute__ ((aligned(DEVICE_SOFTC_ALIGNMENT), may_alias));
71        /* a pointer to back to the device is installed past the 'softc' */
72};
73#endif
Note: See TracBrowser for help on using the repository browser.