Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: mmp: append OF support on pxa168

Enable PXA168 and aspenite support.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>

authored by

Haojian Zhuang and committed by
Haojian Zhuang
5d489766 9613b210

+86
+10
arch/arm/mach-mmp/Kconfig
··· 2 2 3 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 15 config MACH_ASPENITE 6 16 bool "Marvell's PXA168 Aspenite Development Board" 7 17 select CPU_PXA168
+1
arch/arm/mach-mmp/Makefile
··· 18 18 obj-$(CONFIG_MACH_BROWNSTONE) += brownstone.o 19 19 obj-$(CONFIG_MACH_FLINT) += flint.o 20 20 obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o 21 + obj-$(CONFIG_MACH_MMP_DT) += mmp-dt.o 21 22 obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o 22 23 obj-$(CONFIG_MACH_GPLUGD) += gplugd.o
+75
arch/arm/mach-mmp/mmp-dt.c
··· 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