iorpc_trio.h 4.0 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/*
 * Copyright 2012 Tilera Corporation. All Rights Reserved.
 *
 *   This program is free software; you can redistribute it and/or
 *   modify it under the terms of the GNU General Public License
 *   as published by the Free Software Foundation, version 2.
 *
 *   This program is distributed in the hope that it will be useful, but
 *   WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
 *   NON INFRINGEMENT.  See the GNU General Public License for
 *   more details.
 */

/* This file is machine-generated; DO NOT EDIT! */
#ifndef __GXIO_TRIO_LINUX_RPC_H__
#define __GXIO_TRIO_LINUX_RPC_H__

#include <hv/iorpc.h>

#include <hv/drv_trio_intf.h>
#include <gxio/trio.h>
#include <gxio/kiorpc.h>
#include <linux/string.h>
#include <linux/module.h>
#include <asm/pgtable.h>

28 29
#define GXIO_TRIO_OP_DEALLOC_ASID      IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1400)
#define GXIO_TRIO_OP_ALLOC_ASIDS       IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1401)
30

31
#define GXIO_TRIO_OP_ALLOC_MEMORY_MAPS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1404)
32

33
#define GXIO_TRIO_OP_ALLOC_SCATTER_QUEUES IORPC_OPCODE(IORPC_FORMAT_NONE, 0x140e)
34
#define GXIO_TRIO_OP_ALLOC_PIO_REGIONS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1412)
35

36
#define GXIO_TRIO_OP_INIT_PIO_REGION_AUX IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1414)
37

38 39 40 41 42 43 44 45
#define GXIO_TRIO_OP_INIT_MEMORY_MAP_MMU_AUX IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141e)
#define GXIO_TRIO_OP_GET_PORT_PROPERTY IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141f)
#define GXIO_TRIO_OP_CONFIG_LEGACY_INTR IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x1420)
#define GXIO_TRIO_OP_CONFIG_MSI_INTR   IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x1421)

#define GXIO_TRIO_OP_SET_MPS_MRS       IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1423)
#define GXIO_TRIO_OP_FORCE_RC_LINK_UP  IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1424)
#define GXIO_TRIO_OP_FORCE_EP_LINK_UP  IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1425)
46 47 48
#define GXIO_TRIO_OP_GET_MMIO_BASE     IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000)
#define GXIO_TRIO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001)

49
int gxio_trio_alloc_asids(gxio_trio_context_t *context, unsigned int count,
50 51 52
			  unsigned int first, unsigned int flags);


53
int gxio_trio_alloc_memory_maps(gxio_trio_context_t *context,
54 55 56 57
				unsigned int count, unsigned int first,
				unsigned int flags);


58
int gxio_trio_alloc_scatter_queues(gxio_trio_context_t *context,
59 60 61
				   unsigned int count, unsigned int first,
				   unsigned int flags);

62
int gxio_trio_alloc_pio_regions(gxio_trio_context_t *context,
63 64 65
				unsigned int count, unsigned int first,
				unsigned int flags);

66
int gxio_trio_init_pio_region_aux(gxio_trio_context_t *context,
67 68 69 70
				  unsigned int pio_region, unsigned int mac,
				  uint32_t bus_address_hi, unsigned int flags);


71
int gxio_trio_init_memory_map_mmu_aux(gxio_trio_context_t *context,
72 73 74 75 76 77
				      unsigned int map, unsigned long va,
				      uint64_t size, unsigned int asid,
				      unsigned int mac, uint64_t bus_address,
				      unsigned int node,
				      unsigned int order_mode);

78
int gxio_trio_get_port_property(gxio_trio_context_t *context,
79 80
				struct pcie_trio_ports_property *trio_ports);

81
int gxio_trio_config_legacy_intr(gxio_trio_context_t *context, int inter_x,
82 83 84
				 int inter_y, int inter_ipi, int inter_event,
				 unsigned int mac, unsigned int intx);

85
int gxio_trio_config_msi_intr(gxio_trio_context_t *context, int inter_x,
86 87 88 89 90 91
			      int inter_y, int inter_ipi, int inter_event,
			      unsigned int mac, unsigned int mem_map,
			      uint64_t mem_map_base, uint64_t mem_map_limit,
			      unsigned int asid);


92
int gxio_trio_set_mps_mrs(gxio_trio_context_t *context, uint16_t mps,
93 94
			  uint16_t mrs, unsigned int mac);

95
int gxio_trio_force_rc_link_up(gxio_trio_context_t *context, unsigned int mac);
96

97
int gxio_trio_force_ep_link_up(gxio_trio_context_t *context, unsigned int mac);
98

99
int gxio_trio_get_mmio_base(gxio_trio_context_t *context, HV_PTE *base);
100

101
int gxio_trio_check_mmio_offset(gxio_trio_context_t *context,
102 103 104
				unsigned long offset, unsigned long size);

#endif /* !__GXIO_TRIO_LINUX_RPC_H__ */