Skip to content

Commit 9ddfd92

Browse files
committed
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (38 commits) MIPS: O32: Fix ppoll MIPS: Oprofile: Rename cpu_type from godson2 to loongson2 MIPS: Alchemy: Fix hang with high-frequency edge interrupts MIPS: TXx9: Fix spi-baseclk value MIPS: bcm63xx: Set the correct BCM3302 CPU name MIPS: Loongson 2: Set cpu_has_dc_aliases and cpu_icache_snoops_remote_store MIPS: Avoid potential hazard on Context register MIPS: Octeon: Use lockless interrupt controller operations when possible. MIPS: Octeon: Use write_{un,}lock_irq{restore,save} to set irq affinity MIPS: Set S-cache linesize to 64-bytes for MTI's S-cache MIPS: SMTC: Avoid queing multiple reschedule IPIs MIPS: GCMP: Avoid accessing registers when they are not present MIPS: GIC: Random fixes and enhancements. MIPS: CMP: Fix memory barriers for correct operation of amon_cpu_start MIPS: Fix abs.[sd] and neg.[sd] emulation for NaN operands MIPS: SPRAM: Clean up support code a little MIPS: 1004K: Enable SPRAM support. MIPS: Malta: Enable PCI 2.1 compatibility in PIIX4 MIPS: Kconfig: Fix duplicate default value for MIPS_L1_CACHE_SHIFT. MIPS: MTI: Fix accesses to device registers on MIPS boards ...
2 parents 38dc634 + 049a31a commit 9ddfd92

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+544
-440
lines changed

arch/mips/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,9 +1012,9 @@ config BOOT_ELF32
10121012

10131013
config MIPS_L1_CACHE_SHIFT
10141014
int
1015-
default "4" if MACH_DECSTATION || MIKROTIK_RB532
1015+
default "4" if MACH_DECSTATION || MIKROTIK_RB532 || PMC_MSP4200_EVAL
1016+
default "6" if MIPS_CPU_SCACHE
10161017
default "7" if SGI_IP22 || SGI_IP27 || SGI_IP28 || SNI_RM || CPU_CAVIUM_OCTEON
1017-
default "4" if PMC_MSP4200_EVAL
10181018
default "5"
10191019

10201020
config HAVE_STD_PC_SERIAL_PORT

arch/mips/alchemy/common/irq.c

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,28 @@ static void au1x_ic1_ack(unsigned int irq_nr)
354354
au_sync();
355355
}
356356

