Root/target/linux/ar71xx/patches-3.3/102-MIPS-ath79-make-ath724x_pcibios_init-visible-for-ext.patch

1From a9e38566ebe755219db10fa155fa8f0f4efc20d9 Mon Sep 17 00:00:00 2001
2From: Gabor Juhos <juhosg@openwrt.org>
3Date: Wed, 14 Mar 2012 10:29:23 +0100
4Subject: [PATCH 07/47] MIPS: ath79: make ath724x_pcibios_init visible for external code
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Signed-off-by: René Bolldorf <xsecute@googlemail.com>
10Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
11Cc: linux-mips@linux-mips.org
12Patchwork: https://patchwork.linux-mips.org/patch/3487/
13Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14---
15 arch/mips/include/asm/mach-ath79/pci.h | 20 ++++++++++++++++++++
16 arch/mips/pci/pci-ath724x.c | 3 ++-
17 2 files changed, 22 insertions(+), 1 deletions(-)
18 create mode 100644 arch/mips/include/asm/mach-ath79/pci.h
19
20--- /dev/null
21+++ b/arch/mips/include/asm/mach-ath79/pci.h
22@@ -0,0 +1,20 @@
23+/*
24+ * Atheros 724x PCI support
25+ *
26+ * Copyright (C) 2011 René Bolldorf <xsecute@googlemail.com>
27+ *
28+ * This program is free software; you can redistribute it and/or modify it
29+ * under the terms of the GNU General Public License version 2 as published
30+ * by the Free Software Foundation.
31+ */
32+
33+#ifndef __ASM_MACH_ATH79_PCI_H
34+#define __ASM_MACH_ATH79_PCI_H
35+
36+#if defined(CONFIG_PCI) && defined(CONFIG_SOC_AR724X)
37+int ath724x_pcibios_init(void);
38+#else
39+static inline int ath724x_pcibios_init(void) { return 0; }
40+#endif
41+
42+#endif /* __ASM_MACH_ATH79_PCI_H */
43--- a/arch/mips/pci/pci-ath724x.c
44+++ b/arch/mips/pci/pci-ath724x.c
45@@ -9,6 +9,7 @@
46  */
47 
48 #include <linux/pci.h>
49+#include <asm/mach-ath79/pci.h>
50 
51 #define reg_read(_phys) (*(unsigned int *) KSEG1ADDR(_phys))
52 #define reg_write(_phys, _val) ((*(unsigned int *) KSEG1ADDR(_phys)) = (_val))
53@@ -130,7 +131,7 @@ static struct pci_controller ath724x_pci
54     .mem_resource = &ath724x_mem_resource,
55 };
56 
57-static int __init ath724x_pcibios_init(void)
58+int __init ath724x_pcibios_init(void)
59 {
60     register_pci_controller(&ath724x_pci_controller);
61 
62

Archive Download this file



interactive