Back to home page

LXR

 
 

    


0001 /*
0002  * Copyright 2012 Tilera Corporation. All Rights Reserved.
0003  *
0004  *   This program is free software; you can redistribute it and/or
0005  *   modify it under the terms of the GNU General Public License
0006  *   as published by the Free Software Foundation, version 2.
0007  *
0008  *   This program is distributed in the hope that it will be useful, but
0009  *   WITHOUT ANY WARRANTY; without even the implied warranty of
0010  *   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
0011  *   NON INFRINGEMENT.  See the GNU General Public License for
0012  *   more details.
0013  */
0014 
0015 /* This file is machine-generated; DO NOT EDIT! */
0016 #include "gxio/iorpc_usb_host.h"
0017 
0018 struct cfg_interrupt_param {
0019     union iorpc_interrupt interrupt;
0020 };
0021 
0022 int gxio_usb_host_cfg_interrupt(gxio_usb_host_context_t *context, int inter_x,
0023                 int inter_y, int inter_ipi, int inter_event)
0024 {
0025     struct cfg_interrupt_param temp;
0026     struct cfg_interrupt_param *params = &temp;
0027 
0028     params->interrupt.kernel.x = inter_x;
0029     params->interrupt.kernel.y = inter_y;
0030     params->interrupt.kernel.ipi = inter_ipi;
0031     params->interrupt.kernel.event = inter_event;
0032 
0033     return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
0034                  sizeof(*params), GXIO_USB_HOST_OP_CFG_INTERRUPT);
0035 }
0036 
0037 EXPORT_SYMBOL(gxio_usb_host_cfg_interrupt);
0038 
0039 struct register_client_memory_param {
0040     HV_PTE pte;
0041     unsigned int flags;
0042 };
0043 
0044 int gxio_usb_host_register_client_memory(gxio_usb_host_context_t *context,
0045                      HV_PTE pte, unsigned int flags)
0046 {
0047     struct register_client_memory_param temp;
0048     struct register_client_memory_param *params = &temp;
0049 
0050     params->pte = pte;
0051     params->flags = flags;
0052 
0053     return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
0054                  sizeof(*params),
0055                  GXIO_USB_HOST_OP_REGISTER_CLIENT_MEMORY);
0056 }
0057 
0058 EXPORT_SYMBOL(gxio_usb_host_register_client_memory);
0059 
0060 struct get_mmio_base_param {
0061     HV_PTE base;
0062 };
0063 
0064 int gxio_usb_host_get_mmio_base(gxio_usb_host_context_t *context, HV_PTE *base)
0065 {
0066     int __result;
0067     struct get_mmio_base_param temp;
0068     struct get_mmio_base_param *params = &temp;
0069 
0070     __result =
0071         hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params),
0072              GXIO_USB_HOST_OP_GET_MMIO_BASE);
0073     *base = params->base;
0074 
0075     return __result;
0076 }
0077 
0078 EXPORT_SYMBOL(gxio_usb_host_get_mmio_base);
0079 
0080 struct check_mmio_offset_param {
0081     unsigned long offset;
0082     unsigned long size;
0083 };
0084 
0085 int gxio_usb_host_check_mmio_offset(gxio_usb_host_context_t *context,
0086                     unsigned long offset, unsigned long size)
0087 {
0088     struct check_mmio_offset_param temp;
0089     struct check_mmio_offset_param *params = &temp;
0090 
0091     params->offset = offset;
0092     params->size = size;
0093 
0094     return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
0095                  sizeof(*params),
0096                  GXIO_USB_HOST_OP_CHECK_MMIO_OFFSET);
0097 }
0098 
0099 EXPORT_SYMBOL(gxio_usb_host_check_mmio_offset);