Linux 4.13.16
[linux/fpc-iii.git] / arch / tile / gxio / iorpc_usb_host.c
blob9c820073bfc01bcdc92c946e904c1a600eb801a8
1 /*
2 * Copyright 2012 Tilera Corporation. All Rights Reserved.
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.
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.
15 /* This file is machine-generated; DO NOT EDIT! */
16 #include "gxio/iorpc_usb_host.h"
18 struct cfg_interrupt_param {
19 union iorpc_interrupt interrupt;
22 int gxio_usb_host_cfg_interrupt(gxio_usb_host_context_t *context, int inter_x,
23 int inter_y, int inter_ipi, int inter_event)
25 struct cfg_interrupt_param temp;
26 struct cfg_interrupt_param *params = &temp;
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;
33 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
34 sizeof(*params), GXIO_USB_HOST_OP_CFG_INTERRUPT);
37 EXPORT_SYMBOL(gxio_usb_host_cfg_interrupt);
39 struct register_client_memory_param {
40 HV_PTE pte;
41 unsigned int flags;
44 int gxio_usb_host_register_client_memory(gxio_usb_host_context_t *context,
45 HV_PTE pte, unsigned int flags)
47 struct register_client_memory_param temp;
48 struct register_client_memory_param *params = &temp;
50 params->pte = pte;
51 params->flags = flags;
53 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
54 sizeof(*params),
55 GXIO_USB_HOST_OP_REGISTER_CLIENT_MEMORY);
58 EXPORT_SYMBOL(gxio_usb_host_register_client_memory);
60 struct get_mmio_base_param {
61 HV_PTE base;
64 int gxio_usb_host_get_mmio_base(gxio_usb_host_context_t *context, HV_PTE *base)
66 int __result;
67 struct get_mmio_base_param temp;
68 struct get_mmio_base_param *params = &temp;
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;
75 return __result;
78 EXPORT_SYMBOL(gxio_usb_host_get_mmio_base);
80 struct check_mmio_offset_param {
81 unsigned long offset;
82 unsigned long size;
85 int gxio_usb_host_check_mmio_offset(gxio_usb_host_context_t *context,
86 unsigned long offset, unsigned long size)
88 struct check_mmio_offset_param temp;
89 struct check_mmio_offset_param *params = &temp;
91 params->offset = offset;
92 params->size = size;
94 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
95 sizeof(*params),
96 GXIO_USB_HOST_OP_CHECK_MMIO_OFFSET);
99 EXPORT_SYMBOL(gxio_usb_host_check_mmio_offset);