Linux-2.6.12-rc2
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / pci / hotplug / pciehprm.h
blob966775ffb0ffcde90b3d3add9dd6b71bc72af1e5
1 /*
2 * PCIEHPRM : PCIEHP Resource Manager for ACPI/non-ACPI platform
4 * Copyright (C) 1995,2001 Compaq Computer Corporation
5 * Copyright (C) 2001,2003 Greg Kroah-Hartman (greg@kroah.com)
6 * Copyright (C) 2001 IBM Corp.
7 * Copyright (C) 2003-2004 Intel Corporation
9 * All rights reserved.
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or (at
14 * your option) any later version.
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
19 * NON INFRINGEMENT. See the GNU General Public License for more
20 * details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com>
30 #ifndef _PCIEHPRM_H_
31 #define _PCIEHPRM_H_
33 #ifdef CONFIG_HOTPLUG_PCI_PCIE_PHPRM_NONACPI
34 #include "pciehprm_nonacpi.h"
35 #endif
37 int pciehprm_init(enum php_ctlr_type ct);
38 void pciehprm_cleanup(void);
39 int pciehprm_print_pirt(void);
40 int pciehprm_find_available_resources(struct controller *ctrl);
41 int pciehprm_set_hpp(struct controller *ctrl, struct pci_func *func, u8 card_type);
42 void pciehprm_enable_card(struct controller *ctrl, struct pci_func *func, u8 card_type);
44 #ifdef DEBUG
45 #define RES_CHECK(this, bits) \
46 { if (((this) & (bits - 1))) \
47 printk("%s:%d ERR: potential res loss!\n", __FUNCTION__, __LINE__); }
48 #else
49 #define RES_CHECK(this, bits)
50 #endif
52 #endif /* _PCIEHPRM_H_ */