/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/ddi_impldefs.h>
#include <sys/visual_io.h>
#include <sys/ddidmareq.h>
#include <sys/tnf_probe.h>
#include <sys/pci_cfgspace.h>
#include "gfx_private.h"
typedef struct gfxp_pci_bsf {
/* The use of pci_get?/put?_func() depends on misc/pci_autoconfig */
static int
{
int rc;
/* get "reg" property */
(sizeof (pci_regspec_t) / sizeof (int)))) {
return (DDI_FAILURE);
}
/*
* free the memory allocated by ddi_prop_lookup_int_array().
*/
return (DDI_SUCCESS);
}
static int
{
int rc;
/*
* Look for vendor-id, device-id, class-code to verify
* this is some type of PCI child node.
*/
"vendor-id", -1);
"device-id", -1);
"class-code", -1);
return (DDI_WALK_CONTINUE);
}
return (DDI_WALK_TERMINATE);
} else {
}
return (rc);
}
{
/*
* Find a PCI device based on its address, and return a unique handle
* to be used in subsequent calls to read from or write to the config
* space of this device.
*/
== NULL) {
return (NULL);
}
} else {
}
return ((gfxp_acc_handle_t)dip);
}
{
return ((uint8_t)~0);
return ((uint8_t)~0);
return (val);
}
{
return ((uint16_t)~0);
return ((uint16_t)~0);
return (val);
}
{
return ((uint32_t)~0);
return ((uint32_t)~0);
return (val);
}
void
{
return;
return;
}
void
{
return;
return;
}
void
{
return;
return;
}
static int
{
int rc;
/*
* Look for vendor-id, device-id, class-code to verify
* this is some type of PCI child node.
*/
"vendor-id", -1);
"device-id", -1);
"class-code", -1);
return (DDI_WALK_CONTINUE);
}
} else {
}
return (rc);
}
int
{
int rv;
/*
* Find a PCI device based on its device and vendor id.
*/
return (0);
rv = 1;
} else {
rv = 0;
}
return (rv);
}