MIPS: BCM63XX: remove !RUNTIME_DETECT support
cover MIPS: BCM63XX: remove !RUNTIME_DETECT support
The advantages compared to the added maintaince burden of ensuring that changes don't break the single-soc support with !RUNTIME_DETECT are rather small, so remove it.
The only place where it might have any impact might be the irq code. But even then replacing it with UASM might be a better choice, as it would then profit all targets.
P.S: there is a small lie in 7/8, but since BCM6318 support isn't yet upstream, it is valid for the current code. BCM6318 has only a BCM3300 CPU, but it does have dc aliases (at least according to the bootlog).
Jonas Gorski (8):
MIPS: BCM63XX: remove !RUNTIME_DETECT code from register sets
MIPS: BCM63XX: remove !RUNTIME_DETECT from irq setup code
MIPS: BCM63XX: remove !RUNTIME_DETECT from reset code
MIPS: BCM63XX: remove !RUNTIME_DETECT code from gpio code
MIPS: BCM63XX: remove !RUNTIME_DETECT from spi code
MIPS: BCM63XX: remove !RUNTIME_DETECT usage from enet code
MIPS: BCM63XX: remove !RUNTIME_DETECT in cpu-feature-overrides
MIPS: BCM63XX: remove !RUNTIME_DETECT code for bcmcpu_get_id
arch/mips/bcm63xx/cpu.c | 11 +- arch/mips/bcm63xx/dev-enet.c | 4 - arch/mips/bcm63xx/dev-spi.c | 4 - arch/mips/bcm63xx/gpio.c | 14 -- arch/mips/bcm63xx/irq.c | 109 ------------ arch/mips/bcm63xx/reset.c | 60 ------- arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 198 ++++----------------- .../include/asm/mach-bcm63xx/bcm63xx_dev_enet.h | 46 ----- .../include/asm/mach-bcm63xx/bcm63xx_dev_spi.h | 31 ---- .../asm/mach-bcm63xx/cpu-feature-overrides.h | 2 +- 10 files changed, 39 insertions(+), 440 deletions(-)
Signature · 1 line
2.0.0
PATCH 1/8 MIPS: BCM63XX: remove !RUNTIME_DETECT code from register sets
--- arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 78 ------------------------ 1 file changed, 78 deletions(-)
arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h +0 -78
@@ -598,55 +598,6 @@ enum bcm63xx_regs_set {extern const unsigned long *bcm63xx_regs_base; -#define __GEN_RSET_BASE (__cpu, __rset) \ - case RSET_## __rset : \ - return BCM_## __cpu ##_## __rset ##_BASE; - -#define __GEN_RSET (__cpu) \ - switch (set) { \ - __GEN_RSET_BASE(__cpu, DSL_LMEM) \ - __GEN_RSET_BASE(__cpu, PERF) \ - __GEN_RSET_BASE(__cpu, TIMER) \ - __GEN_RSET_BASE(__cpu, WDT) \ - __GEN_RSET_BASE(__cpu, UART0) \ - __GEN_RSET_BASE(__cpu, UART1) \ - __GEN_RSET_BASE(__cpu, GPIO) \ - __GEN_RSET_BASE(__cpu, SPI) \ - __GEN_RSET_BASE(__cpu, HSSPI) \ - __GEN_RSET_BASE(__cpu, UDC0) \ - __GEN_RSET_BASE(__cpu, OHCI0) \ - __GEN_RSET_BASE(__cpu, OHCI_PRIV) \ - __GEN_RSET_BASE(__cpu, USBH_PRIV) \ - __GEN_RSET_BASE(__cpu, USBD) \ - __GEN_RSET_BASE(__cpu, USBDMA) \ - __GEN_RSET_BASE(__cpu, MPI) \ - __GEN_RSET_BASE(__cpu, PCMCIA) \ - __GEN_RSET_BASE(__cpu, PCIE) \ - __GEN_RSET_BASE(__cpu, DSL) \ - __GEN_RSET_BASE(__cpu, ENET0) \ - __GEN_RSET_BASE(__cpu, ENET1) \ - __GEN_RSET_BASE(__cpu, ENETDMA) \ - __GEN_RSET_BASE(__cpu, ENETDMAC) \ - __GEN_RSET_BASE(__cpu, ENETDMAS) \ - __GEN_RSET_BASE(__cpu, ENETSW) \ - __GEN_RSET_BASE(__cpu, EHCI0) \ - __GEN_RSET_BASE(__cpu, SDRAM) \ - __GEN_RSET_BASE(__cpu, MEMC) \ - __GEN_RSET_BASE(__cpu, DDR) \ - __GEN_RSET_BASE(__cpu, M2M) \ - __GEN_RSET_BASE(__cpu, ATM) \ - __GEN_RSET_BASE(__cpu, XTM) \ - __GEN_RSET_BASE(__cpu, XTMDMA) \ - __GEN_RSET_BASE(__cpu, XTMDMAC) \ - __GEN_RSET_BASE(__cpu, XTMDMAS) \ - __GEN_RSET_BASE(__cpu, PCM) \ - __GEN_RSET_BASE(__cpu, PCMDMA) \ - __GEN_RSET_BASE(__cpu, PCMDMAC) \ - __GEN_RSET_BASE(__cpu, PCMDMAS) \ - __GEN_RSET_BASE(__cpu, RNG) \ - __GEN_RSET_BASE(__cpu, MISC) \ - } -#define __GEN_CPU_REGS_TABLE (__cpu) \ [RSET_DSL_LMEM] = BCM_## __cpu ##_DSL_LMEM_BASE, \ [RSET_PERF] = BCM_## __cpu ##_PERF_BASE, \
@@ -693,36 +644,7 @@ extern const unsigned long *bcm63xx_regs_base;static inline unsigned long bcm63xx_regset_address (enum bcm63xx_regs_set set) { -#ifdef BCMCPU_RUNTIME_DETECT return bcm63xx_regs_base[set]; -#else -#ifdef CONFIG_BCM63XX_CPU_3368 - __GEN_RSET(3368) -#endif -#ifdef CONFIG_BCM63XX_CPU_6328 - __GEN_RSET(6328) -#endif -#ifdef CONFIG_BCM63XX_CPU_6338 - __GEN_RSET(6338) -#endif -#ifdef CONFIG_BCM63XX_CPU_6345 - __GEN_RSET(6345) -#endif -#ifdef CONFIG_BCM63XX_CPU_6348 - __GEN_RSET(6348) -#endif -#ifdef CONFIG_BCM63XX_CPU_6358 - __GEN_RSET(6358) -#endif -#ifdef CONFIG_BCM63XX_CPU_6362 - __GEN_RSET(6362) -#endif -#ifdef CONFIG_BCM63XX_CPU_6368 - __GEN_RSET(6368) -#endif -#endif -/* unreached */ -return 0 ; }/*
Signature · 1 line
2.0.0
PATCH 2/8 MIPS: BCM63XX: remove !RUNTIME_DETECT from irq setup code
In reply to Jonas Gorski--- arch/mips/bcm63xx/irq.c | 109 ------------------------------------------------ 1 file changed, 109 deletions(-)
arch/mips/bcm63xx/irq.c +0 -109
@@ -26,114 +26,6 @@ static void __internal_irq_mask_64(unsigned int irq) __maybe_unused;static void __internal_irq_unmask_32 (unsigned int irq)__maybe_unused ;static void __internal_irq_unmask_64 (unsigned int irq)__maybe_unused ; -#ifndef BCMCPU_RUNTIME_DETECT -#ifdef CONFIG_BCM63XX_CPU_3368 -#define irq_stat_reg PERF_IRQSTAT_3368_REG -#define irq_mask_reg PERF_IRQMASK_3368_REG -#define irq_bits 32 -#define is_ext_irq_cascaded 0 -#define ext_irq_start 0 -#define ext_irq_end 0 -#define ext_irq_count 4 -#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_3368 -#define ext_irq_cfg_reg2 0 -#endif -#ifdef CONFIG_BCM63XX_CPU_6328 -#define irq_stat_reg PERF_IRQSTAT_6328_REG -#define irq_mask_reg PERF_IRQMASK_6328_REG -#define irq_bits 64 -#define is_ext_irq_cascaded 1 -#define ext_irq_start (BCM_6328_EXT_IRQ0 - IRQ_INTERNAL_BASE) -#define ext_irq_end (BCM_6328_EXT_IRQ3 - IRQ_INTERNAL_BASE) -#define ext_irq_count 4 -#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6328 -#define ext_irq_cfg_reg2 0 -#endif -#ifdef CONFIG_BCM63XX_CPU_6338 -#define irq_stat_reg PERF_IRQSTAT_6338_REG -#define irq_mask_reg PERF_IRQMASK_6338_REG -#define irq_bits 32 -#define is_ext_irq_cascaded 0 -#define ext_irq_start 0 -#define ext_irq_end 0 -#define ext_irq_count 4 -#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6338 -#define ext_irq_cfg_reg2 0 -#endif -#ifdef CONFIG_BCM63XX_CPU_6345 -#define irq_stat_reg PERF_IRQSTAT_6345_REG -#define irq_mask_reg PERF_IRQMASK_6345_REG -#define irq_bits 32 -#define is_ext_irq_cascaded 0 -#define ext_irq_start 0 -#define ext_irq_end 0 -#define ext_irq_count 4 -#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6345 -#define ext_irq_cfg_reg2 0 -#endif -#ifdef CONFIG_BCM63XX_CPU_6348 -#define irq_stat_reg PERF_IRQSTAT_6348_REG -#define irq_mask_reg PERF_IRQMASK_6348_REG -#define irq_bits 32 -#define is_ext_irq_cascaded 0 -#define ext_irq_start 0 -#define ext_irq_end 0 -#define ext_irq_count 4 -#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6348 -#define ext_irq_cfg_reg2 0 -#endif -#ifdef CONFIG_BCM63XX_CPU_6358 -#define irq_stat_reg PERF_IRQSTAT_6358_REG -#define irq_mask_reg PERF_IRQMASK_6358_REG -#define irq_bits 32 -#define is_ext_irq_cascaded 1 -#define ext_irq_start (BCM_6358_EXT_IRQ0 - IRQ_INTERNAL_BASE) -#define ext_irq_end (BCM_6358_EXT_IRQ3 - IRQ_INTERNAL_BASE) -#define ext_irq_count 4 -#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6358 -#define ext_irq_cfg_reg2 0 -#endif -#ifdef CONFIG_BCM63XX_CPU_6362 -#define irq_stat_reg PERF_IRQSTAT_6362_REG -#define irq_mask_reg PERF_IRQMASK_6362_REG -#define irq_bits 64 -#define is_ext_irq_cascaded 1 -#define ext_irq_start (BCM_6362_EXT_IRQ0 - IRQ_INTERNAL_BASE) -#define ext_irq_end (BCM_6362_EXT_IRQ3 - IRQ_INTERNAL_BASE) -#define ext_irq_count 4 -#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6362 -#define ext_irq_cfg_reg2 0 -#endif -#ifdef CONFIG_BCM63XX_CPU_6368 -#define irq_stat_reg PERF_IRQSTAT_6368_REG -#define irq_mask_reg PERF_IRQMASK_6368_REG -#define irq_bits 64 -#define is_ext_irq_cascaded 1 -#define ext_irq_start (BCM_6368_EXT_IRQ0 - IRQ_INTERNAL_BASE) -#define ext_irq_end (BCM_6368_EXT_IRQ5 - IRQ_INTERNAL_BASE) -#define ext_irq_count 6 -#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6368 -#define ext_irq_cfg_reg2 PERF_EXTIRQ_CFG_REG2_6368 -#endif - -#if irq_bits ==32 -#define dispatch_internal __dispatch_internal -#define internal_irq_mask __internal_irq_mask_32 -#define internal_irq_unmask __internal_irq_unmask_32 -#else -#define dispatch_internal __dispatch_internal_64 -#define internal_irq_mask __internal_irq_mask_64 -#define internal_irq_unmask __internal_irq_unmask_64 -#endif - -#define irq_stat_addr (bcm63xx_regset_address(RSET_PERF) + irq_stat_reg) -#define irq_mask_addr (bcm63xx_regset_address(RSET_PERF) + irq_mask_reg) - -static inline void bcm63xx_init_irq (void ) -{ -} -#else /* ! BCMCPU_RUNTIME_DETECT */ -static u32 irq_stat_addr, irq_mask_addr;static void (*dispatch_internal)(void );static int is_ext_irq_cascaded;
@@ -234,7 +126,6 @@ static void bcm63xx_init_irq(void) internal_irq_unmask = __internal_irq_unmask_64; } } -#endif /* ! BCMCPU_RUNTIME_DETECT */ static inline u32 get_ext_irq_perf_reg (int irq) {
Signature · 1 line
2.0.0
PATCH 3/8 MIPS: BCM63XX: remove !RUNTIME_DETECT from reset code
In reply to Jonas Gorski--- arch/mips/bcm63xx/reset.c | 60 ----------------------------------------------- 1 file changed, 60 deletions(-)
arch/mips/bcm63xx/reset.c +0 -60
@@ -125,8 +125,6 @@#define BCM6368_RESET_PCIE 0#define BCM6368_RESET_PCIE_EXT 0 -#ifdef BCMCPU_RUNTIME_DETECT -/* * core reset bits */
@@ -188,64 +186,6 @@ static int __init bcm63xx_reset_bits_init(void)return 0 ; } -#else - -#ifdef CONFIG_BCM63XX_CPU_3368 -static const u32 bcm63xx_reset_bits[] = { -__GEN_RESET_BITS_TABLE (3368 ) -}; -#define reset_reg PERF_SOFTRESET_6358_REG -#endif - -#ifdef CONFIG_BCM63XX_CPU_6328 -static const u32 bcm63xx_reset_bits[] = { -__GEN_RESET_BITS_TABLE (6328 ) -}; -#define reset_reg PERF_SOFTRESET_6328_REG -#endif - -#ifdef CONFIG_BCM63XX_CPU_6338 -static const u32 bcm63xx_reset_bits[] = { -__GEN_RESET_BITS_TABLE (6338 ) -}; -#define reset_reg PERF_SOFTRESET_REG -#endif - -#ifdef CONFIG_BCM63XX_CPU_6345 -static const u32 bcm63xx_reset_bits[] = { }; -#define reset_reg 0 -#endif - -#ifdef CONFIG_BCM63XX_CPU_6348 -static const u32 bcm63xx_reset_bits[] = { -__GEN_RESET_BITS_TABLE (6348 ) -}; -#define reset_reg PERF_SOFTRESET_REG -#endif - -#ifdef CONFIG_BCM63XX_CPU_6358 -static const u32 bcm63xx_reset_bits[] = { -__GEN_RESET_BITS_TABLE (6358 ) -}; -#define reset_reg PERF_SOFTRESET_6358_REG -#endif - -#ifdef CONFIG_BCM63XX_CPU_6362 -static const u32 bcm63xx_reset_bits[] = { -__GEN_RESET_BITS_TABLE (6362 ) -}; -#define reset_reg PERF_SOFTRESET_6362_REG -#endif - -#ifdef CONFIG_BCM63XX_CPU_6368 -static const u32 bcm63xx_reset_bits[] = { -__GEN_RESET_BITS_TABLE (6368 ) -}; -#define reset_reg PERF_SOFTRESET_6368_REG -#endif - -static int __init bcm63xx_reset_bits_init (void ) {return 0 ; } -#endif static DEFINE_SPINLOCK (reset_mutex);
Signature · 1 line
2.0.0
PATCH 4/8 MIPS: BCM63XX: remove !RUNTIME_DETECT code from gpio code
In reply to Jonas Gorski--- arch/mips/bcm63xx/gpio.c | 14 -------------- 1 file changed, 14 deletions(-)
arch/mips/bcm63xx/gpio.c +0 -14
@@ -18,19 +18,6 @@#include <bcm63xx_io.h> #include <bcm63xx_regs.h> -#ifndef BCMCPU_RUNTIME_DETECT -#define gpio_out_low_reg GPIO_DATA_LO_REG -#ifdef CONFIG_BCM63XX_CPU_6345 -#ifdef gpio_out_low_reg -#undef gpio_out_low_reg -#define gpio_out_low_reg GPIO_DATA_LO_REG_6345 -#endif /* gpio_out_low_reg */ -#endif /* CONFIG_BCM63XX_CPU_6345 */ - -static inline void bcm63xx_gpio_out_low_reg_init (void ) -{ -} -#else /* ! BCMCPU_RUNTIME_DETECT */ static u32 gpio_out_low_reg;static void bcm63xx_gpio_out_low_reg_init (void )
@@ -44,7 +31,6 @@ static void bcm63xx_gpio_out_low_reg_init(void)break ; } } -#endif /* ! BCMCPU_RUNTIME_DETECT */ static DEFINE_SPINLOCK (bcm63xx_gpio_lock);static u32 gpio_out_low, gpio_out_high;
Signature · 1 line
2.0.0
PATCH 6/8 MIPS: BCM63XX: remove !RUNTIME_DETECT usage from enet code
In reply to Jonas Gorski--- arch/mips/bcm63xx/dev-enet.c | 4 -- .../include/asm/mach-bcm63xx/bcm63xx_dev_enet.h | 46 ---------------------- 2 files changed, 50 deletions(-)
arch/mips/bcm63xx/dev-enet.c +0 -4
@@ -14,7 +14,6 @@#include <bcm63xx_io.h> #include <bcm63xx_regs.h> -#ifdef BCMCPU_RUNTIME_DETECT static const unsigned long bcm6348_regs_enetdmac[] = { [ENETDMAC_CHANCFG ] =ENETDMAC_CHANCFG_REG , [ENETDMAC_IR ] =ENETDMAC_IR_REG ,
@@ -43,9 +42,6 @@ static __init void bcm63xx_enetdmac_regs_init(void)else bcm63xx_regs_enetdmac = bcm6348_regs_enetdmac; } -#else -static __init void bcm63xx_enetdmac_regs_init (void ) { } -#endif static struct resource shared_res[] = { {
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h +0 -46
55 lines not on this page · raw message
Signature · 1 line
2.0.0
PATCH 5/8 MIPS: BCM63XX: remove !RUNTIME_DETECT from spi code
In reply to Jonas Gorski--- arch/mips/bcm63xx/dev-spi.c | 4 --- .../include/asm/mach-bcm63xx/bcm63xx_dev_spi.h | 31 ---------------------- 2 files changed, 35 deletions(-)
arch/mips/bcm63xx/dev-spi.c +0 -4
@@ -18,7 +18,6 @@#include <bcm63xx_dev_spi.h> #include <bcm63xx_regs.h> -#ifdef BCMCPU_RUNTIME_DETECT /* * register offsets */
@@ -41,9 +40,6 @@ static __init void bcm63xx_spi_regs_init(void) BCMCPU_IS_6362() || BCMCPU_IS_6368()) bcm63xx_regs_spi = bcm6358_regs_spi; } -#else -static __init void bcm63xx_spi_regs_init (void ) { } -#endif static struct resource spi_resources[] = { {
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h +0 -31
@@ -30,26 +30,6 @@ enum bcm63xx_regs_spi { SPI_RX_DATA, }; -#define __GEN_SPI_RSET_BASE (__cpu, __rset) \ - case SPI_## __rset: \ - return SPI_## __cpu ##_## __rset; - -#define __GEN_SPI_RSET (__cpu) \ - switch (reg) { \ - __GEN_SPI_RSET_BASE(__cpu, CMD) \ - __GEN_SPI_RSET_BASE(__cpu, INT_STATUS) \ - __GEN_SPI_RSET_BASE(__cpu, INT_MASK_ST) \ - __GEN_SPI_RSET_BASE(__cpu, INT_MASK) \ - __GEN_SPI_RSET_BASE(__cpu, ST) \ - __GEN_SPI_RSET_BASE(__cpu, CLK_CFG) \ - __GEN_SPI_RSET_BASE(__cpu, FILL_BYTE) \ - __GEN_SPI_RSET_BASE(__cpu, MSG_TAIL) \ - __GEN_SPI_RSET_BASE(__cpu, RX_TAIL) \ - __GEN_SPI_RSET_BASE(__cpu, MSG_CTL) \ - __GEN_SPI_RSET_BASE(__cpu, MSG_DATA) \ - __GEN_SPI_RSET_BASE(__cpu, RX_DATA) \ - } -#define __GEN_SPI_REGS_TABLE (__cpu) \ [SPI_CMD] = SPI_## __cpu ##_CMD, \ [SPI_INT_STATUS] = SPI_## __cpu ##_INT_STATUS, \
@@ -66,20 +46,9 @@ enum bcm63xx_regs_spi {static inline unsigned long bcm63xx_spireg (enum bcm63xx_regs_spi reg) { -#ifdef BCMCPU_RUNTIME_DETECT extern const unsigned long *bcm63xx_regs_spi;return bcm63xx_regs_spi[reg]; -#else -#if defined(CONFIG_BCM63XX_CPU_6338 ) || defined(CONFIG_BCM63XX_CPU_6348 ) - __GEN_SPI_RSET(6348) -#endif -#if defined(CONFIG_BCM63XX_CPU_6358 ) || defined(CONFIG_BCM63XX_CPU_6362 ) || \ - defined(CONFIG_BCM63XX_CPU_6368 ) - __GEN_SPI_RSET(6358) -#endif -#endif -return 0 ; }#endif /* BCM63XX_DEV_SPI_H */
Signature · 1 line
2.0.0
PATCH 7/8 MIPS: BCM63XX: remove !RUNTIME_DETECT in cpu-feature-overrides
In reply to Jonas GorskiAll three SoCs have in common they have a BMIPS32/BMIPS3300 CPU, so we can replace this as no SoC with BMIPS4350 support enabled.
--- arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h +1 -1
@@ -24,7 +24,7 @@#define cpu_has_smartmips 0#define cpu_has_vtag_icache 0 -#if !defined(BCMCPU_RUNTIME_DETECT ) && (defined(CONFIG_BCM63XX_CPU_6348 ) || defined(CONFIG_BCM63XX_CPU_6345 ) || defined(CONFIG_BCM63XX_CPU_6338 )) +#if !defined(CONFIG_SYS_HAS_CPU_BMIPS4350 )#define cpu_has_dc_aliases 0#endif
Signature · 1 line
2.0.0
PATCH 8/8 MIPS: BCM63XX: remove !RUNTIME_DETECT code for bcmcpu_get_id
In reply to Jonas GorskiUse the same pattern as with get_*_cpu_type() to allow the compiler to remove code for non enabled SoC types.
--- arch/mips/bcm63xx/cpu.c | 11 +-- arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 120 +++++++---------------- 2 files changed, 38 insertions(+), 93 deletions(-)
arch/mips/bcm63xx/cpu.c +3 -8
@@ -24,7 +24,9 @@ EXPORT_SYMBOL(bcm63xx_regs_base);const int *bcm63xx_irqs;EXPORT_SYMBOL (bcm63xx_irqs); -static u16 bcm63xx_cpu_id; +u16 bcm63xx_cpu_id__read_mostly ; +EXPORT_SYMBOL (bcm63xx_cpu_id); +static u8 bcm63xx_cpu_rev;static unsigned int bcm63xx_cpu_freq;static unsigned int bcm63xx_memory_size;
@@ -97,13 +99,6 @@ static const int bcm6368_irqs[] = { }; -u16 __bcm63xx_get_cpu_id (void ) -{ -return bcm63xx_cpu_id; -} - -EXPORT_SYMBOL (__bcm63xx_get_cpu_id); -u8 bcm63xx_get_cpu_rev (void ) {return bcm63xx_cpu_rev;
arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h +35 -85
153 lines not on this page · raw message
Signature · 1 line
2.0.0
Re: [PATCH 6/8] MIPS: BCM63XX: remove !RUNTIME_DETECT usage from enet code
In reply to a message not in the archiveQuoted 3 lines · On Tue, 08 Jul 2014 19:59:41 +0400 Sergei Shtylyov…
Hello.
You forgot to si.gn off on this patch.
(added a dot into sign to make ecartis not detect a command)
Indeed I have, thanks for spotting this. *cough*
Sooo ... *looks at patchwork*
Jonas
2014-07-08 7:53 GMT-07:00 Jonas Gorski <[email protected]>:
Quoted 4 lines
The advantages compared to the added maintaince burden of ensuring that changes don't break the single-soc support with !RUNTIME_DETECT are rather small, so remove it.
Quoted 8 lines
The only place where it might have any impact might be the irq code. But even then replacing it with UASM might be a better choice, as it would then profit all targets.
P.S: there is a small lie in 7/8, but since BCM6318 support isn't yet upstream, it is valid for the current code. BCM6318 has only a BCM3300 CPU, but it does have dc aliases (at least according to the bootlog).
Looks good to me, thanks Jonas!
Quoted 25 lines
Jonas Gorski (8):
MIPS: BCM63XX: remove !RUNTIME_DETECT code from register sets
MIPS: BCM63XX: remove !RUNTIME_DETECT from irq setup code
MIPS: BCM63XX: remove !RUNTIME_DETECT from reset code
MIPS: BCM63XX: remove !RUNTIME_DETECT code from gpio code
MIPS: BCM63XX: remove !RUNTIME_DETECT from spi code
MIPS: BCM63XX: remove !RUNTIME_DETECT usage from enet code
MIPS: BCM63XX: remove !RUNTIME_DETECT in cpu-feature-overrides
MIPS: BCM63XX: remove !RUNTIME_DETECT code forbcmcpu_get_idarch/mips/bcm63xx/cpu.c | 11 +- arch/mips/bcm63xx/dev-enet.c | 4 - arch/mips/bcm63xx/dev-spi.c | 4 - arch/mips/bcm63xx/gpio.c | 14 -- arch/mips/bcm63xx/irq.c | 109 ------------ arch/mips/bcm63xx/reset.c | 60 ------- arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 198 ++++----------------- .../include/asm/mach-bcm63xx/bcm63xx_dev_enet.h | 46 ----- .../include/asm/mach-bcm63xx/bcm63xx_dev_spi.h | 31 ---- .../asm/mach-bcm63xx/cpu-feature-overrides.h | 2 +- 10 files changed, 39 insertions(+), 440 deletions(-)--
2.0.0
Signature · 1 line
Florian
Re: [PATCH 7/8] MIPS: BCM63XX: remove !RUNTIME_DETECT in cpu-feature-overrides
In reply to Jonas GorskiQuoted 13 lines · Jonas Gorski
All three SoCs have in common they have a BMIPS32/BMIPS3300 CPU, so we can replace this as no SoC with BMIPS4350 support enabled.
Signed-off-by Jonas Gorski <[email protected]>--- arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h +0
-0
arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h line 29
Quoted 7 lines
arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h +1
-1@@ -24,7 +24,7 @@#define cpu_has_smartmips 0#define cpu_has_vtag_icache 0 -#if !defined(BCMCPU_RUNTIME_DETECT ) && (defined(CONFIG_BCM63XX_CPU_6348 ) || defined(CONFIG_BCM63XX_CPU_6345 ) || defined(CONFIG_BCM63XX_CPU_6338 )) +#if !defined(CONFIG_SYS_HAS_CPU_BMIPS4350 )#define cpu_has_dc_aliases 0#endif
Note that BCM6318 uses a 40nm BMIPS3300 with a 32kB D$. I haven't actually booted one of these myself but I would assume the way size is either 16kB or 8kB.
I'm seeing another issue with the generic cpu_has_dc_aliases implementation (cpu_data[0].dcache.flags & MIPS_CACHE_ALIASES). The HIGHMEM check in paging_init() runs before cpu_cache_init(), so cpu_data[0].dcache.flags is still 0 and cpu_has_dc_aliases will never be true at this point unless it was defined at compile time.
There seem to be some other problems with the way the HIGHMEM check is handled, and I'm tempted to just move it after cpu_cache_init() and make it a fatal error condition. Then it can be removed entirely when imgtec finalizes the "cache aliases + HIGHMEM" patch series.
Any opinions?