2013-11-07 00:31:16 +01:00
|
|
|
/*
|
|
|
|
* Genmai board support
|
|
|
|
*
|
|
|
|
* Copyright (C) 2013 Renesas Solutions Corp.
|
|
|
|
* Copyright (C) 2013 Magnus Damm
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/of_platform.h>
|
2014-06-20 18:53:01 +02:00
|
|
|
|
2013-11-07 00:31:16 +01:00
|
|
|
#include <asm/mach-types.h>
|
|
|
|
#include <asm/mach/arch.h>
|
2014-06-20 18:53:01 +02:00
|
|
|
|
2014-06-17 09:47:21 +02:00
|
|
|
#include "clock.h"
|
2014-06-17 09:47:37 +02:00
|
|
|
#include "common.h"
|
2014-06-20 18:53:01 +02:00
|
|
|
#include "r7s72100.h"
|
2013-11-07 00:31:16 +01:00
|
|
|
|
2014-05-14 03:10:15 +02:00
|
|
|
/*
|
|
|
|
* This is a really crude hack to provide clkdev support to platform
|
|
|
|
* devices until they get moved to DT.
|
|
|
|
*/
|
|
|
|
static const struct clk_name clk_names[] = {
|
|
|
|
{ "mtu2", "fck", "sh-mtu2" },
|
|
|
|
};
|
|
|
|
|
2013-11-07 00:31:16 +01:00
|
|
|
static void __init genmai_add_standard_devices(void)
|
|
|
|
{
|
2014-05-14 03:10:15 +02:00
|
|
|
shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), true);
|
2013-11-07 00:31:16 +01:00
|
|
|
r7s72100_add_dt_devices();
|
|
|
|
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char * const genmai_boards_compat_dt[] __initconst = {
|
2014-05-16 14:10:15 +02:00
|
|
|
"renesas,genmai",
|
2013-11-07 00:31:16 +01:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
DT_MACHINE_START(GENMAI_DT, "genmai")
|
2014-06-06 07:28:56 +02:00
|
|
|
.init_early = shmobile_init_delay,
|
2013-11-07 00:31:16 +01:00
|
|
|
.init_machine = genmai_add_standard_devices,
|
|
|
|
.dt_compat = genmai_boards_compat_dt,
|
|
|
|
MACHINE_END
|