setup.c (01b944fe1cd4e21a2a9ed51adbdbafe2d5e905ba) setup.c (63893ea5304c919656613a47b04e35c6814d9041)
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 Maxime Bizon <mbizon@freebox.fr>
7 */
8

--- 10 unchanged lines hidden (view full) ---

19#include <bcm63xx_board.h>
20#include <bcm63xx_cpu.h>
21#include <bcm63xx_regs.h>
22#include <bcm63xx_io.h>
23#include <bcm63xx_gpio.h>
24
25void bcm63xx_machine_halt(void)
26{
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 Maxime Bizon <mbizon@freebox.fr>
7 */
8

--- 10 unchanged lines hidden (view full) ---

19#include <bcm63xx_board.h>
20#include <bcm63xx_cpu.h>
21#include <bcm63xx_regs.h>
22#include <bcm63xx_io.h>
23#include <bcm63xx_gpio.h>
24
25void bcm63xx_machine_halt(void)
26{
27 printk(KERN_INFO "System halted\n");
27 pr_info("System halted\n");
28 while (1)
29 ;
30}
31
32static void bcm6348_a1_reboot(void)
33{
34 u32 reg;
35
36 /* soft reset all blocks */
28 while (1)
29 ;
30}
31
32static void bcm6348_a1_reboot(void)
33{
34 u32 reg;
35
36 /* soft reset all blocks */
37 printk(KERN_INFO "soft-resetting all blocks ...\n");
37 pr_info("soft-resetting all blocks ...\n");
38 reg = bcm_perf_readl(PERF_SOFTRESET_REG);
39 reg &= ~SOFTRESET_6348_ALL;
40 bcm_perf_writel(reg, PERF_SOFTRESET_REG);
41 mdelay(10);
42
43 reg = bcm_perf_readl(PERF_SOFTRESET_REG);
44 reg |= SOFTRESET_6348_ALL;
45 bcm_perf_writel(reg, PERF_SOFTRESET_REG);
46 mdelay(10);
47
48 /* Jump to the power on address. */
38 reg = bcm_perf_readl(PERF_SOFTRESET_REG);
39 reg &= ~SOFTRESET_6348_ALL;
40 bcm_perf_writel(reg, PERF_SOFTRESET_REG);
41 mdelay(10);
42
43 reg = bcm_perf_readl(PERF_SOFTRESET_REG);
44 reg |= SOFTRESET_6348_ALL;
45 bcm_perf_writel(reg, PERF_SOFTRESET_REG);
46 mdelay(10);
47
48 /* Jump to the power on address. */
49 printk(KERN_INFO "jumping to reset vector.\n");
49 pr_info("jumping to reset vector.\n");
50 /* set high vectors (base at 0xbfc00000 */
51 set_c0_status(ST0_BEV | ST0_ERL);
52 /* run uncached in kseg0 */
53 change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED);
54 __flush_cache_all();
55 /* remove all wired TLB entries */
56 write_c0_wired(0);
57 __asm__ __volatile__(

--- 47 unchanged lines hidden (view full) ---

105 reg |= EXTIRQ_CFG_CLEAR_ALL;
106 }
107 bcm_perf_writel(reg, perf_regs[i]);
108 }
109
110 if (BCMCPU_IS_6348() && (bcm63xx_get_cpu_rev() == 0xa1))
111 bcm6348_a1_reboot();
112
50 /* set high vectors (base at 0xbfc00000 */
51 set_c0_status(ST0_BEV | ST0_ERL);
52 /* run uncached in kseg0 */
53 change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED);
54 __flush_cache_all();
55 /* remove all wired TLB entries */
56 write_c0_wired(0);
57 __asm__ __volatile__(

--- 47 unchanged lines hidden (view full) ---

105 reg |= EXTIRQ_CFG_CLEAR_ALL;
106 }
107 bcm_perf_writel(reg, perf_regs[i]);
108 }
109
110 if (BCMCPU_IS_6348() && (bcm63xx_get_cpu_rev() == 0xa1))
111 bcm6348_a1_reboot();
112
113 printk(KERN_INFO "triggering watchdog soft-reset...\n");
113 pr_info("triggering watchdog soft-reset...\n");
114 if (BCMCPU_IS_6328()) {
115 bcm_wdt_writel(1, WDT_SOFTRESET_REG);
116 } else {
117 reg = bcm_perf_readl(PERF_SYS_PLL_CTL_REG);
118 reg |= SYS_PLL_SOFT_RESET;
119 bcm_perf_writel(reg, PERF_SYS_PLL_CTL_REG);
120 }
121 while (1)

--- 49 unchanged lines hidden ---
114 if (BCMCPU_IS_6328()) {
115 bcm_wdt_writel(1, WDT_SOFTRESET_REG);
116 } else {
117 reg = bcm_perf_readl(PERF_SYS_PLL_CTL_REG);
118 reg |= SYS_PLL_SOFT_RESET;
119 bcm_perf_writel(reg, PERF_SYS_PLL_CTL_REG);
120 }
121 while (1)

--- 49 unchanged lines hidden ---