linux-mips
[Top] [All Lists]

[PATCH v5 3/7] MIPS: ath79: make ath724x_pcibios_init visible for extern

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH v5 3/7] MIPS: ath79: make ath724x_pcibios_init visible for external code
From: Gabor Juhos <juhosg@openwrt.org>
Date: Wed, 14 Mar 2012 11:29:23 +0100
Cc: linux-mips@linux-mips.org, juhosg@openwrt.org, René Bolldorf <xsecute@googlemail.com>
In-reply-to: <1331720967-4049-1-git-send-email-juhosg@openwrt.org>
References: <1331720967-4049-1-git-send-email-juhosg@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
Signed-off-by: René Bolldorf <xsecute@googlemail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
---
v5: - fix build error if PCI support is disabled
v4: - add a sob tag
v3: - no changes
v2: - fix a typo in my e-mail address

 arch/mips/include/asm/mach-ath79/pci.h |   20 ++++++++++++++++++++
 arch/mips/pci/pci-ath724x.c            |    3 ++-
 2 files changed, 22 insertions(+), 1 deletions(-)
 create mode 100644 arch/mips/include/asm/mach-ath79/pci.h

diff --git a/arch/mips/include/asm/mach-ath79/pci.h 
b/arch/mips/include/asm/mach-ath79/pci.h
new file mode 100644
index 0000000..e0c4b53
--- /dev/null
+++ b/arch/mips/include/asm/mach-ath79/pci.h
@@ -0,0 +1,20 @@
+/*
+ *  Atheros 724x PCI support
+ *
+ *  Copyright (C) 2011 René Bolldorf <xsecute@googlemail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#ifndef __ASM_MACH_ATH79_PCI_H
+#define __ASM_MACH_ATH79_PCI_H
+
+#if defined(CONFIG_PCI) && defined(CONFIG_SOC_AR724X)
+int ath724x_pcibios_init(void);
+#else
+static inline int ath724x_pcibios_init(void) { return 0; }
+#endif
+
+#endif /* __ASM_MACH_ATH79_PCI_H */
diff --git a/arch/mips/pci/pci-ath724x.c b/arch/mips/pci/pci-ath724x.c
index 1e810be..be01b7f 100644
--- a/arch/mips/pci/pci-ath724x.c
+++ b/arch/mips/pci/pci-ath724x.c
@@ -9,6 +9,7 @@
  */
 
 #include <linux/pci.h>
+#include <asm/mach-ath79/pci.h>
 
 #define reg_read(_phys)                (*(unsigned int *) KSEG1ADDR(_phys))
 #define reg_write(_phys, _val) ((*(unsigned int *) KSEG1ADDR(_phys)) = (_val))
@@ -130,7 +131,7 @@ static struct pci_controller ath724x_pci_controller = {
        .mem_resource   = &ath724x_mem_resource,
 };
 
-static int __init ath724x_pcibios_init(void)
+int __init ath724x_pcibios_init(void)
 {
        register_pci_controller(&ath724x_pci_controller);
 
-- 
1.7.2.1


<Prev in Thread] Current Thread [Next in Thread>