Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: BCM63xx: Remove !RUNTIME_DETECT usage from enet code

Cc: linux-mips@linux-mips.org
Cc: John Crispin <blogic@openwrt.org>
Cc: Maxime Bizon <mbizon@freebox.fr>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: Kevin Cernekee <cernekee@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/7270/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Jonas Gorski and committed by
Ralf Baechle
e7101c2a ee685808

-50
-4
arch/mips/bcm63xx/dev-enet.c
··· 14 14 #include <bcm63xx_io.h> 15 15 #include <bcm63xx_regs.h> 16 16 17 - #ifdef BCMCPU_RUNTIME_DETECT 18 17 static const unsigned long bcm6348_regs_enetdmac[] = { 19 18 [ENETDMAC_CHANCFG] = ENETDMAC_CHANCFG_REG, 20 19 [ENETDMAC_IR] = ENETDMAC_IR_REG, ··· 42 43 else 43 44 bcm63xx_regs_enetdmac = bcm6348_regs_enetdmac; 44 45 } 45 - #else 46 - static __init void bcm63xx_enetdmac_regs_init(void) { } 47 - #endif 48 46 49 47 static struct resource shared_res[] = { 50 48 {
-46
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h
··· 112 112 113 113 static inline unsigned long bcm63xx_enetdmacreg(enum bcm63xx_regs_enetdmac reg) 114 114 { 115 - #ifdef BCMCPU_RUNTIME_DETECT 116 115 extern const unsigned long *bcm63xx_regs_enetdmac; 117 116 118 117 return bcm63xx_regs_enetdmac[reg]; 119 - #else 120 - #ifdef CONFIG_BCM63XX_CPU_6345 121 - switch (reg) { 122 - case ENETDMAC_CHANCFG: 123 - return ENETDMA_6345_CHANCFG_REG; 124 - case ENETDMAC_IR: 125 - return ENETDMA_6345_IR_REG; 126 - case ENETDMAC_IRMASK: 127 - return ENETDMA_6345_IRMASK_REG; 128 - case ENETDMAC_MAXBURST: 129 - return ENETDMA_6345_MAXBURST_REG; 130 - case ENETDMAC_BUFALLOC: 131 - return ENETDMA_6345_BUFALLOC_REG; 132 - case ENETDMAC_RSTART: 133 - return ENETDMA_6345_RSTART_REG; 134 - case ENETDMAC_FC: 135 - return ENETDMA_6345_FC_REG; 136 - case ENETDMAC_LEN: 137 - return ENETDMA_6345_LEN_REG; 138 - } 139 - #endif 140 - #if defined(CONFIG_BCM63XX_CPU_6328) || \ 141 - defined(CONFIG_BCM63XX_CPU_6338) || \ 142 - defined(CONFIG_BCM63XX_CPU_6348) || \ 143 - defined(CONFIG_BCM63XX_CPU_6358) || \ 144 - defined(CONFIG_BCM63XX_CPU_6362) || \ 145 - defined(CONFIG_BCM63XX_CPU_6368) 146 - switch (reg) { 147 - case ENETDMAC_CHANCFG: 148 - return ENETDMAC_CHANCFG_REG; 149 - case ENETDMAC_IR: 150 - return ENETDMAC_IR_REG; 151 - case ENETDMAC_IRMASK: 152 - return ENETDMAC_IRMASK_REG; 153 - case ENETDMAC_MAXBURST: 154 - return ENETDMAC_MAXBURST_REG; 155 - case ENETDMAC_BUFALLOC: 156 - case ENETDMAC_RSTART: 157 - case ENETDMAC_FC: 158 - case ENETDMAC_LEN: 159 - return 0; 160 - } 161 - #endif 162 - #endif 163 - return 0; 164 118 } 165 119 166 120