| 1 | From 07224e2fa5f889162ee0560c6ab1eb8cd16a8dd2 Mon Sep 17 00:00:00 2001 |
| 2 | From: Gabor Juhos <juhosg@openwrt.org> |
| 3 | Date: Mon, 11 Jun 2012 14:59:39 +0200 |
| 4 | Subject: [PATCH 08/34] MIPS: ath79: remove unused ar7{1x,24}x_pcibios_init functions |
| 5 | |
| 6 | The functions are unused now, so remove them. |
| 7 | |
| 8 | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> |
| 9 | --- |
| 10 | arch/mips/ath79/pci.c | 1 - |
| 11 | arch/mips/include/asm/mach-ath79/pci.h | 28 ---------------------------- |
| 12 | arch/mips/pci/pci-ar71xx.c | 26 -------------------------- |
| 13 | arch/mips/pci/pci-ar724x.c | 32 -------------------------------- |
| 14 | 4 files changed, 0 insertions(+), 87 deletions(-) |
| 15 | delete mode 100644 arch/mips/include/asm/mach-ath79/pci.h |
| 16 | |
| 17 | --- a/arch/mips/ath79/pci.c |
| 18 | +++ b/arch/mips/ath79/pci.c |
| 19 | @@ -19,7 +19,6 @@ |
| 20 | #include <asm/mach-ath79/ar71xx_regs.h> |
| 21 | #include <asm/mach-ath79/ath79.h> |
| 22 | #include <asm/mach-ath79/irq.h> |
| 23 | -#include <asm/mach-ath79/pci.h> |
| 24 | #include "pci.h" |
| 25 | |
| 26 | static int (*ath79_pci_plat_dev_init)(struct pci_dev *dev); |
| 27 | --- a/arch/mips/include/asm/mach-ath79/pci.h |
| 28 | +++ /dev/null |
| 29 | @@ -1,28 +0,0 @@ |
| 30 | -/* |
| 31 | - * Atheros AR71XX/AR724X PCI support |
| 32 | - * |
| 33 | - * Copyright (C) 2011 René Bolldorf <xsecute@googlemail.com> |
| 34 | - * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org> |
| 35 | - * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> |
| 36 | - * |
| 37 | - * This program is free software; you can redistribute it and/or modify it |
| 38 | - * under the terms of the GNU General Public License version 2 as published |
| 39 | - * by the Free Software Foundation. |
| 40 | - */ |
| 41 | - |
| 42 | -#ifndef __ASM_MACH_ATH79_PCI_H |
| 43 | -#define __ASM_MACH_ATH79_PCI_H |
| 44 | - |
| 45 | -#if defined(CONFIG_PCI) && defined(CONFIG_SOC_AR71XX) |
| 46 | -int ar71xx_pcibios_init(void); |
| 47 | -#else |
| 48 | -static inline int ar71xx_pcibios_init(void) { return 0; } |
| 49 | -#endif |
| 50 | - |
| 51 | -#if defined(CONFIG_PCI_AR724X) |
| 52 | -int ar724x_pcibios_init(int irq); |
| 53 | -#else |
| 54 | -static inline int ar724x_pcibios_init(int irq) { return 0; } |
| 55 | -#endif |
| 56 | - |
| 57 | -#endif /* __ASM_MACH_ATH79_PCI_H */ |
| 58 | --- a/arch/mips/pci/pci-ar71xx.c |
| 59 | +++ b/arch/mips/pci/pci-ar71xx.c |
| 60 | @@ -23,7 +23,6 @@ |
| 61 | |
| 62 | #include <asm/mach-ath79/ar71xx_regs.h> |
| 63 | #include <asm/mach-ath79/ath79.h> |
| 64 | -#include <asm/mach-ath79/pci.h> |
| 65 | |
| 66 | #define AR71XX_PCI_REG_CRP_AD_CBE 0x00 |
| 67 | #define AR71XX_PCI_REG_CRP_WRDATA 0x04 |
| 68 | @@ -335,31 +334,6 @@ static __devinit void ar71xx_pci_reset(v |
| 69 | mdelay(100); |
| 70 | } |
| 71 | |
| 72 | -__init int ar71xx_pcibios_init(void) |
| 73 | -{ |
| 74 | - u32 t; |
| 75 | - |
| 76 | - ar71xx_pcicfg_base = ioremap(AR71XX_PCI_CFG_BASE, AR71XX_PCI_CFG_SIZE); |
| 77 | - if (ar71xx_pcicfg_base == NULL) |
| 78 | - return -ENOMEM; |
| 79 | - |
| 80 | - ar71xx_pci_reset(); |
| 81 | - |
| 82 | - /* setup COMMAND register */ |
| 83 | - t = PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE |
| 84 | - | PCI_COMMAND_PARITY | PCI_COMMAND_SERR | PCI_COMMAND_FAST_BACK; |
| 85 | - ar71xx_pci_local_write(PCI_COMMAND, 4, t); |
| 86 | - |
| 87 | - /* clear bus errors */ |
| 88 | - ar71xx_pci_check_error(1); |
| 89 | - |
| 90 | - ar71xx_pci_irq_init(ATH79_CPU_IRQ_IP2); |
| 91 | - |
| 92 | - register_pci_controller(&ar71xx_pci_controller); |
| 93 | - |
| 94 | - return 0; |
| 95 | -} |
| 96 | - |
| 97 | static int __devinit ar71xx_pci_probe(struct platform_device *pdev) |
| 98 | { |
| 99 | struct resource *res; |
| 100 | --- a/arch/mips/pci/pci-ar724x.c |
| 101 | +++ b/arch/mips/pci/pci-ar724x.c |
| 102 | @@ -15,7 +15,6 @@ |
| 103 | #include <linux/platform_device.h> |
| 104 | #include <asm/mach-ath79/ath79.h> |
| 105 | #include <asm/mach-ath79/ar71xx_regs.h> |
| 106 | -#include <asm/mach-ath79/pci.h> |
| 107 | |
| 108 | #define AR724X_PCI_REG_RESET 0x18 |
| 109 | #define AR724X_PCI_REG_INT_STATUS 0x4c |
| 110 | @@ -276,37 +275,6 @@ static void __devinit ar724x_pci_irq_ini |
| 111 | irq_set_chained_handler(irq, ar724x_pci_irq_handler); |
| 112 | } |
| 113 | |
| 114 | -int __devinit ar724x_pcibios_init(int irq) |
| 115 | -{ |
| 116 | - int ret; |
| 117 | - |
| 118 | - ret = -ENOMEM; |
| 119 | - |
| 120 | - ar724x_pci_devcfg_base = ioremap(AR724X_PCI_CFG_BASE, |
| 121 | - AR724X_PCI_CFG_SIZE); |
| 122 | - if (ar724x_pci_devcfg_base == NULL) |
| 123 | - goto err; |
| 124 | - |
| 125 | - ar724x_pci_ctrl_base = ioremap(AR724X_PCI_CTRL_BASE, |
| 126 | - AR724X_PCI_CTRL_SIZE); |
| 127 | - if (ar724x_pci_ctrl_base == NULL) |
| 128 | - goto err_unmap_devcfg; |
| 129 | - |
| 130 | - ar724x_pci_link_up = ar724x_pci_check_link(); |
| 131 | - if (!ar724x_pci_link_up) |
| 132 | - pr_warn("ar724x: PCIe link is down\n"); |
| 133 | - |
| 134 | - ar724x_pci_irq_init(irq); |
| 135 | - register_pci_controller(&ar724x_pci_controller); |
| 136 | - |
| 137 | - return PCIBIOS_SUCCESSFUL; |
| 138 | - |
| 139 | -err_unmap_devcfg: |
| 140 | - iounmap(ar724x_pci_devcfg_base); |
| 141 | -err: |
| 142 | - return ret; |
| 143 | -} |
| 144 | - |
| 145 | static int __devinit ar724x_pci_probe(struct platform_device *pdev) |
| 146 | { |
| 147 | struct resource *res; |
| 148 | |