Skip to content

Commit 382fc33

Browse files
committed
Merge branch 'master' of git://dev.phrozen.org/mips-next into mips-for-linux-next
2 parents 97541cc + 986936d commit 382fc33

24 files changed

Lines changed: 1045 additions & 251 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Cavium, Inc. OCTEON SOC SPI master controller.
2+
3+
Required properties:
4+
- compatible : "cavium,octeon-3010-spi"
5+
- reg : The register base for the controller.
6+
- interrupts : One interrupt, used by the controller.
7+
- #address-cells : <1>, as required by generic SPI binding.
8+
- #size-cells : <0>, also as required by generic SPI binding.
9+
10+
Child nodes as per the generic SPI binding.
11+
12+
Example:
13+
14+
spi@1070000001000 {
15+
compatible = "cavium,octeon-3010-spi";
16+
reg = <0x10700 0x00001000 0x0 0x100>;
17+
interrupts = <0 58>;
18+
#address-cells = <1>;
19+
#size-cells = <0>;
20+
21+
eeprom@0 {
22+
compatible = "st,m95256", "atmel,at25";
23+
reg = <0>;
24+
spi-max-frequency = <5000000>;
25+
spi-cpha;
26+
spi-cpol;
27+
28+
pagesize = <64>;
29+
size = <32768>;
30+
address-width = <16>;
31+
};
32+
};
33+

‎arch/mips/Kconfig‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,7 @@ config NLM_XLP_BOARD
844844
select ZONE_DMA if 64BIT
845845
select SYNC_R4K
846846
select SYS_HAS_EARLY_PRINTK
847+
select USE_OF
847848
help
848849
This board is based on Netlogic XLP Processor.
849850
Say Y here if you have a XLP based board.
@@ -1892,6 +1893,18 @@ config SIBYTE_DMA_PAGEOPS
18921893
config CPU_HAS_PREFETCH
18931894
bool
18941895

1896+
config CPU_GENERIC_DUMP_TLB
1897+
bool
1898+
default y if !(CPU_R3000 || CPU_R6000 || CPU_R8000 || CPU_TX39XX)
1899+
1900+
config CPU_R4K_FPU
1901+
bool
1902+
default y if !(CPU_R3000 || CPU_R6000 || CPU_TX39XX || CPU_CAVIUM_OCTEON)
1903+
1904+
config CPU_R4K_CACHE_TLB
1905+
bool
1906+
default y if !(CPU_R3000 || CPU_R8000 || CPU_SB1 || CPU_TX39XX || CPU_CAVIUM_OCTEON)
1907+
18951908
choice
18961909
prompt "MIPS MT options"
18971910

‎arch/mips/bcm63xx/irq.c‎

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ static void __internal_irq_unmask_64(unsigned int irq) __maybe_unused;
5656
#define is_ext_irq_cascaded 0
5757
#define ext_irq_start 0
5858
#define ext_irq_end 0
59-
#define ext_irq_count 0
60-
#define ext_irq_cfg_reg1 0
59+
#define ext_irq_count 4
60+
#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6345
6161
#define ext_irq_cfg_reg2 0
6262
#endif
6363
#ifdef CONFIG_BCM63XX_CPU_6348
@@ -143,11 +143,15 @@ static void bcm63xx_init_irq(void)
143143
irq_stat_addr += PERF_IRQSTAT_6338_REG;
144144
irq_mask_addr += PERF_IRQMASK_6338_REG;
145145
irq_bits = 32;
146+
ext_irq_count = 4;
147+
ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6338;
146148
break;
147149
case BCM6345_CPU_ID:
148150
irq_stat_addr += PERF_IRQSTAT_6345_REG;
149151
irq_mask_addr += PERF_IRQMASK_6345_REG;
150152
irq_bits = 32;
153+
ext_irq_count = 4;
154+
ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6345;
151155
break;
152156
case BCM6348_CPU_ID:
153157
irq_stat_addr += PERF_IRQSTAT_6348_REG;
@@ -434,7 +438,8 @@ static int bcm63xx_external_irq_set_type(struct irq_data *d,
434438
reg = bcm_perf_readl(regaddr);
435439
irq %= 4;
436440

437-
if (BCMCPU_IS_6348()) {
441+
switch (bcm63xx_get_cpu_id()) {
442+
case BCM6348_CPU_ID:
438443
if (levelsense)
439444
reg |= EXTIRQ_CFG_LEVELSENSE_6348(irq);
440445
else
@@ -447,9 +452,13 @@ static int bcm63xx_external_irq_set_type(struct irq_data *d,
447452
reg |= EXTIRQ_CFG_BOTHEDGE_6348(irq);
448453
else
449454
reg &= ~EXTIRQ_CFG_BOTHEDGE_6348(irq);
450-
}
455+
break;
451456

452-
if (BCMCPU_IS_6338() || BCMCPU_IS_6358() || BCMCPU_IS_6368()) {
457+
case BCM6328_CPU_ID:
458+
case BCM6338_CPU_ID:
459+
case BCM6345_CPU_ID:
460+
case BCM6358_CPU_ID:
461+
case BCM6368_CPU_ID:
453462
if (levelsense)
454463
reg |= EXTIRQ_CFG_LEVELSENSE(irq);
455464
else
@@ -462,6 +471,9 @@ static int bcm63xx_external_irq_set_type(struct irq_data *d,
462471
reg |= EXTIRQ_CFG_BOTHEDGE(irq);
463472
else
464473
reg &= ~EXTIRQ_CFG_BOTHEDGE(irq);
474+
break;
475+
default:
476+
BUG();
465477
}
466478

467479
bcm_perf_writel(reg, regaddr);

‎arch/mips/bcm63xx/setup.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ void bcm63xx_machine_reboot(void)
7474
case BCM6338_CPU_ID:
7575
perf_regs[0] = PERF_EXTIRQ_CFG_REG_6338;
7676
break;
77+
case BCM6345_CPU_ID:
78+
perf_regs[0] = PERF_EXTIRQ_CFG_REG_6345;
79+
break;
7780
case BCM6348_CPU_ID:
7881
perf_regs[0] = PERF_EXTIRQ_CFG_REG_6348;
7982
break;
@@ -83,6 +86,9 @@ void bcm63xx_machine_reboot(void)
8386
}
8487

8588
for (i = 0; i < 2; i++) {
89+
if (!perf_regs[i])
90+
break;
91+
8692
reg = bcm_perf_readl(perf_regs[i]);
8793
if (BCMCPU_IS_6348()) {
8894
reg &= ~EXTIRQ_CFG_MASK_ALL_6348;

0 commit comments

Comments
 (0)