MIPS: BCM63XX: select BOOT_RAW
[deliverable/linux.git] / arch / mips / bcm63xx / prom.c
CommitLineData
e7300d04
MB
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
9#include <linux/init.h>
10#include <linux/bootmem.h>
11#include <asm/bootinfo.h>
12#include <bcm63xx_board.h>
13#include <bcm63xx_cpu.h>
14#include <bcm63xx_io.h>
15#include <bcm63xx_regs.h>
16#include <bcm63xx_gpio.h>
17
18void __init prom_init(void)
19{
20 u32 reg, mask;
21
22 bcm63xx_cpu_init();
23
24 /* stop any running watchdog */
25 bcm_wdt_writel(WDT_STOP_1, WDT_CTL_REG);
26 bcm_wdt_writel(WDT_STOP_2, WDT_CTL_REG);
27
28 /* disable all hardware blocks clock for now */
e5766aea
JG
29 if (BCMCPU_IS_6328())
30 mask = CKCTL_6328_ALL_SAFE_EN;
31 else if (BCMCPU_IS_6338())
e7300d04
MB
32 mask = CKCTL_6338_ALL_SAFE_EN;
33 else if (BCMCPU_IS_6345())
34 mask = CKCTL_6345_ALL_SAFE_EN;
35 else if (BCMCPU_IS_6348())
36 mask = CKCTL_6348_ALL_SAFE_EN;
04712f3f 37 else if (BCMCPU_IS_6358())
e7300d04 38 mask = CKCTL_6358_ALL_SAFE_EN;
2c8aaf71
JG
39 else if (BCMCPU_IS_6362())
40 mask = CKCTL_6362_ALL_SAFE_EN;
04712f3f
MB
41 else if (BCMCPU_IS_6368())
42 mask = CKCTL_6368_ALL_SAFE_EN;
43 else
44 mask = 0;
e7300d04
MB
45
46 reg = bcm_perf_readl(PERF_CKCTL_REG);
47 reg &= ~mask;
48 bcm_perf_writel(reg, PERF_CKCTL_REG);
49
e7300d04
MB
50 /* register gpiochip */
51 bcm63xx_gpio_init();
52
53 /* do low level board init */
54 board_prom_init();
55}
56
57void __init prom_free_prom_memory(void)
58{
59}
This page took 0.34584 seconds and 5 git commands to generate.