1706f2543Smrg/* 2706f2543Smrg * Copyright (c) 1997-2003 by The XFree86 Project, Inc. 3706f2543Smrg * 4706f2543Smrg * Permission is hereby granted, free of charge, to any person obtaining a 5706f2543Smrg * copy of this software and associated documentation files (the "Software"), 6706f2543Smrg * to deal in the Software without restriction, including without limitation 7706f2543Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8706f2543Smrg * and/or sell copies of the Software, and to permit persons to whom the 9706f2543Smrg * Software is furnished to do so, subject to the following conditions: 10706f2543Smrg * 11706f2543Smrg * The above copyright notice and this permission notice shall be included in 12706f2543Smrg * all copies or substantial portions of the Software. 13706f2543Smrg * 14706f2543Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15706f2543Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16706f2543Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17706f2543Smrg * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18706f2543Smrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19706f2543Smrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20706f2543Smrg * OTHER DEALINGS IN THE SOFTWARE. 21706f2543Smrg * 22706f2543Smrg * Except as contained in this notice, the name of the copyright holder(s) 23706f2543Smrg * and author(s) shall not be used in advertising or otherwise to promote 24706f2543Smrg * the sale, use or other dealings in this Software without prior written 25706f2543Smrg * authorization from the copyright holder(s) and author(s). 26706f2543Smrg */ 27706f2543Smrg 28706f2543Smrg/* 29706f2543Smrg * This file contains definitions of the bus-related data structures/types. 30706f2543Smrg * Everything contained here is private to xf86Bus.c. In particular the 31706f2543Smrg * video drivers must not include this file. 32706f2543Smrg */ 33706f2543Smrg 34706f2543Smrg#ifdef HAVE_XORG_CONFIG_H 35706f2543Smrg#include <xorg-config.h> 36706f2543Smrg#endif 37706f2543Smrg 38706f2543Smrg#ifndef _XF86_BUS_H 39706f2543Smrg#define _XF86_BUS_H 40706f2543Smrg 41706f2543Smrg#include "xf86pciBus.h" 42706f2543Smrg#if defined(__sparc__) || defined(__sparc) 43706f2543Smrg#include "xf86sbusBus.h" 44706f2543Smrg#endif 45706f2543Smrg 46706f2543Smrgtypedef struct { 47706f2543Smrg DriverPtr driver; 48706f2543Smrg int chipset; 49706f2543Smrg int entityProp; 50706f2543Smrg EntityProc entityInit; 51706f2543Smrg EntityProc entityEnter; 52706f2543Smrg EntityProc entityLeave; 53706f2543Smrg pointer private; 54706f2543Smrg Bool active; 55706f2543Smrg Bool inUse; 56706f2543Smrg BusRec bus; 57706f2543Smrg int lastScrnFlag; 58706f2543Smrg DevUnion * entityPrivates; 59706f2543Smrg int numInstances; 60706f2543Smrg GDevPtr * devices; 61706f2543Smrg IOADDRESS domainIO; 62706f2543Smrg} EntityRec, *EntityPtr; 63706f2543Smrg 64706f2543Smrg#define ACCEL_IS_SHARABLE 0x100 65706f2543Smrg#define IS_SHARED_ACCEL 0x200 66706f2543Smrg#define SA_PRIM_INIT_DONE 0x400 67706f2543Smrg 68706f2543Smrgextern EntityPtr *xf86Entities; 69706f2543Smrgextern int xf86NumEntities; 70706f2543Smrgextern BusRec primaryBus; 71706f2543Smrg 72706f2543Smrgint xf86AllocateEntity(void); 73706f2543SmrgBusType StringToBusType(const char* busID, const char **retID); 74706f2543Smrg 75706f2543Smrg#endif /* _XF86_BUS_H */ 76