357+
static void au1x_ic0_maskack(unsigned int irq_nr)
358+
{
359+
unsigned int bit = irq_nr - AU1000_INTC0_INT_BASE;
360+
361+
au_writel(1 << bit, IC0_WAKECLR);
362+
au_writel(1 << bit, IC0_MASKCLR);
363+
au_writel(1 << bit, IC0_RISINGCLR);
364+
au_writel(1 << bit, IC0_FALLINGCLR);
365+
au_sync();
366+
}
367+
368+
static void au1x_ic1_maskack(unsigned int irq_nr)
369+
{
370+
unsigned int bit = irq_nr - AU1000_INTC1_INT_BASE;
371+
372+
au_writel(1 << bit, IC1_WAKECLR);
373+
au_writel(1 << bit, IC1_MASKCLR);
374+
au_writel(1 << bit, IC1_RISINGCLR);
375+
au_writel(1 << bit, IC1_FALLINGCLR);
376+
au_sync();
377+
}
378+
357379
static int au1x_ic1_setwake(unsigned int irq, unsigned int on)
358380
{
359381
unsigned int bit = irq - AU1000_INTC1_INT_BASE;
@@ -379,25 +401,21 @@ static int au1x_ic1_setwake(unsigned int irq, unsigned int on)
379401
/*
380402
* irq_chips for both ICs; this way the mask handlers can be
381403
* as short as possible.
382-
*
383-
* NOTE: the ->ack() callback is used by the handle_edge_irq
384-
* flowhandler only, the ->mask_ack() one by handle_level_irq,
385-
* so no need for an irq_chip for each type of irq (level/edge).
386404
*/
387405
static struct irq_chip au1x_ic0_chip = {
388406
.name = "Alchemy-IC0",
389-
.ack = au1x_ic0_ack, /* edge */
407+
.ack = au1x_ic0_ack,
390408
.mask = au1x_ic0_mask,
391-
.mask_ack = au1x_ic0_mask, /* level */
409+
.mask_ack = au1x_ic0_maskack,
392410
.unmask = au1x_ic0_unmask,
393411
.set_type = au1x_ic_settype,
394412
};
395413

396414
static struct irq_chip au1x_ic1_chip = {
397415
.name = "Alchemy-IC1",
398-
.ack = au1x_ic1_ack, /* edge */
416+
.ack = au1x_ic1_ack,
399417
.mask = au1x_ic1_mask,
400-
.mask_ack = au1x_ic1_mask, /* level */
418+
.mask_ack = au1x_ic1_maskack,
401419
.unmask = au1x_ic1_unmask,
402420
.set_type = au1x_ic_settype,
403421
.set_wake = au1x_ic1_setwake,

arch/mips/alchemy/mtx-1/board_setup.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ void __init board_setup(void)
6969
#else
7070
au_writel(0xf, Au1500_PCI_CFG);
7171
#endif
72+
board_pci_idsel = mtx1_pci_idsel;
7273
#endif
7374

7475
/* Initialize sys_pinfunc */
@@ -85,8 +86,6 @@ void __init board_setup(void)
8586
alchemy_gpio_direction_output(211, 1); /* green on */
8687
alchemy_gpio_direction_output(212, 0); /* red off */
8788

88-
board_pci_idsel = mtx1_pci_idsel;
89-
9089
printk(KERN_INFO "4G Systems MTX-1 Board\n");
9190
}
9291

arch/mips/ar7/platform.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@ static int __init ar7_register_devices(void)
503503
{
504504
u16 chip_id;
505505
int res;
506+
u32 *bootcr, val;
506507
#ifdef CONFIG_SERIAL_8250
507508
static struct uart_port uart_port[2];
508509

@@ -595,7 +596,13 @@ static int __init ar7_register_devices(void)
595596

596597
ar7_wdt_res.end = ar7_wdt_res.start + 0x20;
597598

598-
res = platform_device_register(&ar7_wdt);
599+
bootcr = (u32 *)ioremap_nocache(AR7_REGS_DCL, 4);
600+
val = *bootcr;
601+
iounmap(bootcr);
602+
603+
/* Register watchdog only if enabled in hardware */
604+
if (val & AR7_WDT_HW_ENA)
605+
res = platform_device_register(&ar7_wdt);
599606

600607
return res;
601608
}

arch/mips/bcm63xx/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
obj-y += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \
2-
dev-dsp.o dev-enet.o dev-pcmcia.o dev-uart.o
2+
dev-dsp.o dev-enet.o dev-pcmcia.o dev-uart.o dev-wdt.o
33
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
44

55
obj-y += boards/

arch/mips/bcm63xx/boards/board_bcm963xx.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <bcm63xx_dev_enet.h>
2525
#include <bcm63xx_dev_dsp.h>
2626
#include <bcm63xx_dev_pcmcia.h>
27-
#include <bcm63xx_dev_uart.h>
2827
#include <board_bcm963xx.h>
2928

3029
#define PFX "board_bcm963xx: "
@@ -794,8 +793,6 @@ int __init board_register_devices(void)
794793
{
795794
u32 val;
796795

797-
bcm63xx_uart_register();
798-
799796
if (board.has_pccard)
800797
bcm63xx_pcmcia_register();
801798

arch/mips/bcm63xx/cpu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/kernel.h>
1111
#include <linux/module.h>
1212
#include <linux/cpu.h>
13+
#include <asm/cpu-info.h>
1314
#include <bcm63xx_cpu.h>
1415
#include <bcm63xx_regs.h>
1516
#include <bcm63xx_io.h>
@@ -284,6 +285,7 @@ void __init bcm63xx_cpu_init(void)
284285
{
285286
unsigned int tmp, expected_cpu_id;
286287
struct cpuinfo_mips *c = &current_cpu_data;
288+
unsigned int cpu = smp_processor_id();
287289

288290
/* soc registers location depends on cpu type */
289291
expected_cpu_id = 0;
@@ -293,6 +295,7 @@ void __init bcm63xx_cpu_init(void)
293295
* BCM6338 as the same PrId as BCM3302 see arch/mips/kernel/cpu-probe.c
294296
*/
295297
case CPU_BCM3302:
298+
__cpu_name[cpu] = "Broadcom BCM6338";
296299
expected_cpu_id = BCM6338_CPU_ID;
297300
bcm63xx_regs_base = bcm96338_regs_base;
298301
bcm63xx_irqs = bcm96338_irqs;

arch/mips/bcm63xx/dev-uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <linux/kernel.h>
1111
#include <linux/platform_device.h>
1212
#include <bcm63xx_cpu.h>
13-
#include <bcm63xx_dev_uart.h>
1413

1514
static struct resource uart_resources[] = {
1615
{
@@ -39,3 +38,4 @@ int __init bcm63xx_uart_register(void)
3938
uart_resources[1].start = bcm63xx_get_irq_number(IRQ_UART0);
4039
return platform_device_register(&bcm63xx_uart_device);
4140
}
41+
arch_initcall(bcm63xx_uart_register);

arch/mips/bcm63xx/dev-wdt.c

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* This file is subject to the terms and conditions of the GNU General Public
3+
* License. See the file "COPYING" in the main directory of this archive
4+
* for more details.
5+
*
6+
* Copyright (C) 2008 Florian Fainelli <[email protected]>
7+
*/
8+
9+
#include <linux/init.h>
10+
#include <linux/kernel.h>
11+
#include <linux/platform_device.h>
12+
#include <bcm63xx_cpu.h>
13+
14+
static struct resource wdt_resources[] = {
15+
{
16+
.start = -1, /* filled at runtime */
17+
.end = -1, /* filled at runtime */
18+
.flags = IORESOURCE_MEM,
19+
},
20+
};
21+
22+
static struct platform_device bcm63xx_wdt_device = {
23+
.name = "bcm63xx-wdt",
24+
.id = 0,
25+
.num_resources = ARRAY_SIZE(wdt_resources),
26+
.resource = wdt_resources,
27+
};
28+
29+
int __init bcm63xx_wdt_register(void)
30+
{
31+
wdt_resources[0].start = bcm63xx_regset_address(RSET_WDT);
32+
wdt_resources[0].end = wdt_resources[0].start;
33+
wdt_resources[0].end += RSET_WDT_SIZE - 1;
34+
35+
return platform_device_register(&bcm63xx_wdt_device);
36+
}
37+
arch_initcall(bcm63xx_wdt_register);

arch/mips/bcm63xx/setup.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ void bcm63xx_machine_reboot(void)
7575
bcm6348_a1_reboot();
7676

7777
printk(KERN_INFO "triggering watchdog soft-reset...\n");
78-
bcm_perf_writel(SYS_PLL_SOFT_RESET, PERF_SYS_PLL_CTL_REG);
78+
reg = bcm_perf_readl(PERF_SYS_PLL_CTL_REG);
79+
reg |= SYS_PLL_SOFT_RESET;
80+
bcm_perf_writel(reg, PERF_SYS_PLL_CTL_REG);
7981
while (1)
8082
;
8183
}

0 commit comments

Comments
 (0)