root/net/inet/Space.c

/* [previous][next][first][last][top][bottom][index][help] */
   1 /*
   2  * INET         An implementation of the TCP/IP protocol suite for the LINUX
   3  *              operating system.  INET is implemented using the  BSD Socket
   4  *              interface as the means of communication with the user level.
   5  *
   6  *              Holds initial configuration information for devices.
   7  *
   8  * NOTE:        This file is a nice idea, but its current format does not work
   9  *              well for drivers that support multiple units, like the SLIP
  10  *              driver.  We should actually have only one pointer to a driver
  11  *              here, with the driver knowing how many units it supports.
  12  *              Currently, the SLIP driver abuses the "base_addr" integer
  13  *              field of the 'device' structure to store the unit number...
  14  *              -FvK
  15  *
  16  * Version:     @(#)Space.c     1.0.7   08/12/93
  17  *
  18  * Authors:     Ross Biro, <bir7@leland.Stanford.Edu>
  19  *              Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  20  *              Donald J. Becker, <becker@super.org>
  21  *
  22  *              This program is free software; you can redistribute it and/or
  23  *              modify it under the terms of the GNU General Public License
  24  *              as published by the Free Software Foundation; either version
  25  *              2 of the License, or (at your option) any later version.
  26  */
  27 #include <linux/config.h>
  28 #include <linux/ddi.h>
  29 #include "dev.h"
  30 
  31 #define LOOPBACK                        /* always present, right?       */
  32 
  33 #define NEXT_DEV        NULL
  34 
  35 
  36 #if defined(D_LINK) || defined(CONFIG_DE600)
  37     extern int d_link_init(struct device *);
  38     static struct device d_link_dev = {
  39         "dl0",
  40         0,
  41         0,
  42         0,
  43         0,
  44         D_LINK_IO,
  45         D_LINK_IRQ,
  46         0, 0, 0,
  47         NEXT_DEV,
  48         d_link_init
  49     };
  50 #   undef NEXT_DEV
  51 #   define NEXT_DEV     (&d_link_dev)
  52 #endif
  53 
  54 #ifdef CONFIG_EL1
  55 #error 
  56 #   ifndef EL1_IRQ
  57 #       define EL1_IRQ 9
  58 #   endif
  59 #   ifndef EL1
  60 #       define EL1 0
  61 #   endif
  62     extern int el1_init(struct device *);
  63     static struct device el1_dev = {
  64         "el0", 0, 0, 0, 0, EL1, EL1_IRQ, 0, 0, 0, NEXT_DEV, el1_init
  65     };
  66 #   undef NEXT_DEV
  67 #   define NEXT_DEV     (&el1_dev)
  68 #endif  /* EL1 */
  69 
  70 #ifdef CONFIG_DEPCA
  71     extern int depca_probe(struct device *);
  72     static struct device depca_dev = {
  73         "depca0", 0,0,0,0, 0, 0, 0, 0, 0, NEXT_DEV, depca_probe,
  74     };
  75 #   undef NEXT_DEV
  76 #   define NEXT_DEV     (&depca_dev)
  77 #endif  /* CONFIG_DEPCA */
  78 
  79 
  80 #ifdef CONFIG_ATP               /* AT-LAN-TEC (RealTek) pocket adaptor. */
  81     extern int atp_probe(struct device *);
  82     static struct device atp_dev = {
  83         "atp0", 0,0,0,0, 0, 0, 0, 0, 0, NEXT_DEV, atp_probe,
  84     };
  85 #   undef NEXT_DEV
  86 #   define NEXT_DEV     (&atp_dev)
  87 #endif  /* CONFIG_ATP */
  88 
  89 #ifdef CONFIG_EL3
  90     extern int el3_probe(struct device *);
  91     static struct device eliii0_dev = {
  92         "eliii0", 0,0,0,0, 0, 0, 0, 0, 0, NEXT_DEV, el3_probe,
  93     };
  94 #   undef NEXT_DEV
  95 #   define NEXT_DEV     (&eliii0_dev)
  96 #endif  /* CONFIG_3C509 aka EL3 */
  97 
  98 #ifdef CONFIG_ZNET
  99     extern int znet_probe(struct device *);
 100     static struct device znet_dev = {
 101         "znet", 0,0,0,0, 0, 0, 0, 0, 0, NEXT_DEV, znet_probe, };
 102 #   undef NEXT_DEV
 103 #   define NEXT_DEV     (&znet_dev)
 104 #endif  /* CONFIG_ZNET */
 105 
 106 #ifdef CONFIG_EEXPRESS
 107     extern int express_probe(struct device *);
 108     static struct device express0_dev = {
 109         "exp0", 0,0,0,0, 0, 0, 0, 0, 0, NEXT_DEV, express_probe, };
 110 #   undef NEXT_DEV
 111 #   define NEXT_DEV     (&express0_dev)
 112 #endif  /* CONFIG_EEPRESS */
 113 
 114 #ifdef CONFIG_AT1500
 115     extern int at1500_probe(struct device *);
 116     static struct device lance_dev = {
 117         "le0",
 118         0,0,0,0, 0 /* I/O Base */, 0 /* pre-set IRQ */,
 119         0, 0, 0, NEXT_DEV, at1500_probe,
 120     };
 121 #   undef NEXT_DEV
 122 #   define NEXT_DEV     (&lance_dev)
 123 #endif  /* AT1500BT */
 124 
 125 #if defined(EI8390) || defined(CONFIG_EL2) || defined(CONFIG_NE2000) \
 126     || defined(CONFIG_WD80x3) || defined(CONFIG_HPLAN)
 127 #   ifndef EI8390
 128 #       define EI8390 0
 129 #   endif
 130 #   ifndef EI8390_IRQ
 131 #       define EI8390_IRQ 0
 132 #   endif
 133     extern int ethif_init(struct device *);
 134     static struct device ei8390_dev = {
 135         "eth0",
 136         0,                              /* auto-config                  */
 137         0,
 138         0,
 139         0,
 140         EI8390,
 141         EI8390_IRQ,
 142         0, 0, 0,
 143         NEXT_DEV,
 144         ethif_init
 145     };
 146 #   undef NEXT_DEV
 147 #   define NEXT_DEV     (&ei8390_dev)
 148 #endif  /* The EI8390 drivers. */
 149 
 150 #if defined(PLIP) || defined(CONFIG_PLIP)
 151     extern int plip_init(struct device *);
 152     static struct device plip2_dev = {
 153         "plip2", 0, 0, 0, 0, 0x278, 2, 0, 0, 0, NEXT_DEV, plip_init, };
 154     static struct device plip1_dev = {
 155         "plip1", 0, 0, 0, 0, 0x378, 7, 0, 0, 0, &plip2_dev, plip_init, };
 156     static struct device plip0_dev = {
 157         "plip0", 0, 0, 0, 0, 0x3BC, 5, 0, 0, 0, &plip1_dev, plip_init, };
 158 #   undef NEXT_DEV
 159 #   define NEXT_DEV     (&plip0_dev)
 160 #endif  /* PLIP */
 161 
 162 #if defined(SLIP) || defined(CONFIG_SLIP)
 163     extern int slip_init(struct device *);
 164     static struct device slip3_dev = {
 165         "sl3",                  /* Internal SLIP driver, channel 3      */
 166         0x0,                    /* recv memory end                      */
 167         0x0,                    /* recv memory start                    */
 168         0x0,                    /* memory end                           */
 169         0x0,                    /* memory start                         */
 170         0x3,                    /* base I/O address                     */
 171         0,                      /* IRQ                                  */
 172         0, 0, 0,                /* flags                                */
 173         NEXT_DEV,               /* next device                          */
 174         slip_init               /* slip_init should set up the rest     */
 175     };
 176     static struct device slip2_dev = {
 177         "sl2",                  /* Internal SLIP driver, channel 2      */
 178         0x0,                    /* recv memory end                      */
 179         0x0,                    /* recv memory start                    */
 180         0x0,                    /* memory end                           */
 181         0x0,                    /* memory start                         */
 182         0x2,                    /* base I/O address                     */
 183         0,                      /* IRQ                                  */
 184         0, 0, 0,                /* flags                                */
 185         &slip3_dev,             /* next device                          */
 186         slip_init               /* slip_init should set up the rest     */
 187     };
 188     static struct device slip1_dev = {
 189         "sl1",                  /* Internal SLIP driver, channel 1      */
 190         0x0,                    /* recv memory end                      */
 191         0x0,                    /* recv memory start                    */
 192         0x0,                    /* memory end                           */
 193         0x0,                    /* memory start                         */
 194         0x1,                    /* base I/O address                     */
 195         0,                      /* IRQ                                  */
 196         0, 0, 0,                /* flags                                */
 197         &slip2_dev,             /* next device                          */
 198         slip_init               /* slip_init should set up the rest     */
 199     };
 200     static struct device slip0_dev = {
 201         "sl0",                  /* Internal SLIP driver, channel 0      */
 202         0x0,                    /* recv memory end                      */
 203         0x0,                    /* recv memory start                    */
 204         0x0,                    /* memory end                           */
 205         0x0,                    /* memory start                         */
 206         0x0,                    /* base I/O address                     */
 207         0,                      /* IRQ                                  */
 208         0, 0, 0,                /* flags                                */
 209         &slip1_dev,             /* next device                          */
 210         slip_init               /* slip_init should set up the rest     */
 211     };
 212 #   undef       NEXT_DEV
 213 #   define      NEXT_DEV        (&slip0_dev)
 214 #endif  /* SLIP */
 215 
 216 
 217 #ifdef LOOPBACK
 218     extern int loopback_init(struct device *dev);
 219     static struct device loopback_dev = {
 220         "lo",                   /* Software Loopback interface          */
 221         0x0,                    /* recv memory end                      */
 222         0x0,                    /* recv memory start                    */
 223         0x0,                    /* memory end                           */
 224         0x0,                    /* memory start                         */
 225         0,                      /* base I/O address                     */
 226         0,                      /* IRQ                                  */
 227         0, 0, 0,                /* flags                                */
 228         NEXT_DEV,               /* next device                          */
 229         loopback_init           /* loopback_init should set up the rest */
 230     };
 231 #   undef       NEXT_DEV
 232 #   define      NEXT_DEV        (&loopback_dev)
 233 #endif
 234 
 235 
 236 struct device *dev_base = NEXT_DEV;

/* [previous][next][first][last][top][bottom][index][help] */