Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
iorpc_trio.c
Go to the documentation of this file.
1 /*
2  * Copyright 2012 Tilera Corporation. All Rights Reserved.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation, version 2.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11  * NON INFRINGEMENT. See the GNU General Public License for
12  * more details.
13  */
14 
15 /* This file is machine-generated; DO NOT EDIT! */
16 #include "gxio/iorpc_trio.h"
17 
19  unsigned int count;
20  unsigned int first;
21  unsigned int flags;
22 };
23 
25  unsigned int first, unsigned int flags)
26 {
27  struct alloc_asids_param temp;
28  struct alloc_asids_param *params = &temp;
29 
30  params->count = count;
31  params->first = first;
32  params->flags = flags;
33 
34  return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
35  sizeof(*params), GXIO_TRIO_OP_ALLOC_ASIDS);
36 }
37 
39 
40 
42  unsigned int count;
43  unsigned int first;
44  unsigned int flags;
45 };
46 
48  unsigned int count, unsigned int first,
49  unsigned int flags)
50 {
51  struct alloc_memory_maps_param temp;
53 
54  params->count = count;
55  params->first = first;
56  params->flags = flags;
57 
58  return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
59  sizeof(*params), GXIO_TRIO_OP_ALLOC_MEMORY_MAPS);
60 }
61 
63 
64 
66  unsigned int count;
67  unsigned int first;
68  unsigned int flags;
69 };
70 
72  unsigned int count, unsigned int first,
73  unsigned int flags)
74 {
75  struct alloc_pio_regions_param temp;
77 
78  params->count = count;
79  params->first = first;
80  params->flags = flags;
81 
82  return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
83  sizeof(*params), GXIO_TRIO_OP_ALLOC_PIO_REGIONS);
84 }
85 
87 
89  unsigned int pio_region;
90  unsigned int mac;
92  unsigned int flags;
93 };
94 
96  unsigned int pio_region, unsigned int mac,
97  uint32_t bus_address_hi, unsigned int flags)
98 {
99  struct init_pio_region_aux_param temp;
101 
102  params->pio_region = pio_region;
103  params->mac = mac;
104  params->bus_address_hi = bus_address_hi;
105  params->flags = flags;
106 
107  return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
108  sizeof(*params), GXIO_TRIO_OP_INIT_PIO_REGION_AUX);
109 }
110 
112 
113 
115  unsigned int map;
116  unsigned long va;
118  unsigned int asid;
119  unsigned int mac;
121  unsigned int node;
122  unsigned int order_mode;
123 };
124 
126  unsigned int map, unsigned long va,
127  uint64_t size, unsigned int asid,
128  unsigned int mac, uint64_t bus_address,
129  unsigned int node,
130  unsigned int order_mode)
131 {
132  struct init_memory_map_mmu_aux_param temp;
134 
135  params->map = map;
136  params->va = va;
137  params->size = size;
138  params->asid = asid;
139  params->mac = mac;
140  params->bus_address = bus_address;
141  params->node = node;
142  params->order_mode = order_mode;
143 
144  return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
145  sizeof(*params),
147 }
148 
150 
153 };
154 
156  struct pcie_trio_ports_property *trio_ports)
157 {
158  int __result;
159  struct get_port_property_param temp;
161 
162  __result =
163  hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params),
165  *trio_ports = params->trio_ports;
166 
167  return __result;
168 }
169 
171 
174  unsigned int mac;
175  unsigned int intx;
176 };
177 
179  int inter_y, int inter_ipi, int inter_event,
180  unsigned int mac, unsigned int intx)
181 {
182  struct config_legacy_intr_param temp;
184 
185  params->interrupt.kernel.x = inter_x;
186  params->interrupt.kernel.y = inter_y;
187  params->interrupt.kernel.ipi = inter_ipi;
188  params->interrupt.kernel.event = inter_event;
189  params->mac = mac;
190  params->intx = intx;
191 
192  return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
193  sizeof(*params), GXIO_TRIO_OP_CONFIG_LEGACY_INTR);
194 }
195 
197 
200  unsigned int mac;
201  unsigned int mem_map;
204  unsigned int asid;
205 };
206 
208  int inter_y, int inter_ipi, int inter_event,
209  unsigned int mac, unsigned int mem_map,
210  uint64_t mem_map_base, uint64_t mem_map_limit,
211  unsigned int asid)
212 {
213  struct config_msi_intr_param temp;
214  struct config_msi_intr_param *params = &temp;
215 
216  params->interrupt.kernel.x = inter_x;
217  params->interrupt.kernel.y = inter_y;
218  params->interrupt.kernel.ipi = inter_ipi;
219  params->interrupt.kernel.event = inter_event;
220  params->mac = mac;
221  params->mem_map = mem_map;
222  params->mem_map_base = mem_map_base;
223  params->mem_map_limit = mem_map_limit;
224  params->asid = asid;
225 
226  return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
227  sizeof(*params), GXIO_TRIO_OP_CONFIG_MSI_INTR);
228 }
229 
231 
232 
236  unsigned int mac;
237 };
238 
240  uint16_t mrs, unsigned int mac)
241 {
242  struct set_mps_mrs_param temp;
243  struct set_mps_mrs_param *params = &temp;
244 
245  params->mps = mps;
246  params->mrs = mrs;
247  params->mac = mac;
248 
249  return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
250  sizeof(*params), GXIO_TRIO_OP_SET_MPS_MRS);
251 }
252 
254 
256  unsigned int mac;
257 };
258 
260 {
261  struct force_rc_link_up_param temp;
263 
264  params->mac = mac;
265 
266  return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
267  sizeof(*params), GXIO_TRIO_OP_FORCE_RC_LINK_UP);
268 }
269 
271 
273  unsigned int mac;
274 };
275 
277 {
278  struct force_ep_link_up_param temp;
280 
281  params->mac = mac;
282 
283  return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
284  sizeof(*params), GXIO_TRIO_OP_FORCE_EP_LINK_UP);
285 }
286 
288 
289 struct get_mmio_base_param {
290  HV_PTE base;
291 };
292 
294 {
295  int __result;
296  struct get_mmio_base_param temp;
297  struct get_mmio_base_param *params = &temp;
298 
299  __result =
300  hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params),
302  *base = params->base;
303 
304  return __result;
305 }
306 
308 
310  unsigned long offset;
311  unsigned long size;
312 };
313 
315  unsigned long offset, unsigned long size)
316 {
317  struct check_mmio_offset_param temp;
319 
320  params->offset = offset;
321  params->size = size;
322 
323  return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
324  sizeof(*params), GXIO_TRIO_OP_CHECK_MMIO_OFFSET);
325 }
326