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

Linux Cross Reference
Linux/include/asm-ia64/machvec.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Machine vector for IA-64.
  3  * 
  4  * Copyright (C) 1999 Silicon Graphics, Inc.
  5  * Copyright (C) Srinivasa Thirumalachar <sprasad@engr.sgi.com>
  6  * Copyright (C) Vijay Chander <vijay@engr.sgi.com>
  7  * Copyright (C) 1999-2000 Hewlett-Packard Co.
  8  * Copyright (C) 1999-2000 David Mosberger-Tang <davidm@hpl.hp.com>
  9  */
 10 #ifndef _ASM_IA64_MACHVEC_H
 11 #define _ASM_IA64_MACHVEC_H
 12 
 13 #include <linux/config.h>
 14 #include <linux/types.h>
 15 
 16 /* forward declarations: */
 17 struct pci_dev;
 18 struct pt_regs;
 19 struct scatterlist;
 20 
 21 typedef void ia64_mv_setup_t (char **);
 22 typedef void ia64_mv_irq_init_t (void);
 23 typedef void ia64_mv_pci_fixup_t (int);
 24 typedef unsigned long ia64_mv_map_nr_t (unsigned long);
 25 typedef void ia64_mv_mca_init_t (void);
 26 typedef void ia64_mv_mca_handler_t (void);
 27 typedef void ia64_mv_cmci_handler_t (int, void *, struct pt_regs *);
 28 typedef void ia64_mv_log_print_t (void);
 29 typedef void ia64_mv_send_ipi_t (int, int, int, int);
 30 
 31 /* PCI-DMA interface: */
 32 typedef void ia64_mv_pci_dma_init (void);
 33 typedef void *ia64_mv_pci_alloc_consistent (struct pci_dev *, size_t, dma_addr_t *);
 34 typedef void ia64_mv_pci_free_consistent (struct pci_dev *, size_t, void *, dma_addr_t);
 35 typedef dma_addr_t ia64_mv_pci_map_single (struct pci_dev *, void *, size_t, int);
 36 typedef void ia64_mv_pci_unmap_single (struct pci_dev *, dma_addr_t, size_t, int);
 37 typedef int ia64_mv_pci_map_sg (struct pci_dev *, struct scatterlist *, int, int);
 38 typedef void ia64_mv_pci_unmap_sg (struct pci_dev *, struct scatterlist *, int, int);
 39 typedef void ia64_mv_pci_dma_sync_single (struct pci_dev *, dma_addr_t, size_t, int);
 40 typedef void ia64_mv_pci_dma_sync_sg (struct pci_dev *, struct scatterlist *, int, int);
 41 typedef unsigned long ia64_mv_pci_dma_address (struct scatterlist *);
 42 /*
 43  * WARNING: The legacy I/O space is _architected_.  Platforms are
 44  * expected to follow this architected model (see Section 10.7 in the
 45  * IA-64 Architecture Software Developer's Manual).  Unfortunately,
 46  * some broken machines do not follow that model, which is why we have
 47  * to make the inX/outX operations part of the machine vector.
 48  * Platform designers should follow the architected model whenever
 49  * possible.
 50  */
 51 typedef unsigned int ia64_mv_inb_t (unsigned long);
 52 typedef unsigned int ia64_mv_inw_t (unsigned long);
 53 typedef unsigned int ia64_mv_inl_t (unsigned long);
 54 typedef void ia64_mv_outb_t (unsigned char, unsigned long);
 55 typedef void ia64_mv_outw_t (unsigned short, unsigned long);
 56 typedef void ia64_mv_outl_t (unsigned int, unsigned long);
 57 
 58 extern void machvec_noop (void);
 59 
 60 # if defined (CONFIG_IA64_HP_SIM)
 61 #  include <asm/machvec_hpsim.h>
 62 # elif defined (CONFIG_IA64_DIG)
 63 #  include <asm/machvec_dig.h>
 64 # elif defined (CONFIG_IA64_SGI_SN1)
 65 #  include <asm/machvec_sn1.h>
 66 # elif defined (CONFIG_IA64_GENERIC)
 67 
 68 # ifdef MACHVEC_PLATFORM_HEADER
 69 #  include MACHVEC_PLATFORM_HEADER
 70 # else
 71 #  define platform_name         ia64_mv.name
 72 #  define platform_setup        ia64_mv.setup
 73 #  define platform_irq_init     ia64_mv.irq_init
 74 #  define platform_map_nr       ia64_mv.map_nr
 75 #  define platform_mca_init     ia64_mv.mca_init
 76 #  define platform_mca_handler  ia64_mv.mca_handler
 77 #  define platform_cmci_handler ia64_mv.cmci_handler
 78 #  define platform_log_print    ia64_mv.log_print
 79 #  define platform_pci_fixup    ia64_mv.pci_fixup
 80 #  define platform_send_ipi     ia64_mv.send_ipi
 81 #  define platform_pci_dma_init         ia64_mv.dma_init
 82 #  define platform_pci_alloc_consistent ia64_mv.alloc_consistent
 83 #  define platform_pci_free_consistent  ia64_mv.free_consistent
 84 #  define platform_pci_map_single       ia64_mv.map_single
 85 #  define platform_pci_unmap_single     ia64_mv.unmap_single
 86 #  define platform_pci_map_sg           ia64_mv.map_sg
 87 #  define platform_pci_unmap_sg         ia64_mv.unmap_sg
 88 #  define platform_pci_dma_sync_single  ia64_mv.sync_single
 89 #  define platform_pci_dma_sync_sg      ia64_mv.sync_sg
 90 #  define platform_pci_dma_address      ia64_mv.dma_address
 91 #  define platform_inb          ia64_mv.inb
 92 #  define platform_inw          ia64_mv.inw
 93 #  define platform_inl          ia64_mv.inl
 94 #  define platform_outb         ia64_mv.outb
 95 #  define platform_outw         ia64_mv.outw
 96 #  define platform_outl         ia64_mv.outl
 97 # endif
 98 
 99 struct ia64_machine_vector {
100         const char *name;
101         ia64_mv_setup_t *setup;
102         ia64_mv_irq_init_t *irq_init;
103         ia64_mv_pci_fixup_t *pci_fixup;
104         ia64_mv_map_nr_t *map_nr;
105         ia64_mv_mca_init_t *mca_init;
106         ia64_mv_mca_handler_t *mca_handler;
107         ia64_mv_cmci_handler_t *cmci_handler;
108         ia64_mv_log_print_t *log_print;
109         ia64_mv_send_ipi_t *send_ipi;
110         ia64_mv_pci_dma_init *dma_init;
111         ia64_mv_pci_alloc_consistent *alloc_consistent;
112         ia64_mv_pci_free_consistent *free_consistent;
113         ia64_mv_pci_map_single *map_single;
114         ia64_mv_pci_unmap_single *unmap_single;
115         ia64_mv_pci_map_sg *map_sg;
116         ia64_mv_pci_unmap_sg *unmap_sg;
117         ia64_mv_pci_dma_sync_single *sync_single;
118         ia64_mv_pci_dma_sync_sg *sync_sg;
119         ia64_mv_pci_dma_address *dma_address;
120         ia64_mv_inb_t *inb;
121         ia64_mv_inw_t *inw;
122         ia64_mv_inl_t *inl;
123         ia64_mv_outb_t *outb;
124         ia64_mv_outw_t *outw;
125         ia64_mv_outl_t *outl;
126 };
127 
128 #define MACHVEC_INIT(name)                      \
129 {                                               \
130         #name,                                  \
131         platform_setup,                         \
132         platform_irq_init,                      \
133         platform_pci_fixup,                     \
134         platform_map_nr,                        \
135         platform_mca_init,                      \
136         platform_mca_handler,                   \
137         platform_cmci_handler,                  \
138         platform_log_print,                     \
139         platform_send_ipi,                      \
140         platform_pci_dma_init,                  \
141         platform_pci_alloc_consistent,          \
142         platform_pci_free_consistent,           \
143         platform_pci_map_single,                \
144         platform_pci_unmap_single,              \
145         platform_pci_map_sg,                    \
146         platform_pci_unmap_sg,                  \
147         platform_pci_dma_sync_single,           \
148         platform_pci_dma_sync_sg,               \
149         platform_pci_dma_address,               \
150         platform_inb,                           \
151         platform_inw,                           \
152         platform_inl,                           \
153         platform_outb,                          \
154         platform_outw,                          \
155         platform_outl                           \
156 }
157 
158 extern struct ia64_machine_vector ia64_mv;
159 extern void machvec_init (const char *name);
160 
161 # else
162 #  error Unknown configuration.  Update asm-ia64/machvec.h.
163 # endif /* CONFIG_IA64_GENERIC */
164 
165 /*
166  * Declare default routines which aren't declared anywhere else:
167  */
168 extern ia64_mv_pci_dma_init swiotlb_init;
169 extern ia64_mv_pci_alloc_consistent swiotlb_alloc_consistent;
170 extern ia64_mv_pci_free_consistent swiotlb_free_consistent;
171 extern ia64_mv_pci_map_single swiotlb_map_single;
172 extern ia64_mv_pci_unmap_single swiotlb_unmap_single;
173 extern ia64_mv_pci_map_sg swiotlb_map_sg;
174 extern ia64_mv_pci_unmap_sg swiotlb_unmap_sg;
175 extern ia64_mv_pci_dma_sync_single swiotlb_sync_single;
176 extern ia64_mv_pci_dma_sync_sg swiotlb_sync_sg;
177 extern ia64_mv_pci_dma_address swiotlb_dma_address;
178 
179 /*
180  * Define default versions so we can extend machvec for new platforms without having
181  * to update the machvec files for all existing platforms.
182  */
183 #ifndef platform_setup
184 # define platform_setup         ((ia64_mv_setup_t *) machvec_noop)
185 #endif
186 #ifndef platform_irq_init
187 # define platform_irq_init      ((ia64_mv_irq_init_t *) machvec_noop)
188 #endif
189 #ifndef platform_mca_init
190 # define platform_mca_init      ((ia64_mv_mca_init_t *) machvec_noop)
191 #endif
192 #ifndef platform_mca_handler
193 # define platform_mca_handler   ((ia64_mv_mca_handler_t *) machvec_noop)
194 #endif
195 #ifndef platform_cmci_handler
196 # define platform_cmci_handler  ((ia64_mv_cmci_handler_t *) machvec_noop)
197 #endif
198 #ifndef platform_log_print
199 # define platform_log_print     ((ia64_mv_log_print_t *) machvec_noop)
200 #endif
201 #ifndef platform_pci_fixup
202 # define platform_pci_fixup     ((ia64_mv_pci_fixup_t *) machvec_noop)
203 #endif
204 #ifndef platform_send_ipi
205 # define platform_send_ipi      ia64_send_ipi   /* default to architected version */
206 #endif
207 #ifndef platform_pci_dma_init
208 # define platform_pci_dma_init          swiotlb_init
209 #endif
210 #ifndef platform_pci_alloc_consistent
211 # define platform_pci_alloc_consistent  swiotlb_alloc_consistent
212 #endif
213 #ifndef platform_pci_free_consistent
214 # define platform_pci_free_consistent   swiotlb_free_consistent
215 #endif
216 #ifndef platform_pci_map_single
217 # define platform_pci_map_single        swiotlb_map_single
218 #endif
219 #ifndef platform_pci_unmap_single
220 # define platform_pci_unmap_single      swiotlb_unmap_single
221 #endif
222 #ifndef platform_pci_map_sg
223 # define platform_pci_map_sg            swiotlb_map_sg
224 #endif
225 #ifndef platform_pci_unmap_sg
226 # define platform_pci_unmap_sg          swiotlb_unmap_sg
227 #endif
228 #ifndef platform_pci_dma_sync_single
229 # define platform_pci_dma_sync_single   swiotlb_sync_single
230 #endif
231 #ifndef platform_pci_dma_sync_sg
232 # define platform_pci_dma_sync_sg       swiotlb_sync_sg
233 #endif
234 #ifndef platform_pci_dma_address
235 # define  platform_pci_dma_address      swiotlb_dma_address
236 #endif
237 #ifndef platform_inb
238 # define platform_inb           __ia64_inb
239 #endif
240 #ifndef platform_inw
241 # define platform_inw           __ia64_inw
242 #endif
243 #ifndef platform_inl
244 # define platform_inl           __ia64_inl
245 #endif
246 #ifndef platform_outb
247 # define platform_outb          __ia64_outb
248 #endif
249 #ifndef platform_outw
250 # define platform_outw          __ia64_outw
251 #endif
252 #ifndef platform_outl
253 # define platform_outl          __ia64_outl
254 #endif
255 
256 #endif /* _ASM_IA64_MACHVEC_H */
257 

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

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.