Merge branch 'lpc32xx/dts' of git://git.antcom.de/linux-2.6 into next/dt
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / tile / include / gxio / iorpc_trio.h
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 #ifndef __GXIO_TRIO_LINUX_RPC_H__
17 #define __GXIO_TRIO_LINUX_RPC_H__
18
19 #include <hv/iorpc.h>
20
21 #include <hv/drv_trio_intf.h>
22 #include <gxio/trio.h>
23 #include <gxio/kiorpc.h>
24 #include <linux/string.h>
25 #include <linux/module.h>
26 #include <asm/pgtable.h>
27
28 #define GXIO_TRIO_OP_ALLOC_ASIDS       IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1400)
29
30 #define GXIO_TRIO_OP_ALLOC_MEMORY_MAPS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1402)
31
32 #define GXIO_TRIO_OP_ALLOC_PIO_REGIONS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x140e)
33 #define GXIO_TRIO_OP_INIT_PIO_REGION_AUX IORPC_OPCODE(IORPC_FORMAT_NONE, 0x140f)
34
35 #define GXIO_TRIO_OP_INIT_MEMORY_MAP_MMU_AUX IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1417)
36 #define GXIO_TRIO_OP_GET_PORT_PROPERTY IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1418)
37 #define GXIO_TRIO_OP_CONFIG_LEGACY_INTR IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x1419)
38 #define GXIO_TRIO_OP_CONFIG_MSI_INTR   IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x141a)
39
40 #define GXIO_TRIO_OP_SET_MPS_MRS       IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141c)
41 #define GXIO_TRIO_OP_FORCE_RC_LINK_UP  IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141d)
42 #define GXIO_TRIO_OP_FORCE_EP_LINK_UP  IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141e)
43 #define GXIO_TRIO_OP_GET_MMIO_BASE     IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000)
44 #define GXIO_TRIO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001)
45
46 int gxio_trio_alloc_asids(gxio_trio_context_t * context, unsigned int count,
47                           unsigned int first, unsigned int flags);
48
49
50 int gxio_trio_alloc_memory_maps(gxio_trio_context_t * context,
51                                 unsigned int count, unsigned int first,
52                                 unsigned int flags);
53
54
55 int gxio_trio_alloc_pio_regions(gxio_trio_context_t * context,
56                                 unsigned int count, unsigned int first,
57                                 unsigned int flags);
58
59 int gxio_trio_init_pio_region_aux(gxio_trio_context_t * context,
60                                   unsigned int pio_region, unsigned int mac,
61                                   uint32_t bus_address_hi, unsigned int flags);
62
63
64 int gxio_trio_init_memory_map_mmu_aux(gxio_trio_context_t * context,
65                                       unsigned int map, unsigned long va,
66                                       uint64_t size, unsigned int asid,
67                                       unsigned int mac, uint64_t bus_address,
68                                       unsigned int node,
69                                       unsigned int order_mode);
70
71 int gxio_trio_get_port_property(gxio_trio_context_t * context,
72                                 struct pcie_trio_ports_property *trio_ports);
73
74 int gxio_trio_config_legacy_intr(gxio_trio_context_t * context, int inter_x,
75                                  int inter_y, int inter_ipi, int inter_event,
76                                  unsigned int mac, unsigned int intx);
77
78 int gxio_trio_config_msi_intr(gxio_trio_context_t * context, int inter_x,
79                               int inter_y, int inter_ipi, int inter_event,
80                               unsigned int mac, unsigned int mem_map,
81                               uint64_t mem_map_base, uint64_t mem_map_limit,
82                               unsigned int asid);
83
84
85 int gxio_trio_set_mps_mrs(gxio_trio_context_t * context, uint16_t mps,
86                           uint16_t mrs, unsigned int mac);
87
88 int gxio_trio_force_rc_link_up(gxio_trio_context_t * context, unsigned int mac);
89
90 int gxio_trio_force_ep_link_up(gxio_trio_context_t * context, unsigned int mac);
91
92 int gxio_trio_get_mmio_base(gxio_trio_context_t * context, HV_PTE *base);
93
94 int gxio_trio_check_mmio_offset(gxio_trio_context_t * context,
95                                 unsigned long offset, unsigned long size);
96
97 #endif /* !__GXIO_TRIO_LINUX_RPC_H__ */