8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync/*
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync *
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * Permission is hereby granted, free of charge, to any person obtaining a
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * copy of this software and associated documentation files (the "Software"),
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * to deal in the Software without restriction, including without limitation
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * and/or sell copies of the Software, and to permit persons to whom the
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * Software is furnished to do so, subject to the following conditions:
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync *
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * The above copyright notice and this permission notice shall be included in
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * all copies or substantial portions of the Software.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync *
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * OTHER DEALINGS IN THE SOFTWARE.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync *
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * Except as contained in this notice, the name of the copyright holder(s)
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * and author(s) shall not be used in advertising or otherwise to promote
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * the sale, use or other dealings in this Software without prior written
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * authorization from the copyright holder(s) and author(s).
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync */
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync/*
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * This file contains definitions of the bus-related data structures/types.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * Everything contained here is private to xf86Bus.c. In particular the
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync * video drivers must not include this file.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync */
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync#ifdef HAVE_XORG_CONFIG_H
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync#include <xorg-config.h>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync#endif
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync#ifndef _XF86_BUS_H
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync#define _XF86_BUS_H
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync#include "xf86pciBus.h"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync#if defined(__sparc__) || defined(__sparc)
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync#include "xf86sbusBus.h"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync#endif
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsynctypedef struct {
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync DriverPtr driver;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync int chipset;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync int entityProp;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync EntityProc entityInit;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync EntityProc entityEnter;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync EntityProc entityLeave;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync pointer private;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync Bool active;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync Bool inUse;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync BusRec bus;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync int lastScrnFlag;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync DevUnion * entityPrivates;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync int numInstances;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync GDevPtr * devices;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync IOADDRESS domainIO;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync} EntityRec, *EntityPtr;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync#define ACCEL_IS_SHARABLE 0x100
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync#define IS_SHARED_ACCEL 0x200
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync#define SA_PRIM_INIT_DONE 0x400
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncextern EntityPtr *xf86Entities;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncextern int xf86NumEntities;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncextern BusRec primaryBus;
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncint xf86AllocateEntity(void);
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncBusType StringToBusType(const char* busID, const char **retID);
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync#endif /* _XF86_BUS_H */