~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/zorro.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *  linux/zorro.h -- Amiga AutoConfig (Zorro) Bus Definitions
  3  *
  4  *  Copyright (C) 1995--2003 Geert Uytterhoeven
  5  *
  6  *  This file is subject to the terms and conditions of the GNU General Public
  7  *  License.  See the file COPYING in the main directory of this archive
  8  *  for more details.
  9  */
 10 
 11 #ifndef _LINUX_ZORRO_H
 12 #define _LINUX_ZORRO_H
 13 
 14 
 15 #include <uapi/linux/zorro.h>
 16 
 17 #include <linux/device.h>
 18 #include <linux/init.h>
 19 #include <linux/ioport.h>
 20 #include <linux/mod_devicetable.h>
 21 
 22 #include <asm/zorro.h>
 23 
 24 
 25     /*
 26      *  Zorro devices
 27      */
 28 
 29 struct zorro_dev {
 30     struct ExpansionRom rom;
 31     zorro_id id;
 32     struct device dev;                  /* Generic device interface */
 33     u16 slotaddr;
 34     u16 slotsize;
 35     char name[64];
 36     struct resource resource;
 37 };
 38 
 39 #define to_zorro_dev(n) container_of(n, struct zorro_dev, dev)
 40 
 41 
 42     /*
 43      *  Zorro device drivers
 44      */
 45 
 46 struct zorro_driver {
 47     struct list_head node;
 48     char *name;
 49     const struct zorro_device_id *id_table;     /* NULL if wants all devices */
 50     int (*probe)(struct zorro_dev *z, const struct zorro_device_id *id);        /* New device inserted */
 51     void (*remove)(struct zorro_dev *z);        /* Device removed (NULL if not a hot-plug capable driver) */
 52     struct device_driver driver;
 53 };
 54 
 55 #define to_zorro_driver(drv)    container_of_const(drv, struct zorro_driver, driver)
 56 
 57 
 58 #define zorro_for_each_dev(dev) \
 59         for (dev = &zorro_autocon[0]; dev < zorro_autocon+zorro_num_autocon; dev++)
 60 
 61 
 62 /* New-style probing */
 63 extern int zorro_register_driver(struct zorro_driver *);
 64 extern void zorro_unregister_driver(struct zorro_driver *);
 65 
 66 
 67 extern unsigned int zorro_num_autocon;  /* # of autoconfig devices found */
 68 extern struct zorro_dev *zorro_autocon;
 69 
 70 
 71     /*
 72      * Minimal information about a Zorro device, passed from bootinfo
 73      * Only available temporarily, i.e. until initmem has been freed!
 74      */
 75 
 76 struct zorro_dev_init {
 77         struct ExpansionRom rom;
 78         u16 slotaddr;
 79         u16 slotsize;
 80         u32 boardaddr;
 81         u32 boardsize;
 82 };
 83 
 84 extern struct zorro_dev_init zorro_autocon_init[ZORRO_NUM_AUTO] __initdata;
 85 
 86 
 87     /*
 88      *  Zorro Functions
 89      */
 90 
 91 extern struct zorro_dev *zorro_find_device(zorro_id id,
 92                                            struct zorro_dev *from);
 93 
 94 #define zorro_resource_start(z) ((z)->resource.start)
 95 #define zorro_resource_end(z)   ((z)->resource.end)
 96 #define zorro_resource_len(z)   (resource_size(&(z)->resource))
 97 #define zorro_resource_flags(z) ((z)->resource.flags)
 98 
 99 #define zorro_request_device(z, name) \
100     request_mem_region(zorro_resource_start(z), zorro_resource_len(z), name)
101 #define zorro_release_device(z) \
102     release_mem_region(zorro_resource_start(z), zorro_resource_len(z))
103 
104 /* Similar to the helpers above, these manipulate per-zorro_dev
105  * driver-specific data.  They are really just a wrapper around
106  * the generic device structure functions of these calls.
107  */
108 static inline void *zorro_get_drvdata (struct zorro_dev *z)
109 {
110         return dev_get_drvdata(&z->dev);
111 }
112 
113 static inline void zorro_set_drvdata (struct zorro_dev *z, void *data)
114 {
115         dev_set_drvdata(&z->dev, data);
116 }
117 
118 
119     /*
120      *  Bitmask indicating portions of available Zorro II RAM that are unused
121      *  by the system. Every bit represents a 64K chunk, for a maximum of 8MB
122      *  (128 chunks, physical 0x00200000-0x009fffff).
123      *
124      *  If you want to use (= allocate) portions of this RAM, you should clear
125      *  the corresponding bits.
126      */
127 
128 extern DECLARE_BITMAP(zorro_unused_z2ram, 128);
129 
130 #define Z2RAM_START             (0x00200000)
131 #define Z2RAM_END               (0x00a00000)
132 #define Z2RAM_SIZE              (0x00800000)
133 #define Z2RAM_CHUNKSIZE         (0x00010000)
134 #define Z2RAM_CHUNKMASK         (0x0000ffff)
135 #define Z2RAM_CHUNKSHIFT        (16)
136 
137 
138 #endif /* _LINUX_ZORRO_H */
139 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php