Skip to content

Commit ee68580

Browse files
KanjiMonsterralfbaechle
authored andcommitted
MIPS: BCM63xx: Remove !RUNTIME_DETECT from spi code
Signed-off-by: Jonas Gorski <jogo@openwrt.org> 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/7271/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 53a0227 commit ee68580

2 files changed

Lines changed: 0 additions & 35 deletions

File tree

‎arch/mips/bcm63xx/dev-spi.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <bcm63xx_dev_spi.h>
1919
#include <bcm63xx_regs.h>
2020

21-
#ifdef BCMCPU_RUNTIME_DETECT
2221
/*
2322
* register offsets
2423
*/
@@ -41,9 +40,6 @@ static __init void bcm63xx_spi_regs_init(void)
4140
BCMCPU_IS_6362() || BCMCPU_IS_6368())
4241
bcm63xx_regs_spi = bcm6358_regs_spi;
4342
}
44-
#else
45-
static __init void bcm63xx_spi_regs_init(void) { }
46-
#endif
4743

4844
static struct resource spi_resources[] = {
4945
{

‎arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h‎

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,6 @@ enum bcm63xx_regs_spi {
3030
SPI_RX_DATA,
3131
};
3232

33-
#define __GEN_SPI_RSET_BASE(__cpu, __rset) \
34-
case SPI_## __rset: \
35-
return SPI_## __cpu ##_## __rset;
36-
37-
#define __GEN_SPI_RSET(__cpu) \
38-
switch (reg) { \
39-
__GEN_SPI_RSET_BASE(__cpu, CMD) \
40-
__GEN_SPI_RSET_BASE(__cpu, INT_STATUS) \
41-
__GEN_SPI_RSET_BASE(__cpu, INT_MASK_ST) \
42-
__GEN_SPI_RSET_BASE(__cpu, INT_MASK) \
43-
__GEN_SPI_RSET_BASE(__cpu, ST) \
44-
__GEN_SPI_RSET_BASE(__cpu, CLK_CFG) \
45-
__GEN_SPI_RSET_BASE(__cpu, FILL_BYTE) \
46-
__GEN_SPI_RSET_BASE(__cpu, MSG_TAIL) \
47-
__GEN_SPI_RSET_BASE(__cpu, RX_TAIL) \
48-
__GEN_SPI_RSET_BASE(__cpu, MSG_CTL) \
49-
__GEN_SPI_RSET_BASE(__cpu, MSG_DATA) \
50-
__GEN_SPI_RSET_BASE(__cpu, RX_DATA) \
51-
}
52-
5333
#define __GEN_SPI_REGS_TABLE(__cpu) \
5434
[SPI_CMD] = SPI_## __cpu ##_CMD, \
5535
[SPI_INT_STATUS] = SPI_## __cpu ##_INT_STATUS, \
@@ -66,20 +46,9 @@ enum bcm63xx_regs_spi {
6646

6747
static inline unsigned long bcm63xx_spireg(enum bcm63xx_regs_spi reg)
6848
{
69-
#ifdef BCMCPU_RUNTIME_DETECT
7049
extern const unsigned long *bcm63xx_regs_spi;
7150

7251
return bcm63xx_regs_spi[reg];
73-
#else
74-
#if defined(CONFIG_BCM63XX_CPU_6338) || defined(CONFIG_BCM63XX_CPU_6348)
75-
__GEN_SPI_RSET(6348)
76-
#endif
77-
#if defined(CONFIG_BCM63XX_CPU_6358) || defined(CONFIG_BCM63XX_CPU_6362) || \
78-
defined(CONFIG_BCM63XX_CPU_6368)
79-
__GEN_SPI_RSET(6358)
80-
#endif
81-
#endif
82-
return 0;
8352
}
8453

8554
#endif /* BCM63XX_DEV_SPI_H */

0 commit comments

Comments
 (0)