]> Pileus Git - ~andy/linux/blob - arch/tile/gxio/iorpc_mpipe_info.c
Merge tag 'renesas-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[~andy/linux] / arch / tile / gxio / iorpc_mpipe_info.c
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_mpipe_info.h"
17
18
19 struct instance_aux_param {
20         _gxio_mpipe_link_name_t name;
21 };
22
23 int gxio_mpipe_info_instance_aux(gxio_mpipe_info_context_t * context,
24                                  _gxio_mpipe_link_name_t name)
25 {
26         struct instance_aux_param temp;
27         struct instance_aux_param *params = &temp;
28
29         params->name = name;
30
31         return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
32                              sizeof(*params), GXIO_MPIPE_INFO_OP_INSTANCE_AUX);
33 }
34
35 EXPORT_SYMBOL(gxio_mpipe_info_instance_aux);
36
37 struct enumerate_aux_param {
38         _gxio_mpipe_link_name_t name;
39         _gxio_mpipe_link_mac_t mac;
40 };
41
42 int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t * context,
43                                   unsigned int idx,
44                                   _gxio_mpipe_link_name_t * name,
45                                   _gxio_mpipe_link_mac_t * mac)
46 {
47         int __result;
48         struct enumerate_aux_param temp;
49         struct enumerate_aux_param *params = &temp;
50
51         __result =
52             hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params),
53                          (((uint64_t) idx << 32) |
54                           GXIO_MPIPE_INFO_OP_ENUMERATE_AUX));
55         *name = params->name;
56         *mac = params->mac;
57
58         return __result;
59 }
60
61 EXPORT_SYMBOL(gxio_mpipe_info_enumerate_aux);
62
63 struct get_mmio_base_param {
64         HV_PTE base;
65 };
66
67 int gxio_mpipe_info_get_mmio_base(gxio_mpipe_info_context_t * context,
68                                   HV_PTE *base)
69 {
70         int __result;
71         struct get_mmio_base_param temp;
72         struct get_mmio_base_param *params = &temp;
73
74         __result =
75             hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params),
76                          GXIO_MPIPE_INFO_OP_GET_MMIO_BASE);
77         *base = params->base;
78
79         return __result;
80 }
81
82 EXPORT_SYMBOL(gxio_mpipe_info_get_mmio_base);
83
84 struct check_mmio_offset_param {
85         unsigned long offset;
86         unsigned long size;
87 };
88
89 int gxio_mpipe_info_check_mmio_offset(gxio_mpipe_info_context_t * context,
90                                       unsigned long offset, unsigned long size)
91 {
92         struct check_mmio_offset_param temp;
93         struct check_mmio_offset_param *params = &temp;
94
95         params->offset = offset;
96         params->size = size;
97
98         return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
99                              sizeof(*params),
100                              GXIO_MPIPE_INFO_OP_CHECK_MMIO_OFFSET);
101 }
102
103 EXPORT_SYMBOL(gxio_mpipe_info_check_mmio_offset);