diff options
Diffstat (limited to 'arch/mips/bcm63xx')
-rw-r--r-- | arch/mips/bcm63xx/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/bcm63xx/boards/board_bcm963xx.c | 3 | ||||
-rw-r--r-- | arch/mips/bcm63xx/cpu.c | 3 | ||||
-rw-r--r-- | arch/mips/bcm63xx/dev-uart.c | 2 | ||||
-rw-r--r-- | arch/mips/bcm63xx/dev-wdt.c | 37 | ||||
-rw-r--r-- | arch/mips/bcm63xx/setup.c | 4 |
6 files changed, 45 insertions, 6 deletions
diff --git a/arch/mips/bcm63xx/Makefile b/arch/mips/bcm63xx/Makefile index c146d1edede..00064b66080 100644 --- a/arch/mips/bcm63xx/Makefile +++ b/arch/mips/bcm63xx/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | obj-y += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \ | 1 | 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 |
3 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | 3 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
4 | 4 | ||
5 | obj-y += boards/ | 5 | obj-y += boards/ |
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c index 78e155d21be..05a35cf5963 100644 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <bcm63xx_dev_enet.h> | 24 | #include <bcm63xx_dev_enet.h> |
25 | #include <bcm63xx_dev_dsp.h> | 25 | #include <bcm63xx_dev_dsp.h> |
26 | #include <bcm63xx_dev_pcmcia.h> | 26 | #include <bcm63xx_dev_pcmcia.h> |
27 | #include <bcm63xx_dev_uart.h> | ||
28 | #include <board_bcm963xx.h> | 27 | #include <board_bcm963xx.h> |
29 | 28 | ||
30 | #define PFX "board_bcm963xx: " | 29 | #define PFX "board_bcm963xx: " |
@@ -794,8 +793,6 @@ int __init board_register_devices(void) | |||
794 | { | 793 | { |
795 | u32 val; | 794 | u32 val; |
796 | 795 | ||
797 | bcm63xx_uart_register(); | ||
798 | |||
799 | if (board.has_pccard) | 796 | if (board.has_pccard) |
800 | bcm63xx_pcmcia_register(); | 797 | bcm63xx_pcmcia_register(); |
801 | 798 | ||
diff --git a/arch/mips/bcm63xx/cpu.c b/arch/mips/bcm63xx/cpu.c index 6dc43f0483e..70378bb5e3f 100644 --- a/arch/mips/bcm63xx/cpu.c +++ b/arch/mips/bcm63xx/cpu.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/cpu.h> | 12 | #include <linux/cpu.h> |
13 | #include <asm/cpu-info.h> | ||
13 | #include <bcm63xx_cpu.h> | 14 | #include <bcm63xx_cpu.h> |
14 | #include <bcm63xx_regs.h> | 15 | #include <bcm63xx_regs.h> |
15 | #include <bcm63xx_io.h> | 16 | #include <bcm63xx_io.h> |
@@ -284,6 +285,7 @@ void __init bcm63xx_cpu_init(void) | |||
284 | { | 285 | { |
285 | unsigned int tmp, expected_cpu_id; | 286 | unsigned int tmp, expected_cpu_id; |
286 | struct cpuinfo_mips *c = ¤t_cpu_data; | 287 | struct cpuinfo_mips *c = ¤t_cpu_data; |
288 | unsigned int cpu = smp_processor_id(); | ||
287 | 289 | ||
288 | /* soc registers location depends on cpu type */ | 290 | /* soc registers location depends on cpu type */ |
289 | expected_cpu_id = 0; | 291 | expected_cpu_id = 0; |
@@ -293,6 +295,7 @@ void __init bcm63xx_cpu_init(void) | |||
293 | * BCM6338 as the same PrId as BCM3302 see arch/mips/kernel/cpu-probe.c | 295 | * BCM6338 as the same PrId as BCM3302 see arch/mips/kernel/cpu-probe.c |
294 | */ | 296 | */ |
295 | case CPU_BCM3302: | 297 | case CPU_BCM3302: |
298 | __cpu_name[cpu] = "Broadcom BCM6338"; | ||
296 | expected_cpu_id = BCM6338_CPU_ID; | 299 | expected_cpu_id = BCM6338_CPU_ID; |
297 | bcm63xx_regs_base = bcm96338_regs_base; | 300 | bcm63xx_regs_base = bcm96338_regs_base; |
298 | bcm63xx_irqs = bcm96338_irqs; | 301 | bcm63xx_irqs = bcm96338_irqs; |
diff --git a/arch/mips/bcm63xx/dev-uart.c b/arch/mips/bcm63xx/dev-uart.c index 5f3d89c4a98..b0519461ad9 100644 --- a/arch/mips/bcm63xx/dev-uart.c +++ b/arch/mips/bcm63xx/dev-uart.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <bcm63xx_cpu.h> | 12 | #include <bcm63xx_cpu.h> |
13 | #include <bcm63xx_dev_uart.h> | ||
14 | 13 | ||
15 | static struct resource uart_resources[] = { | 14 | static struct resource uart_resources[] = { |
16 | { | 15 | { |
@@ -39,3 +38,4 @@ int __init bcm63xx_uart_register(void) | |||
39 | uart_resources[1].start = bcm63xx_get_irq_number(IRQ_UART0); | 38 | uart_resources[1].start = bcm63xx_get_irq_number(IRQ_UART0); |
40 | return platform_device_register(&bcm63xx_uart_device); | 39 | return platform_device_register(&bcm63xx_uart_device); |
41 | } | 40 | } |
41 | arch_initcall(bcm63xx_uart_register); | ||
diff --git a/arch/mips/bcm63xx/dev-wdt.c b/arch/mips/bcm63xx/dev-wdt.c new file mode 100644 index 00000000000..3e6c716a4c1 --- /dev/null +++ b/arch/mips/bcm63xx/dev-wdt.c | |||
@@ -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 <florian@openwrt.org> | ||
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); | ||
diff --git a/arch/mips/bcm63xx/setup.c b/arch/mips/bcm63xx/setup.c index b18a0ca926f..d0056598fbf 100644 --- a/arch/mips/bcm63xx/setup.c +++ b/arch/mips/bcm63xx/setup.c | |||
@@ -75,7 +75,9 @@ void bcm63xx_machine_reboot(void) | |||
75 | bcm6348_a1_reboot(); | 75 | bcm6348_a1_reboot(); |
76 | 76 | ||
77 | printk(KERN_INFO "triggering watchdog soft-reset...\n"); | 77 | 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); | ||
79 | while (1) | 81 | while (1) |
80 | ; | 82 | ; |
81 | } | 83 | } |