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 | 36 | ||||
-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/prom.c | 3 | ||||
-rw-r--r-- | arch/mips/bcm63xx/setup.c | 4 |
7 files changed, 61 insertions, 26 deletions
diff --git a/arch/mips/bcm63xx/Makefile b/arch/mips/bcm63xx/Makefile index c146d1ededed..00064b660809 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 78e155d21be6..1fe412c43171 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: " |
@@ -347,27 +346,26 @@ static struct board_info __initdata board_96348gw = { | |||
347 | }; | 346 | }; |
348 | 347 | ||
349 | static struct board_info __initdata board_FAST2404 = { | 348 | static struct board_info __initdata board_FAST2404 = { |
350 | .name = "F@ST2404", | 349 | .name = "F@ST2404", |
351 | .expected_cpu_id = 0x6348, | 350 | .expected_cpu_id = 0x6348, |
352 | |||
353 | .has_enet0 = 1, | ||
354 | .has_enet1 = 1, | ||
355 | .has_pci = 1, | ||
356 | 351 | ||
357 | .enet0 = { | 352 | .has_enet0 = 1, |
358 | .has_phy = 1, | 353 | .has_enet1 = 1, |
359 | .use_internal_phy = 1, | 354 | .has_pci = 1, |
360 | }, | ||
361 | 355 | ||
362 | .enet1 = { | 356 | .enet0 = { |
363 | .force_speed_100 = 1, | 357 | .has_phy = 1, |
364 | .force_duplex_full = 1, | 358 | .use_internal_phy = 1, |
365 | }, | 359 | }, |
366 | 360 | ||
361 | .enet1 = { | ||
362 | .force_speed_100 = 1, | ||
363 | .force_duplex_full = 1, | ||
364 | }, | ||
367 | 365 | ||
368 | .has_ohci0 = 1, | 366 | .has_ohci0 = 1, |
369 | .has_pccard = 1, | 367 | .has_pccard = 1, |
370 | .has_ehci0 = 1, | 368 | .has_ehci0 = 1, |
371 | }; | 369 | }; |
372 | 370 | ||
373 | static struct board_info __initdata board_DV201AMR = { | 371 | static struct board_info __initdata board_DV201AMR = { |
@@ -794,8 +792,6 @@ int __init board_register_devices(void) | |||
794 | { | 792 | { |
795 | u32 val; | 793 | u32 val; |
796 | 794 | ||
797 | bcm63xx_uart_register(); | ||
798 | |||
799 | if (board.has_pccard) | 795 | if (board.has_pccard) |
800 | bcm63xx_pcmcia_register(); | 796 | bcm63xx_pcmcia_register(); |
801 | 797 | ||
diff --git a/arch/mips/bcm63xx/cpu.c b/arch/mips/bcm63xx/cpu.c index 6dc43f0483e8..70378bb5e3f9 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 5f3d89c4a988..b0519461ad9b 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 000000000000..3e6c716a4c11 --- /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/prom.c b/arch/mips/bcm63xx/prom.c index fb284fbc5853..be252efa0757 100644 --- a/arch/mips/bcm63xx/prom.c +++ b/arch/mips/bcm63xx/prom.c | |||
@@ -40,9 +40,6 @@ void __init prom_init(void) | |||
40 | reg &= ~mask; | 40 | reg &= ~mask; |
41 | bcm_perf_writel(reg, PERF_CKCTL_REG); | 41 | bcm_perf_writel(reg, PERF_CKCTL_REG); |
42 | 42 | ||
43 | /* assign command line from kernel config */ | ||
44 | strcpy(arcs_cmdline, CONFIG_CMDLINE); | ||
45 | |||
46 | /* register gpiochip */ | 43 | /* register gpiochip */ |
47 | bcm63xx_gpio_init(); | 44 | bcm63xx_gpio_init(); |
48 | 45 | ||
diff --git a/arch/mips/bcm63xx/setup.c b/arch/mips/bcm63xx/setup.c index b18a0ca926fa..d0056598fbfc 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 | } |