mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-16 22:10:24 +00:00
6bb27d7349
Now that the only field in struct sys_timer is .init, delete the struct, and replace the machine descriptor .timer field with the initialization function itself. This will enable moving timer drivers into drivers/clocksource without having to place a public prototype of each struct sys_timer object into include/linux; the intent is to create a single of_clocksource_init() function that determines which timer driver to initialize by scanning the device dtree, much like the proposed irqchip_init() at: http://www.spinics.net/lists/arm-kernel/msg203686.html Includes mach-omap2 fixes from Igor Grinberg. Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Stephen Warren <swarren@nvidia.com>
57 lines
1.7 KiB
C
57 lines
1.7 KiB
C
/*
|
|
* linux/arch/arm/mach-mmp/mmp2-dt.c
|
|
*
|
|
* Copyright (C) 2012 Marvell Technology Group Ltd.
|
|
* Author: Haojian Zhuang <haojian.zhuang@marvell.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* publishhed by the Free Software Foundation.
|
|
*/
|
|
|
|
#include <linux/io.h>
|
|
#include <linux/irq.h>
|
|
#include <linux/irqdomain.h>
|
|
#include <linux/of_irq.h>
|
|
#include <linux/of_platform.h>
|
|
#include <asm/mach/arch.h>
|
|
#include <asm/mach/time.h>
|
|
#include <mach/irqs.h>
|
|
#include <mach/regs-apbc.h>
|
|
|
|
#include "common.h"
|
|
|
|
extern void __init mmp_dt_irq_init(void);
|
|
extern void __init mmp_dt_init_timer(void);
|
|
|
|
static const struct of_dev_auxdata mmp2_auxdata_lookup[] __initconst = {
|
|
OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4030000, "pxa2xx-uart.0", NULL),
|
|
OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.1", NULL),
|
|
OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.2", NULL),
|
|
OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4016000, "pxa2xx-uart.3", NULL),
|
|
OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4011000, "pxa2xx-i2c.0", NULL),
|
|
OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4025000, "pxa2xx-i2c.1", NULL),
|
|
OF_DEV_AUXDATA("mrvl,mmp-gpio", 0xd4019000, "pxa-gpio", NULL),
|
|
OF_DEV_AUXDATA("mrvl,mmp-rtc", 0xd4010000, "sa1100-rtc", NULL),
|
|
{}
|
|
};
|
|
|
|
static void __init mmp2_dt_init(void)
|
|
{
|
|
of_platform_populate(NULL, of_default_bus_match_table,
|
|
mmp2_auxdata_lookup, NULL);
|
|
}
|
|
|
|
static const char *mmp2_dt_board_compat[] __initdata = {
|
|
"mrvl,mmp2-brownstone",
|
|
NULL,
|
|
};
|
|
|
|
DT_MACHINE_START(MMP2_DT, "Marvell MMP2 (Device Tree Support)")
|
|
.map_io = mmp_map_io,
|
|
.init_irq = mmp_dt_irq_init,
|
|
.init_time = mmp_dt_init_timer,
|
|
.init_machine = mmp2_dt_init,
|
|
.dt_compat = mmp2_dt_board_compat,
|
|
MACHINE_END
|