2 * Copyright 2009 Novell. All Rights Reserved.
4 * PCI to Virtual-Bus Bridge
7 * Gregory Haskins <ghaskins@novell.com>
9 * This file is free software; you can redistribute it and/or modify
10 * it under the terms of version 2 of the GNU General Public License
11 * as published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef _LINUX_VBUS_PCI_H
24 #define _LINUX_VBUS_PCI_H
26 #include <linux/ioctl.h>
27 #include <linux/types.h>
29 #define VBUS_PCI_ABI_MAGIC 0xbf53eef5
30 #define VBUS_PCI_ABI_VERSION 2
31 #define VBUS_PCI_HC_VERSION 1
34 VBUS_PCI_BRIDGE_NEGOTIATE
,
36 VBUS_PCI_BRIDGE_SLOWCALL
,
37 VBUS_PCI_BRIDGE_FASTCALL_ADD
,
38 VBUS_PCI_BRIDGE_FASTCALL_DROP
,
40 VBUS_PCI_BRIDGE_MAX
, /* must be last */
49 VBUS_PCI_HC_MAX
, /* must be last */
52 struct vbus_pci_bridge_negotiate
{
58 struct vbus_pci_deviceopen
{
60 __u32 version
; /* device ABI version */
61 __u64 handle
; /* return value for devh */
64 struct vbus_pci_devicecall
{
65 __u64 devh
; /* device-handle (returned from DEVICEOPEN */
72 struct vbus_pci_deviceshm
{
73 __u64 devh
; /* device-handle (returned from DEVICEOPEN */
80 __u64 cookie
; /* token to pass back when signaling client */
85 struct vbus_pci_call_desc
{
91 struct vbus_pci_fastcall_desc
{
92 struct vbus_pci_call_desc call
;
96 struct vbus_pci_regs
{
97 struct vbus_pci_call_desc bridgecall
;
101 struct vbus_pci_signals
{
108 struct vbus_pci_eventqreg
{
114 struct vbus_pci_busreg
{
115 __u32 count
; /* supporting multiple queues allows for prio, etc */
116 struct vbus_pci_eventqreg eventq
[1];
119 enum vbus_pci_eventid
{
120 VBUS_PCI_EVENT_DEVADD
,
121 VBUS_PCI_EVENT_DEVDROP
,
122 VBUS_PCI_EVENT_SHMSIGNAL
,
123 VBUS_PCI_EVENT_SHMCLOSE
,
126 #define VBUS_MAX_DEVTYPE_LEN 128
128 struct vbus_pci_add_event
{
130 char type
[VBUS_MAX_DEVTYPE_LEN
];
133 struct vbus_pci_handle_event
{
137 struct vbus_pci_event
{
140 struct vbus_pci_add_event add
;
141 struct vbus_pci_handle_event handle
;
145 #endif /* _LINUX_VBUS_PCI_H */