2 * Copyright 2013 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
15 /* This file is machine-generated; DO NOT EDIT! */
16 #include "gxio/iorpc_uart.h"
18 struct cfg_interrupt_param
{
19 union iorpc_interrupt interrupt
;
22 int gxio_uart_cfg_interrupt(gxio_uart_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_UART_OP_CFG_INTERRUPT
);
37 EXPORT_SYMBOL(gxio_uart_cfg_interrupt
);
39 struct get_mmio_base_param
{
43 int gxio_uart_get_mmio_base(gxio_uart_context_t
*context
, HV_PTE
*base
)
46 struct get_mmio_base_param temp
;
47 struct get_mmio_base_param
*params
= &temp
;
50 hv_dev_pread(context
->fd
, 0, (HV_VirtAddr
) params
, sizeof(*params
),
51 GXIO_UART_OP_GET_MMIO_BASE
);
57 EXPORT_SYMBOL(gxio_uart_get_mmio_base
);
59 struct check_mmio_offset_param
{
64 int gxio_uart_check_mmio_offset(gxio_uart_context_t
*context
,
65 unsigned long offset
, unsigned long size
)
67 struct check_mmio_offset_param temp
;
68 struct check_mmio_offset_param
*params
= &temp
;
70 params
->offset
= offset
;
73 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
74 sizeof(*params
), GXIO_UART_OP_CHECK_MMIO_OFFSET
);
77 EXPORT_SYMBOL(gxio_uart_check_mmio_offset
);