Changeset 459d67d in rtems-libbsd


Ignore:
Timestamp:
Jun 27, 2016, 3:35:08 AM (3 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
afaeccc05a556f6aa25ba044a7e49d6aa634a59e, freebsd-9.3, master
Children:
39a650e
Parents:
7439724
Message:

Move the Nexus bus driver decls available to users.

Location:
rtemsbsd/include
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/include/bsp/nexus-devices.h

    r7439724 r459d67d  
    77 *  Germany
    88 *  <rtems@embedded-brains.de>
     9 *
     10 * Copyright (c) 2016 Chris Johns <chrisj@rtems.org> All rights reserved.
    911 *
    1012 * Redistribution and use in source and binary forms, with or without
     
    3032 */
    3133
     34#if !defined(BSP_NEXUS_DEVICES_h)
     35#define BSP_NEXUS_DEVICES_h
     36
    3237#include <rtems/bsd/bsd.h>
    3338
     
    3843#include <bsp/irq.h>
    3944
    40 static const rtems_bsd_device_resource smc0_res[] = {
    41         {
    42                 .type = RTEMS_BSD_RES_MEMORY,
    43                 .start_request = 0,
    44                 .start_actual = 0x4e000000
    45         }, {
    46                 .type = RTEMS_BSD_RES_IRQ,
    47                 .start_request = 0,
    48                 .start_actual = RVPBXA9_IRQ_ETHERNET
    49         }
    50 };
    51 
    52 RTEMS_BSD_DEFINE_NEXUS_DEVICE(smc, 0, RTEMS_ARRAY_SIZE(smc0_res),
    53     &smc0_res[0]);
     45#define RTEMS_BSD_DRIVER_SMC0
     46#define RTEMS_BSD_DRIVER_SMC0_BASE_ADDR 0x4e000000
     47#define RTEMS_BSD_DRIVER_SMC0_IRQ       RVPBXA9_IRQ_ETHERNET
    5448
    5549#elif defined(LIBBSP_M68K_GENMCF548X_BSP_H)
    5650
    57 RTEMS_BSD_DEFINE_NEXUS_DEVICE(fec, 0, 0, NULL);
     51#define RTEMS_BSD_DRIVER_FEC
    5852
    5953#elif defined(LIBBSP_ARM_XILINX_ZYNQ_BSP_H)
     
    6155#include <bsp/irq.h>
    6256
    63 static const rtems_bsd_device_resource zy7_slcr0_res[] = {
    64         {
    65                 .type = RTEMS_BSD_RES_MEMORY,
    66                 .start_request = 0,
    67                 .start_actual = 0xf8000000
    68         }
    69 };
    70 
    71 RTEMS_BSD_DEFINE_NEXUS_DEVICE(zy7_slcr, 0, RTEMS_ARRAY_SIZE(zy7_slcr0_res),
    72     &zy7_slcr0_res[0]);
    73 
    74 static const rtems_bsd_device_resource cgem0_res[] = {
    75         {
    76                 .type = RTEMS_BSD_RES_MEMORY,
    77                 .start_request = 0,
    78                 .start_actual = 0xe000b000
    79         }, {
    80                 .type = RTEMS_BSD_RES_IRQ,
    81                 .start_request = 0,
    82                 .start_actual = ZYNQ_IRQ_ETHERNET_0
    83         }
    84 };
    85 
    86 RTEMS_BSD_DEFINE_NEXUS_DEVICE(cgem, 0, RTEMS_ARRAY_SIZE(cgem0_res),
    87     &cgem0_res[0]);
    88 
    89 SYSINIT_DRIVER_REFERENCE(e1000phy, miibus);
     57#define RTEMS_BSD_DRIVER_XILINX_ZYNQ_SLCR0
     58#define RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM0
     59#define RTEMS_BSD_DRIVER_CGEM0_IRQ         ZYNQ_IRQ_ETHERNET_0
     60#define RTEMS_BSD_DRIVER_E1000PHY
    9061
    9162#elif defined(LIBBSP_ARM_ALTERA_CYCLONE_V_BSP_H)
     
    9465#include <bsp/irq.h>
    9566
    96 static const rtems_bsd_device_resource dwc0_res[] = {
    97         {
    98                 .type = RTEMS_BSD_RES_MEMORY,
    99                 .start_request = 0,
    100                 .start_actual = (unsigned long)ALT_EMAC1_ADDR
    101         }, {
    102                 .type = RTEMS_BSD_RES_IRQ,
    103                 .start_request = 0,
    104                 .start_actual = ALT_INT_INTERRUPT_EMAC1_IRQ
    105         }
    106 };
    107 
    108 RTEMS_BSD_DEFINE_NEXUS_DEVICE(dwc, 0, RTEMS_ARRAY_SIZE(dwc0_res),
    109     &dwc0_res[0]);
    110 
    111 SYSINIT_DRIVER_REFERENCE(micphy, miibus);
    112 
    113 RTEMS_BSD_DEFINE_NEXUS_DEVICE(dw_mmc, 0, 0, NULL);
    114 
    115 SYSINIT_DRIVER_REFERENCE(mmc, dw_mmc);
    116 SYSINIT_DRIVER_REFERENCE(mmcsd, mmc);
    117 
    118 static const rtems_bsd_device_resource dwcotg0_res[] = {
    119         {
    120                 .type = RTEMS_BSD_RES_MEMORY,
    121                 .start_request = 0,
    122                 .start_actual = (unsigned long)ALT_USB1_ADDR
    123         }, {
    124                 .type = RTEMS_BSD_RES_IRQ,
    125                 .start_request = 0,
    126                 .start_actual = ALT_INT_INTERRUPT_USB1_IRQ
    127         }
    128 };
    129 
    130 RTEMS_BSD_DEFINE_NEXUS_DEVICE(dwcotg, 0, RTEMS_ARRAY_SIZE(dwcotg0_res),
    131     &dwcotg0_res[0]);
    132 
    133 SYSINIT_REFERENCE(usb_quirk_init);
    134 SYSINIT_DRIVER_REFERENCE(uhub, usbus);
    135 SYSINIT_DRIVER_REFERENCE(umass, uhub);
     67#define RTEMS_BSD_DRIVER_DWC0
     68#define RTEMS_BSD_DRIVER_DWC0_BASE_ADDR    (unsigned long) ALT_EMAC1_ADDR
     69#define RTEMS_BSD_DRIVER_DWC0_IRQ          ALT_INT_INTERRUPT_EMAC1_IRQ
     70#define RTEMS_BSD_DRIVER_MIPHY
     71#define RTEMS_BSD_DRIVER_DWCOTG0
     72#define RTEMS_BSD_DRIVER_DWCOTG0_BASE_ADDR (unsigned long) ALT_USB1_ADDR
     73#define RTEMS_BSD_DRIVER_DWCOTG0_IRQ       ALT_INT_INTERRUPT_USB1_IRQ
     74#define RTEMS_BSD_DRIVER_DWC_MMC
     75#define RTEMS_BSD_DRIVER_MMC
     76#define RTEMS_BSD_DRIVER_USB
     77#define RTEMS_BSD_DRIVER_USB_MASS
    13678
    13779#elif defined(LIBBSP_I386_PC386_BSP_H)
    13880
    139 RTEMS_BSD_DEFINE_NEXUS_DEVICE(legacy, 0, 0, NULL);
    140 
    141 SYSINIT_DRIVER_REFERENCE(pcib, legacy);
    142 SYSINIT_DRIVER_REFERENCE(pci, pcib);
    143 SYSINIT_DRIVER_REFERENCE(lem, pci);
    144 SYSINIT_DRIVER_REFERENCE(igb, pci);
    145 SYSINIT_DRIVER_REFERENCE(em, pci);
    146 SYSINIT_DRIVER_REFERENCE(re, pci);
    147 
    148 SYSINIT_DRIVER_REFERENCE(rgephy, miibus);
     81#define RTEMS_BSD_DRIVER_PC_LEGACY
     82#define RTEMS_BSD_DRIVER_PCI_LEM
     83#define RTEMS_BSD_DRIVER_PCI_IGB
     84#define RTEMS_BSD_DRIVER_PCI_EM
     85#define RTEMS_BSD_DRIVER_PCI_RE
     86#define RTEMS_BSD_DRIVER_REPHY
    14987
    15088#elif defined(LIBBSP_POWERPC_QORIQ_BSP_H)
     
    15492#include <bsp/irq.h>
    15593
    156 static const rtems_bsd_device_resource tsec0_res[] = {
    157         {
    158                 .type = RTEMS_BSD_RES_MEMORY,
    159                 .start_request = 0,
    160                 .start_actual = 0xffeb0000
    161         }, {
    162                 .type = RTEMS_BSD_RES_IRQ,
    163                 .start_request = 0,
    164                 .start_actual = QORIQ_IRQ_ETSEC_TX_1
    165         }, {
    166                 .type = RTEMS_BSD_RES_IRQ,
    167                 .start_request = 1,
    168                 .start_actual = QORIQ_IRQ_ETSEC_RX_1
    169         }, {
    170                 .type = RTEMS_BSD_RES_IRQ,
    171                 .start_request = 2,
    172                 .start_actual = QORIQ_IRQ_ETSEC_ER_1
    173         }
    174 };
    175 
    176 RTEMS_BSD_DEFINE_NEXUS_DEVICE(tsec, 0, RTEMS_ARRAY_SIZE(tsec0_res),
    177     &tsec0_res[0]);
     94#define RTEMS_BSD_DRIVER_TSEC
     95#define RTEMS_BSD_DRIVER_TSEC_BASE_ADDR 0xffeb0000
     96#define RTEMS_BSD_DRIVER_TSEC_TX_IRQ    QORIQ_IRQ_ETSEC_TX_1
     97#define RTEMS_BSD_DRIVER_TSEC_RX_IRQ    QORIQ_IRQ_ETSEC_RX_1
     98#define RTEMS_BSD_DRIVER_TSEC_ER_IRQ    QORIQ_IRQ_ETSEC_ER_1
    17899
    179100#endif /* !QORIQ_CHIP_IS_T_VARIANT(QORIQ_CHIP_VARIANT) */
    180101
    181102#endif
     103
     104/*
     105 * Include the supported Nexus bus devices.
     106 */
     107#include <machine/rtems-bsd-nexus-bus.h>
     108
     109#endif
Note: See TracChangeset for help on using the changeset viewer.