linux/arch/tile/gxio/iorpc_usb_host.c
<<
>>
Prefs
   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
  18struct cfg_interrupt_param {
  19        union iorpc_interrupt interrupt;
  20};
  21
  22int gxio_usb_host_cfg_interrupt(gxio_usb_host_context_t * context, int inter_x,
  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
  37EXPORT_SYMBOL(gxio_usb_host_cfg_interrupt);
  38
  39struct register_client_memory_param {
  40        HV_PTE pte;
  41        unsigned int flags;
  42};
  43
  44int gxio_usb_host_register_client_memory(gxio_usb_host_context_t * context,
  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
  58EXPORT_SYMBOL(gxio_usb_host_register_client_memory);
  59
  60struct get_mmio_base_param {
  61        HV_PTE base;
  62};
  63
  64int gxio_usb_host_get_mmio_base(gxio_usb_host_context_t * context, HV_PTE *base)
  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
  78EXPORT_SYMBOL(gxio_usb_host_get_mmio_base);
  79
  80struct check_mmio_offset_param {
  81        unsigned long offset;
  82        unsigned long size;
  83};
  84
  85int gxio_usb_host_check_mmio_offset(gxio_usb_host_context_t * context,
  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
  99EXPORT_SYMBOL(gxio_usb_host_check_mmio_offset);
 100