Back to home page

LXR

 
 

    


0001 /*
0002  * Copyright 2013 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_uart.h"
0017 
0018 struct cfg_interrupt_param {
0019     union iorpc_interrupt interrupt;
0020 };
0021 
0022 int gxio_uart_cfg_interrupt(gxio_uart_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_UART_OP_CFG_INTERRUPT);
0035 }
0036 
0037 EXPORT_SYMBOL(gxio_uart_cfg_interrupt);
0038 
0039 struct get_mmio_base_param {
0040     HV_PTE base;
0041 };
0042 
0043 int gxio_uart_get_mmio_base(gxio_uart_context_t *context, HV_PTE *base)
0044 {
0045     int __result;
0046     struct get_mmio_base_param temp;
0047     struct get_mmio_base_param *params = &temp;
0048 
0049     __result =
0050         hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params),
0051              GXIO_UART_OP_GET_MMIO_BASE);
0052     *base = params->base;
0053 
0054     return __result;
0055 }
0056 
0057 EXPORT_SYMBOL(gxio_uart_get_mmio_base);
0058 
0059 struct check_mmio_offset_param {
0060     unsigned long offset;
0061     unsigned long size;
0062 };
0063 
0064 int gxio_uart_check_mmio_offset(gxio_uart_context_t *context,
0065                 unsigned long offset, unsigned long size)
0066 {
0067     struct check_mmio_offset_param temp;
0068     struct check_mmio_offset_param *params = &temp;
0069 
0070     params->offset = offset;
0071     params->size = size;
0072 
0073     return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
0074                  sizeof(*params), GXIO_UART_OP_CHECK_MMIO_OFFSET);
0075 }
0076 
0077 EXPORT_SYMBOL(gxio_uart_check_mmio_offset);