/*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/*
* Copyright (c) 2012 Intel Corporation. All rights reserved.
*/
#include <sys/visual_io.h>
#include <sys/ddi_impldefs.h>
#include "drmP.h"
struct pci_dev *
{
if (!pdev)
return (NULL);
/* access handle */
if (ret != DDI_SUCCESS) {
DRM_ERROR("pci_config_setup() failed");
goto err_setup;
}
/* XXX Fix domain number (alpha hoses) */
/* bus, slot, func */
if (ret != DDI_PROP_SUCCESS) {
DRM_ERROR("ddi_prop_lookup_int_array() failed");
goto err_info;
}
/* irq */
if (ret == -1) {
DRM_ERROR("ddi_prop_get_int() failed");
goto err_irq;
}
if (ret > 0)
if (ddi_intr_hilevel(dip, 0) != 0) {
DRM_ERROR("high-level interrupts are not supported");
goto err_irq;
}
DRM_ERROR("cannot get iblock cookie");
goto err_irq;
}
/* regions */
if (ret != DDI_PROP_SUCCESS) {
DRM_ERROR("ddi_getlongprop() failed");
goto err_regions;
}
for (i = 0; i < PCI_CONFIG_REGION_NUMS; i++) {
(unsigned long)regspec[i].pci_phys_low;
(unsigned long)regspec[i].pci_size_low;
}
/* vendor, device */
return pdev;
return (NULL);
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
/* LINTED */
{
base = 0xC0000;
*size = 0x20000;
}
/* LINTED */
{
}
{
/* has capabilities list ? */
PCI_CONF_STAT) & PCI_CONF_CAP_MASK) == 0)
return (0);
while (caps_ptr != PCI_CAP_NEXT_PTR_NULL) {
return (cap);
}
return (0);
}