diff options
author | Haojian Zhuang <haojian.zhuang@marvell.com> | 2009-12-04 09:41:28 -0500 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-03-01 18:40:55 -0500 |
commit | 2f7e8faef5a50efaa1c173e99bdaa29e0129bb99 (patch) | |
tree | c73ae01004e110a87b7cf6cae686b9c142e2a63b /arch/arm/mach-mmp/mmp2.c | |
parent | 978da5bcdb33f6e030fa3304662e2455a018f1b0 (diff) |
[ARM] mmp: add support for Marvell MMP2
Marvell MMP2 (aka ARMADA610) is a SoC based on PJ4 core. It's
ARMv6 compatible. Support basic interrupt handler and timer,
and basic support for MMP2 based FLINT platform.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-mmp/mmp2.c')
-rw-r--r-- | arch/arm/mach-mmp/mmp2.c | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c new file mode 100644 index 000000000000..a9ca93d97412 --- /dev/null +++ b/arch/arm/mach-mmp/mmp2.c | |||
@@ -0,0 +1,83 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-mmp/mmp2.c | ||
3 | * | ||
4 | * code name MMP2 | ||
5 | * | ||
6 | * Copyright (C) 2009 Marvell International Ltd. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/module.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/io.h> | ||
17 | |||
18 | #include <mach/addr-map.h> | ||
19 | #include <mach/regs-apbc.h> | ||
20 | #include <mach/regs-apmu.h> | ||
21 | #include <mach/cputype.h> | ||
22 | #include <mach/irqs.h> | ||
23 | #include <mach/mfp.h> | ||
24 | #include <mach/devices.h> | ||
25 | |||
26 | #include "common.h" | ||
27 | #include "clock.h" | ||
28 | |||
29 | #define MFPR_VIRT_BASE (APB_VIRT_BASE + 0x1e000) | ||
30 | |||
31 | /* APB peripheral clocks */ | ||
32 | static APBC_CLK(uart1, MMP2_UART1, 1, 26000000); | ||
33 | static APBC_CLK(uart2, MMP2_UART2, 1, 26000000); | ||
34 | static APBC_CLK(uart3, MMP2_UART3, 1, 26000000); | ||
35 | static APBC_CLK(uart4, MMP2_UART4, 1, 26000000); | ||
36 | static APBC_CLK(twsi1, MMP2_TWSI1, 0, 26000000); | ||
37 | static APBC_CLK(twsi2, MMP2_TWSI2, 0, 26000000); | ||
38 | static APBC_CLK(twsi3, MMP2_TWSI3, 0, 26000000); | ||
39 | static APBC_CLK(twsi4, MMP2_TWSI4, 0, 26000000); | ||
40 | static APBC_CLK(twsi5, MMP2_TWSI5, 0, 26000000); | ||
41 | static APBC_CLK(twsi6, MMP2_TWSI6, 0, 26000000); | ||
42 | static APBC_CLK(rtc, MMP2_RTC, 0, 32768); | ||
43 | |||
44 | static APMU_CLK(nand, NAND, 0xbf, 100000000); | ||
45 | |||
46 | static struct clk_lookup mmp2_clkregs[] = { | ||
47 | INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL), | ||
48 | INIT_CLKREG(&clk_uart2, "pxa2xx-uart.1", NULL), | ||
49 | INIT_CLKREG(&clk_uart3, "pxa2xx-uart.2", NULL), | ||
50 | INIT_CLKREG(&clk_uart4, "pxa2xx-uart.3", NULL), | ||
51 | INIT_CLKREG(&clk_twsi1, "pxa2xx-i2c.0", NULL), | ||
52 | INIT_CLKREG(&clk_twsi2, "pxa2xx-i2c.1", NULL), | ||
53 | INIT_CLKREG(&clk_twsi3, "pxa2xx-i2c.2", NULL), | ||
54 | INIT_CLKREG(&clk_twsi4, "pxa2xx-i2c.3", NULL), | ||
55 | INIT_CLKREG(&clk_twsi5, "pxa2xx-i2c.4", NULL), | ||
56 | INIT_CLKREG(&clk_twsi6, "pxa2xx-i2c.5", NULL), | ||
57 | INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL), | ||
58 | }; | ||
59 | |||
60 | static int __init mmp2_init(void) | ||
61 | { | ||
62 | if (cpu_is_mmp2()) { | ||
63 | mfp_init_base(MFPR_VIRT_BASE); | ||
64 | clks_register(ARRAY_AND_SIZE(mmp2_clkregs)); | ||
65 | } | ||
66 | |||
67 | return 0; | ||
68 | } | ||
69 | postcore_initcall(mmp2_init); | ||
70 | |||
71 | /* on-chip devices */ | ||
72 | MMP2_DEVICE(uart1, "pxa2xx-uart", 0, UART1, 0xd4030000, 0x30, 4, 5); | ||
73 | MMP2_DEVICE(uart2, "pxa2xx-uart", 1, UART2, 0xd4017000, 0x30, 20, 21); | ||
74 | MMP2_DEVICE(uart3, "pxa2xx-uart", 2, UART3, 0xd4018000, 0x30, 22, 23); | ||
75 | MMP2_DEVICE(uart4, "pxa2xx-uart", 3, UART4, 0xd4016000, 0x30, 18, 19); | ||
76 | MMP2_DEVICE(twsi1, "pxa2xx-i2c", 0, TWSI1, 0xd4011000, 0x70); | ||
77 | MMP2_DEVICE(twsi2, "pxa2xx-i2c", 1, TWSI2, 0xd4031000, 0x70); | ||
78 | MMP2_DEVICE(twsi3, "pxa2xx-i2c", 2, TWSI3, 0xd4032000, 0x70); | ||
79 | MMP2_DEVICE(twsi4, "pxa2xx-i2c", 3, TWSI4, 0xd4033000, 0x70); | ||
80 | MMP2_DEVICE(twsi5, "pxa2xx-i2c", 4, TWSI5, 0xd4033800, 0x70); | ||
81 | MMP2_DEVICE(twsi6, "pxa2xx-i2c", 5, TWSI6, 0xd4034000, 0x70); | ||
82 | MMP2_DEVICE(nand, "pxa3xx-nand", -1, NAND, 0xd4283000, 0x100, 28, 29); | ||
83 | |||