Commit | Line | Data |
---|---|---|
d1cc1732 CM |
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_usb_host.h" | |
17 | ||
18 | struct cfg_interrupt_param { | |
19 | union iorpc_interrupt interrupt; | |
20 | }; | |
21 | ||
126eb088 | 22 | int gxio_usb_host_cfg_interrupt(gxio_usb_host_context_t *context, int inter_x, |
d1cc1732 CM |
23 | int inter_y, int inter_ipi, int inter_event) |
24 | { | |
25 | struct cfg_interrupt_param temp; | |
26 | struct cfg_interrupt_param *params = &temp; | |
27 | ||
28 | params->interrupt.kernel.x = inter_x; | |
29 | params->interrupt.kernel.y = inter_y; | |
30 | params->interrupt.kernel.ipi = inter_ipi; | |
31 | params->interrupt.kernel.event = inter_event; | |
32 | ||
33 | return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, | |
34 | sizeof(*params), GXIO_USB_HOST_OP_CFG_INTERRUPT); | |
35 | } | |
36 | ||
37 | EXPORT_SYMBOL(gxio_usb_host_cfg_interrupt); | |
38 | ||
39 | struct register_client_memory_param { | |
40 | HV_PTE pte; | |
41 | unsigned int flags; | |
42 | }; | |
43 | ||
126eb088 | 44 | int gxio_usb_host_register_client_memory(gxio_usb_host_context_t *context, |
d1cc1732 CM |
45 | HV_PTE pte, unsigned int flags) |
46 | { | |
47 | struct register_client_memory_param temp; | |
48 | struct register_client_memory_param *params = &temp; | |
49 | ||
50 | params->pte = pte; | |
51 | params->flags = flags; | |
52 | ||
53 | return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, | |
54 | sizeof(*params), | |
55 | GXIO_USB_HOST_OP_REGISTER_CLIENT_MEMORY); | |
56 | } | |
57 | ||
58 | EXPORT_SYMBOL(gxio_usb_host_register_client_memory); | |
59 | ||
60 | struct get_mmio_base_param { | |
61 | HV_PTE base; | |
62 | }; | |
63 | ||
126eb088 | 64 | int gxio_usb_host_get_mmio_base(gxio_usb_host_context_t *context, HV_PTE *base) |
d1cc1732 CM |
65 | { |
66 | int __result; | |
67 | struct get_mmio_base_param temp; | |
68 | struct get_mmio_base_param *params = &temp; | |
69 | ||
70 | __result = | |
71 | hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params), | |
72 | GXIO_USB_HOST_OP_GET_MMIO_BASE); | |
73 | *base = params->base; | |
74 | ||
75 | return __result; | |
76 | } | |
77 | ||
78 | EXPORT_SYMBOL(gxio_usb_host_get_mmio_base); | |
79 | ||
80 | struct check_mmio_offset_param { | |
81 | unsigned long offset; | |
82 | unsigned long size; | |
83 | }; | |
84 | ||
126eb088 | 85 | int gxio_usb_host_check_mmio_offset(gxio_usb_host_context_t *context, |
d1cc1732 CM |
86 | unsigned long offset, unsigned long size) |
87 | { | |
88 | struct check_mmio_offset_param temp; | |
89 | struct check_mmio_offset_param *params = &temp; | |
90 | ||
91 | params->offset = offset; | |
92 | params->size = size; | |
93 | ||
94 | return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, | |
95 | sizeof(*params), | |
96 | GXIO_USB_HOST_OP_CHECK_MMIO_OFFSET); | |
97 | } | |
98 | ||
99 | EXPORT_SYMBOL(gxio_usb_host_check_mmio_offset); |