summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-highbank/core.c
blob: 967d13f9390d1abd1c1a2113ffd2407a0d08fd42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * Copyright (C) 2009 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com>
 *
 * GPLv2 only
 */

#include <common.h>
#include <init.h>
#include <io.h>

#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/amba/bus.h>

#include <asm/hardware/arm_timer.h>

#include <mach/devices.h>
#include <mach/hardware.h>
#include <mach/sysregs.h>

void __iomem *sregs_base = IOMEM(HB_SREG_A9_BASE);

static void highbank_clk_init(void)
{
	struct clk *clk;

	clk = clk_fixed("dummy_apb_pclk", 0);
	clk_register_clkdev(clk, "apb_pclk", NULL);

	clk = clk_fixed("pclk", 150000000);
	clk_register_clkdev(clk, NULL, "sp804");
	clk_register_clkdev(clk, NULL, "uart-pl011");
}

static void highbank_sp804_init(void)
{
	amba_apb_device_add(NULL, "sp804", DEVICE_ID_SINGLE, 0xfff34000, 4096, NULL, 0);
}

static int highbank_init(void)
{
	highbank_clk_init();
	highbank_sp804_init();

	return 0;
}
postcore_initcall(highbank_init);