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