2013-01-29 09:40:18 +07:00
|
|
|
/*
|
|
|
|
* marzen board support - Reference DT implementation
|
|
|
|
*
|
|
|
|
* Copyright (C) 2011 Renesas Solutions Corp.
|
|
|
|
* Copyright (C) 2011 Magnus Damm
|
|
|
|
* Copyright (C) 2013 Simon Horman
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
2014-05-15 18:32:06 +07:00
|
|
|
#include <linux/clk/shmobile.h>
|
|
|
|
#include <linux/clocksource.h>
|
2014-05-15 18:32:03 +07:00
|
|
|
#include <linux/of_platform.h>
|
2014-06-20 23:53:05 +07:00
|
|
|
|
2013-01-29 09:40:18 +07:00
|
|
|
#include <asm/irq.h>
|
|
|
|
#include <asm/mach/arch.h>
|
2014-06-20 23:53:05 +07:00
|
|
|
|
2014-06-17 14:47:37 +07:00
|
|
|
#include "common.h"
|
2014-06-17 14:47:29 +07:00
|
|
|
#include "irqs.h"
|
2014-06-20 23:53:05 +07:00
|
|
|
#include "r8a7779.h"
|
2013-01-29 09:40:18 +07:00
|
|
|
|
2014-05-15 18:32:06 +07:00
|
|
|
static void __init marzen_init_timer(void)
|
2013-01-29 09:40:18 +07:00
|
|
|
{
|
2014-05-15 18:32:06 +07:00
|
|
|
r8a7779_clocks_init(r8a7779_read_mode_pins());
|
|
|
|
clocksource_of_init();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void __init marzen_init(void)
|
|
|
|
{
|
2014-05-15 18:32:03 +07:00
|
|
|
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
2013-10-02 15:39:48 +07:00
|
|
|
r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */
|
2013-01-29 09:40:18 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
static const char *marzen_boards_compat_dt[] __initdata = {
|
2014-05-15 18:32:10 +07:00
|
|
|
"renesas,marzen",
|
2013-01-29 09:40:18 +07:00
|
|
|
"renesas,marzen-reference",
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
DT_MACHINE_START(MARZEN, "marzen")
|
|
|
|
.smp = smp_ops(r8a7779_smp_ops),
|
|
|
|
.map_io = r8a7779_map_io,
|
2014-05-16 11:43:00 +07:00
|
|
|
.init_early = shmobile_init_delay,
|
2014-05-15 18:32:06 +07:00
|
|
|
.init_time = marzen_init_timer,
|
2013-01-29 09:40:18 +07:00
|
|
|
.init_irq = r8a7779_init_irq_dt,
|
|
|
|
.init_machine = marzen_init,
|
2014-07-31 06:32:41 +07:00
|
|
|
.init_late = shmobile_init_late,
|
2013-01-29 09:40:18 +07:00
|
|
|
.dt_compat = marzen_boards_compat_dt,
|
|
|
|
MACHINE_END
|