linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH 1/3] [POWERPC] implement machine specific PCI fixup calls
Date: Thu, 8 May 2008 18:20:45 +0400	[thread overview]
Message-ID: <20080508142045.GA7172@polina.dev.rtsoft.ru> (raw)
In-Reply-To: <20080508142005.GA6749@polina.dev.rtsoft.ru>

These are similar to machine_initcalls, but works for the PCI fixups.
We need this to apply machine specific fixups for the same PCI devices.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 include/asm-powerpc/pci.h |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h
index a05a942..03fdc58 100644
--- a/include/asm-powerpc/pci.h
+++ b/include/asm-powerpc/pci.h
@@ -224,5 +224,21 @@ extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
 extern void pcibios_do_bus_setup(struct pci_bus *bus);
 extern void pcibios_fixup_of_probed_bus(struct pci_bus *bus);
 
+#define DEFINE_MACHINE_PCIFIXUP(type, mach, vendor, device, hook)        \
+	static void __devinit                                            \
+	__machine_pcifixup_##mach##_##hook(struct pci_dev *dev) {        \
+		if (machine_is(mach))                                    \
+			hook(dev);                                       \
+	}                                                                \
+	DECLARE_PCI_FIXUP_##type(vendor, device,                         \
+				 __machine_pcifixup_##mach##_##hook)
+
+#define MACH_PCI_FIXUP_EARLY(mach, vendor, device, hook) \
+	DEFINE_MACHINE_PCIFIXUP(EARLY, mach, vendor, device, hook)
+#define MACH_PCI_FIXUP_FINAL(mach, vendor, device, hook) \
+	DEFINE_MACHINE_PCIFIXUP(FINAL, mach, vendor, device, hook)
+#define MACH_PCI_FIXUP_HEADER(mach, vendor, device, hook) \
+	DEFINE_MACHINE_PCIFIXUP(HEADER, mach, vendor, device, hook)
+
 #endif	/* __KERNEL__ */
 #endif /* __ASM_POWERPC_PCI_H */
-- 
1.5.5.1

  reply	other threads:[~2008-05-08 14:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08 14:20 [RFC PATCH 0/3] Board-specific PCI fixups [was: Re: [PATCH 2/2] [POWERPC] 86xx: mpc8610_hpcd: add support for ULI RTC] Anton Vorontsov
2008-05-08 14:20 ` Anton Vorontsov [this message]
2008-05-08 14:20 ` [PATCH 2/3] [POWERPC] turn fsl_uli1575 into PCI fixups library Anton Vorontsov
2008-05-08 14:20 ` [PATCH 3/3] [POWERPC] fsl_uli1575: change RTC quirk to work on MPC8610HPCD Anton Vorontsov
2008-05-15 16:20 ` [RFC PATCH 0/3] Board-specific PCI fixups [was: Re: [PATCH 2/2] [POWERPC] 86xx: mpc8610_hpcd: add support for ULI RTC] Anton Vorontsov
2008-05-15 23:50   ` Stephen Rothwell
2008-05-16 11:21     ` Anton Vorontsov

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=20080508142045.GA7172@polina.dev.rtsoft.ru \
    --to=avorontsov@ru.mvista.com \
    --cc=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).