Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (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 or http://www.opensolaris.org/os/licensing. 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]
#include <sys/ddi.h> #include <sys/sunddi.h> int pci_report_pmcap(dev_info_t *dip, int cap, void *arg);
Pointer to the device's dev_info structure
Power management capability
Argument for the capability
PCI_PM_IDLESPEED \(em The PCI_PM_IDLESPEED value indicates the lowest PCI clock speed that a device can tolerate when idle, and is applicable only to 33 MHz PCI bus. arg represents the lowest possible idle speed in KHz (1 KHz is 1000 Hz). The integer value representing the speed should be cast to (void *)before passing as arg to pci_report_pmcap().
The special values of arg are: PCI_PM_IDLESPEED_ANY
The device can tolerate any idle clock speed.
The device cannot tolerate slowing down of PCI clock even when idle.
If the driver doesn't make this call, PCI_PM_IDLESPEED_NONE is assumed. In this case, one offending device can keep the entire bus from being power managed.
Successful reporting of the capability
Failure to report capability because of invalid argument(s)
if (pci_report_pmcap(dip, PCI_PM_IDLESPEED, PCI_PM_IDLESPEED_ANY) !=
DDI_SUCCESS)
cmn_err(CE_WARN, "%s%d: pci_report_pmcap failed\en",
ddi_driver_name(dip), ddi_get_instance(dip));
2. A device driver controls a 10/100 Mb Ethernet device which runs the device state machine on the chip from the PCI clock. For the device state machine to receive packets at 100 Mb, the PCI clock cannot drop below 4 MHz. The driver makes the following call whenever it negotiates a 100 Mb Ethernet connection:
if (pci_report_pmcap(dip, PCI_PM_IDLESPEED, (void *)4000) !=
DDI_SUCCESS)
cmn_err(CE_WARN, "%s%d: pci_report_pmcap failed\en",
ddi_driver_name(dip), ddi_get_instance(dip));
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Committed |
PCI Bus Power Management Interface Specification Version 1.1
PCI Bus Specification Revision 2.1