brcm63xx: Add profile and build image for Sagemcom F@ST2704V2 ADSL router
[openwrt/openwrt.git] / target / linux / brcm63xx / patches-3.10 / 315-MIPS-BCM63XX-remove-RUNTIME_DETECT-usage-from-enet-c.patch
1 From ed6c71de07ad042691ec02e9eb97375ddc91ed01 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Tue, 3 Dec 2013 13:45:22 +0100
4 Subject: [PATCH 6/8] MIPS: BCM63XX: remove !RUNTIME_DETECT usage from enet
5 code
6
7 ---
8 arch/mips/bcm63xx/dev-enet.c | 4 --
9 .../include/asm/mach-bcm63xx/bcm63xx_dev_enet.h | 46 ----------------------
10 2 files changed, 50 deletions(-)
11
12 --- a/arch/mips/bcm63xx/dev-enet.c
13 +++ b/arch/mips/bcm63xx/dev-enet.c
14 @@ -14,7 +14,6 @@
15 #include <bcm63xx_io.h>
16 #include <bcm63xx_regs.h>
17
18 -#ifdef BCMCPU_RUNTIME_DETECT
19 static const unsigned long bcm6348_regs_enetdmac[] = {
20 [ENETDMAC_CHANCFG] = ENETDMAC_CHANCFG_REG,
21 [ENETDMAC_IR] = ENETDMAC_IR_REG,
22 @@ -43,9 +42,6 @@ static __init void bcm63xx_enetdmac_regs
23 else
24 bcm63xx_regs_enetdmac = bcm6348_regs_enetdmac;
25 }
26 -#else
27 -static __init void bcm63xx_enetdmac_regs_init(void) { }
28 -#endif
29
30 static struct resource shared_res[] = {
31 {
32 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h
33 +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h
34 @@ -112,55 +112,9 @@ enum bcm63xx_regs_enetdmac {
35
36 static inline unsigned long bcm63xx_enetdmacreg(enum bcm63xx_regs_enetdmac reg)
37 {
38 -#ifdef BCMCPU_RUNTIME_DETECT
39 extern const unsigned long *bcm63xx_regs_enetdmac;
40
41 return bcm63xx_regs_enetdmac[reg];
42 -#else
43 -#ifdef CONFIG_BCM63XX_CPU_6345
44 - switch (reg) {
45 - case ENETDMAC_CHANCFG:
46 - return ENETDMA_6345_CHANCFG_REG;
47 - case ENETDMAC_IR:
48 - return ENETDMA_6345_IR_REG;
49 - case ENETDMAC_IRMASK:
50 - return ENETDMA_6345_IRMASK_REG;
51 - case ENETDMAC_MAXBURST:
52 - return ENETDMA_6345_MAXBURST_REG;
53 - case ENETDMAC_BUFALLOC:
54 - return ENETDMA_6345_BUFALLOC_REG;
55 - case ENETDMAC_RSTART:
56 - return ENETDMA_6345_RSTART_REG;
57 - case ENETDMAC_FC:
58 - return ENETDMA_6345_FC_REG;
59 - case ENETDMAC_LEN:
60 - return ENETDMA_6345_LEN_REG;
61 - }
62 -#endif
63 -#if defined(CONFIG_BCM63XX_CPU_6328) || \
64 - defined(CONFIG_BCM63XX_CPU_6338) || \
65 - defined(CONFIG_BCM63XX_CPU_6348) || \
66 - defined(CONFIG_BCM63XX_CPU_6358) || \
67 - defined(CONFIG_BCM63XX_CPU_6362) || \
68 - defined(CONFIG_BCM63XX_CPU_6368)
69 - switch (reg) {
70 - case ENETDMAC_CHANCFG:
71 - return ENETDMAC_CHANCFG_REG;
72 - case ENETDMAC_IR:
73 - return ENETDMAC_IR_REG;
74 - case ENETDMAC_IRMASK:
75 - return ENETDMAC_IRMASK_REG;
76 - case ENETDMAC_MAXBURST:
77 - return ENETDMAC_MAXBURST_REG;
78 - case ENETDMAC_BUFALLOC:
79 - case ENETDMAC_RSTART:
80 - case ENETDMAC_FC:
81 - case ENETDMAC_LEN:
82 - return 0;
83 - }
84 -#endif
85 -#endif
86 - return 0;
87 }
88
89