diff options
author | Olof Johansson <olof@lixom.net> | 2012-03-08 12:27:07 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-03-08 12:27:07 -0500 |
commit | a58f67e70a6cad021ceebd1c8919b898dd5d5de3 (patch) | |
tree | 78cb630cb31a8cbec17463f9acc0f766707c232f /arch/arm/mach-mmp | |
parent | 4c6c826b22da9f6408b6bc6939a92aa0be838488 (diff) | |
parent | 46e446db4fb2cdb2f1bc69d3981fa23738a42835 (diff) |
Merge branch 'dt' of git://github.com/hzhuang1/linux into next/dt
* 'dt' of git://github.com/hzhuang1/linux: (6 commits)
Document: devicetree: add OF documents for arch-mmp
ARM: dts: append DTS file of pxa168
ARM: mmp: append OF support on pxa168
ARM: mmp: enable rtc clk in pxa168
i2c: pxa: add OF support
serial: pxa: add OF support
(plus update to v3.3-rc6)
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r-- | arch/arm/mach-mmp/Kconfig | 10 | ||||
-rw-r--r-- | arch/arm/mach-mmp/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-mmp/aspenite.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mmp/mmp-dt.c | 75 | ||||
-rw-r--r-- | arch/arm/mach-mmp/pxa168.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-mmp/tavorevb.c | 1 |
6 files changed, 88 insertions, 3 deletions
diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig index 323d4c9e9f44..5a90b9a3ab6e 100644 --- a/arch/arm/mach-mmp/Kconfig +++ b/arch/arm/mach-mmp/Kconfig | |||
@@ -2,6 +2,16 @@ if ARCH_MMP | |||
2 | 2 | ||
3 | menu "Marvell PXA168/910/MMP2 Implmentations" | 3 | menu "Marvell PXA168/910/MMP2 Implmentations" |
4 | 4 | ||
5 | config MACH_MMP_DT | ||
6 | bool "Support MMP2 platforms from device tree" | ||
7 | select CPU_PXA168 | ||
8 | select CPU_PXA910 | ||
9 | select USE_OF | ||
10 | help | ||
11 | Include support for Marvell MMP2 based platforms using | ||
12 | the device tree. Needn't select any other machine while | ||
13 | MACH_MMP_DT is enabled. | ||
14 | |||
5 | config MACH_ASPENITE | 15 | config MACH_ASPENITE |
6 | bool "Marvell's PXA168 Aspenite Development Board" | 16 | bool "Marvell's PXA168 Aspenite Development Board" |
7 | select CPU_PXA168 | 17 | select CPU_PXA168 |
diff --git a/arch/arm/mach-mmp/Makefile b/arch/arm/mach-mmp/Makefile index ba254a71691a..4fc0ff5dc96d 100644 --- a/arch/arm/mach-mmp/Makefile +++ b/arch/arm/mach-mmp/Makefile | |||
@@ -18,5 +18,6 @@ obj-$(CONFIG_MACH_TTC_DKB) += ttc_dkb.o | |||
18 | obj-$(CONFIG_MACH_BROWNSTONE) += brownstone.o | 18 | obj-$(CONFIG_MACH_BROWNSTONE) += brownstone.o |
19 | obj-$(CONFIG_MACH_FLINT) += flint.o | 19 | obj-$(CONFIG_MACH_FLINT) += flint.o |
20 | obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o | 20 | obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o |
21 | obj-$(CONFIG_MACH_MMP_DT) += mmp-dt.o | ||
21 | obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o | 22 | obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o |
22 | obj-$(CONFIG_MACH_GPLUGD) += gplugd.o | 23 | obj-$(CONFIG_MACH_GPLUGD) += gplugd.o |
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 17cb76060125..3588a5584153 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/mtd/partitions.h> | 17 | #include <linux/mtd/partitions.h> |
18 | #include <linux/mtd/nand.h> | 18 | #include <linux/mtd/nand.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/gpio.h> | ||
21 | 20 | ||
22 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-mmp/mmp-dt.c b/arch/arm/mach-mmp/mmp-dt.c new file mode 100644 index 000000000000..67075395e400 --- /dev/null +++ b/arch/arm/mach-mmp/mmp-dt.c | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-mmp/mmp-dt.c | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell Technology Group Ltd. | ||
5 | * Author: Haojian Zhuang <haojian.zhuang@marvell.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * publishhed by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/irq.h> | ||
13 | #include <linux/irqdomain.h> | ||
14 | #include <linux/of_irq.h> | ||
15 | #include <linux/of_platform.h> | ||
16 | #include <asm/mach/arch.h> | ||
17 | #include <mach/irqs.h> | ||
18 | |||
19 | #include "common.h" | ||
20 | |||
21 | extern struct sys_timer pxa168_timer; | ||
22 | extern void __init icu_init_irq(void); | ||
23 | |||
24 | static const struct of_dev_auxdata mmp_auxdata_lookup[] __initconst = { | ||
25 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.0", NULL), | ||
26 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.1", NULL), | ||
27 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4026000, "pxa2xx-uart.2", NULL), | ||
28 | OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4011000, "pxa2xx-i2c.0", NULL), | ||
29 | OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4025000, "pxa2xx-i2c.1", NULL), | ||
30 | OF_DEV_AUXDATA("mrvl,mmp-gpio", 0xd4019000, "pxa-gpio", NULL), | ||
31 | OF_DEV_AUXDATA("mrvl,mmp-rtc", 0xd4010000, "sa1100-rtc", NULL), | ||
32 | {} | ||
33 | }; | ||
34 | |||
35 | static int __init mmp_intc_add_irq_domain(struct device_node *np, | ||
36 | struct device_node *parent) | ||
37 | { | ||
38 | irq_domain_add_simple(np, 0); | ||
39 | return 0; | ||
40 | } | ||
41 | |||
42 | static int __init mmp_gpio_add_irq_domain(struct device_node *np, | ||
43 | struct device_node *parent) | ||
44 | { | ||
45 | irq_domain_add_simple(np, IRQ_GPIO_START); | ||
46 | return 0; | ||
47 | } | ||
48 | |||
49 | static const struct of_device_id mmp_irq_match[] __initconst = { | ||
50 | { .compatible = "mrvl,mmp-intc", .data = mmp_intc_add_irq_domain, }, | ||
51 | { .compatible = "mrvl,mmp-gpio", .data = mmp_gpio_add_irq_domain, }, | ||
52 | {} | ||
53 | }; | ||
54 | |||
55 | static void __init mmp_dt_init(void) | ||
56 | { | ||
57 | |||
58 | of_irq_init(mmp_irq_match); | ||
59 | |||
60 | of_platform_populate(NULL, of_default_bus_match_table, | ||
61 | mmp_auxdata_lookup, NULL); | ||
62 | } | ||
63 | |||
64 | static const char *pxa168_dt_board_compat[] __initdata = { | ||
65 | "mrvl,pxa168-aspenite", | ||
66 | NULL, | ||
67 | }; | ||
68 | |||
69 | DT_MACHINE_START(PXA168_DT, "Marvell PXA168 (Device Tree Support)") | ||
70 | .map_io = mmp_map_io, | ||
71 | .init_irq = icu_init_irq, | ||
72 | .timer = &pxa168_timer, | ||
73 | .init_machine = mmp_dt_init, | ||
74 | .dt_compat = pxa168_dt_board_compat, | ||
75 | MACHINE_END | ||
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index 7bc17eaa12eb..e3d3533a5a3b 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <mach/dma.h> | 24 | #include <mach/dma.h> |
25 | #include <mach/devices.h> | 25 | #include <mach/devices.h> |
26 | #include <mach/mfp.h> | 26 | #include <mach/mfp.h> |
27 | #include <linux/platform_device.h> | ||
28 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
29 | #include <mach/pxa168.h> | 28 | #include <mach/pxa168.h> |
30 | 29 | ||
@@ -65,6 +64,7 @@ static APBC_CLK(ssp4, PXA168_SSP4, 4, 0); | |||
65 | static APBC_CLK(ssp5, PXA168_SSP5, 4, 0); | 64 | static APBC_CLK(ssp5, PXA168_SSP5, 4, 0); |
66 | static APBC_CLK(gpio, PXA168_GPIO, 0, 13000000); | 65 | static APBC_CLK(gpio, PXA168_GPIO, 0, 13000000); |
67 | static APBC_CLK(keypad, PXA168_KPC, 0, 32000); | 66 | static APBC_CLK(keypad, PXA168_KPC, 0, 32000); |
67 | static APBC_CLK(rtc, PXA168_RTC, 8, 32768); | ||
68 | 68 | ||
69 | static APMU_CLK(nand, NAND, 0x19b, 156000000); | 69 | static APMU_CLK(nand, NAND, 0x19b, 156000000); |
70 | static APMU_CLK(lcd, LCD, 0x7f, 312000000); | 70 | static APMU_CLK(lcd, LCD, 0x7f, 312000000); |
@@ -93,6 +93,7 @@ static struct clk_lookup pxa168_clkregs[] = { | |||
93 | INIT_CLKREG(&clk_keypad, "pxa27x-keypad", NULL), | 93 | INIT_CLKREG(&clk_keypad, "pxa27x-keypad", NULL), |
94 | INIT_CLKREG(&clk_eth, "pxa168-eth", "MFUCLK"), | 94 | INIT_CLKREG(&clk_eth, "pxa168-eth", "MFUCLK"), |
95 | INIT_CLKREG(&clk_usb, "pxa168-ehci", "PXA168-USBCLK"), | 95 | INIT_CLKREG(&clk_usb, "pxa168-ehci", "PXA168-USBCLK"), |
96 | INIT_CLKREG(&clk_rtc, "sa1100-rtc", NULL), | ||
96 | }; | 97 | }; |
97 | 98 | ||
98 | static int __init pxa168_init(void) | 99 | static int __init pxa168_init(void) |
diff --git a/arch/arm/mach-mmp/tavorevb.c b/arch/arm/mach-mmp/tavorevb.c index 8e3b5af04a57..bc97170125bf 100644 --- a/arch/arm/mach-mmp/tavorevb.c +++ b/arch/arm/mach-mmp/tavorevb.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/smc91x.h> | 14 | #include <linux/smc91x.h> |
15 | #include <linux/gpio.h> | ||
16 | 15 | ||
17 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
18 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |