All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: linux-acpi@vger.kernel.org
Cc: Zhao Yakui <yakui.zhao@intel.com>,
	Alexey Starikovskiy <astarikovskiy@suse.de>
Subject: [PATCH 08/11] ACPI: remove ACPI dependency on PCI
Date: Wed, 05 Nov 2008 16:18:13 -0700	[thread overview]
Message-ID: <20081105231813.26131.16551.stgit@bob.kio> (raw)
In-Reply-To: <20081105231710.26131.3110.stgit@bob.kio>

Allow ACPI to build without CONFIG_PCI.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
---
 drivers/acpi/Kconfig           |    1 -
 drivers/acpi/osl.c             |    8 ++++++++
 drivers/acpi/reboot.c          |    7 +++++--
 drivers/pnp/pnpacpi/rsparser.c |    6 ++++--
 4 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 7962bfc..2e6f757 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -6,7 +6,6 @@ menuconfig ACPI
 	bool "ACPI (Advanced Configuration and Power Interface) Support"
 	depends on !IA64_HP_SIM
 	depends on IA64 || X86
-	depends on PCI
 	depends on PM
 	select PNP
 	default y
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 4be2521..e162be5 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -546,6 +546,7 @@ acpi_status
 acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
 			       u32 *value, u32 width)
 {
+#ifdef CONFIG_PCI
 	int result, size;
 
 	if (!value)
@@ -570,12 +571,16 @@ acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
 				reg, size, value);
 
 	return (result ? AE_ERROR : AE_OK);
+#else
+	return AE_ERROR;
+#endif
 }
 
 acpi_status
 acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
 				acpi_integer value, u32 width)
 {
+#ifdef CONFIG_PCI
 	int result, size;
 
 	switch (width) {
@@ -597,6 +602,9 @@ acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
 				reg, size, value);
 
 	return (result ? AE_ERROR : AE_OK);
+#else
+	return AE_ERROR;
+#endif
 }
 
 /* TODO: Change code to take advantage of driver model more */
diff --git a/drivers/acpi/reboot.c b/drivers/acpi/reboot.c
index 755baf2..a5af8b7 100644
--- a/drivers/acpi/reboot.c
+++ b/drivers/acpi/reboot.c
@@ -6,9 +6,11 @@
 void acpi_reboot(void)
 {
 	struct acpi_generic_address *rr;
-	struct pci_bus *bus0;
 	u8 reset_value;
+#ifdef CONFIG_PCI
+	struct pci_bus *bus0;
 	unsigned int devfn;
+#endif
 
 	if (acpi_disabled)
 		return;
@@ -44,6 +46,7 @@ void acpi_reboot(void)
 	/* The reset register can only exist in I/O, Memory or PCI config space
 	 * on a device on bus 0. */
 	switch (rr->space_id) {
+#ifdef CONFIG_PCI
 	case ACPI_ADR_SPACE_PCI_CONFIG:
 		/* The reset register can only live on bus 0. */
 		bus0 = pci_find_bus(0, 0);
@@ -57,7 +60,7 @@ void acpi_reboot(void)
 		pci_bus_write_config_byte(bus0, devfn,
 				(rr->address & 0xffff), reset_value);
 		break;
-
+#endif
 	case ACPI_ADR_SPACE_SYSTEM_MEMORY:
 	case ACPI_ADR_SPACE_SYSTEM_IO:
 		printk(KERN_DEBUG "ACPI MEMORY or I/O RESET_REG.\n");
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index adf1785..96992db 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -124,9 +124,11 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_dev *dev,
 
 	flags = irq_flags(triggering, polarity, shareable);
 	irq = acpi_register_gsi(gsi, triggering, polarity);
-	if (irq >= 0)
+	if (irq >= 0) {
+#ifdef CONFIG_PCI
 		pcibios_penalize_isa_irq(irq, 1);
-	else
+#endif
+	} else
 		flags |= IORESOURCE_DISABLED;
 
 	pnp_add_irq_resource(dev, irq, flags);


  parent reply	other threads:[~2008-11-05 23:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-05 23:17 [PATCH 00/11] RFC: various ACPI core cleanups Bjorn Helgaas
2008-11-05 23:17 ` [PATCH 01/11] ACPI: update debug parameter documentation Bjorn Helgaas
2008-11-06 20:29   ` Len Brown
2008-11-06 21:22     ` Bjorn Helgaas
2008-11-06 22:15       ` Len Brown
2008-11-06 22:24         ` Randy Dunlap
2008-11-05 23:17 ` [PATCH 02/11] ACPI: remove comments about debug layer/level to use Bjorn Helgaas
2008-11-06 20:30   ` Len Brown
2008-11-05 23:17 ` [PATCH 03/11] ACPI: SBS: remove useless acpi_cm_sbs_init() initcall Bjorn Helgaas
2008-11-06 20:31   ` Len Brown
2008-11-05 23:17 ` [PATCH 04/11] ACPI: pci_link: remove acpi_irq_balance_set() interface Bjorn Helgaas
2008-11-06 20:41   ` Len Brown
2008-11-05 23:17 ` [PATCH 05/11] ACPI: remove CONFIG_ACPI_POWER Bjorn Helgaas
2008-11-06 20:42   ` Len Brown
2008-11-05 23:18 ` [PATCH 06/11] ACPI: remove CONFIG_ACPI_EC Bjorn Helgaas
2008-11-06 20:57   ` Len Brown
2008-11-05 23:18 ` [PATCH 07/11] ACPI: add CONFIG_ACPI_PCI Bjorn Helgaas
2008-11-06 19:41   ` Bjorn Helgaas
2008-11-05 23:18 ` Bjorn Helgaas [this message]
2008-11-05 23:18 ` [PATCH 09/11] ACPI: remove ACPI dependency on PM Bjorn Helgaas
2008-11-05 23:18 ` [PATCH 10/11] ia64: remove automatic PM selection Bjorn Helgaas
2008-11-05 23:18 ` [PATCH 11/11] ACPI: call core init functions explicitly instead of using initcalls Bjorn Helgaas
2008-11-06 22:02   ` Len Brown
2008-11-06 23:40     ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081105231813.26131.16551.stgit@bob.kio \
    --to=bjorn.helgaas@hp.com \
    --cc=astarikovskiy@suse.de \
    --cc=linux-acpi@vger.kernel.org \
    --cc=yakui.zhao@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.