2011-10-17 08:42:16 +08:00
|
|
|
/*
|
|
|
|
* Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
|
|
|
|
* Copyright 2011 Linaro Ltd.
|
|
|
|
*
|
|
|
|
* The code contained herein is licensed under the GNU General Public
|
|
|
|
* License. You may obtain a copy of the GNU General Public License
|
|
|
|
* Version 2 or later at the following locations:
|
|
|
|
*
|
|
|
|
* http://www.opensource.org/licenses/gpl-license.html
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
*/
|
|
|
|
|
2012-05-11 13:09:45 +08:00
|
|
|
#include <linux/clk.h>
|
|
|
|
#include <linux/clkdev.h>
|
|
|
|
#include <linux/err.h>
|
2011-10-17 08:42:16 +08:00
|
|
|
#include <linux/io.h>
|
|
|
|
#include <linux/irq.h>
|
|
|
|
#include <linux/of_irq.h>
|
|
|
|
#include <linux/of_platform.h>
|
|
|
|
#include <asm/mach/arch.h>
|
|
|
|
#include <asm/mach/time.h>
|
|
|
|
|
2012-09-13 21:01:00 +08:00
|
|
|
#include "common.h"
|
2012-09-14 14:14:45 +08:00
|
|
|
#include "mx53.h"
|
2012-09-13 21:01:00 +08:00
|
|
|
|
2012-05-11 13:09:45 +08:00
|
|
|
static void __init imx53_qsb_init(void)
|
|
|
|
{
|
|
|
|
struct clk *clk;
|
|
|
|
|
|
|
|
clk = clk_get_sys(NULL, "ssi_ext1");
|
|
|
|
if (IS_ERR(clk)) {
|
|
|
|
pr_err("failed to get clk ssi_ext1\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
clk_register_clkdev(clk, NULL, "0-000a");
|
|
|
|
}
|
|
|
|
|
2011-10-17 08:42:16 +08:00
|
|
|
static void __init imx53_dt_init(void)
|
|
|
|
{
|
2012-05-11 13:09:45 +08:00
|
|
|
if (of_machine_is_compatible("fsl,imx53-qsb"))
|
|
|
|
imx53_qsb_init();
|
|
|
|
|
2012-11-21 23:43:05 +08:00
|
|
|
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
2011-10-17 08:42:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void __init imx53_timer_init(void)
|
|
|
|
{
|
|
|
|
mx53_clocks_init_dt();
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct sys_timer imx53_timer = {
|
|
|
|
.init = imx53_timer_init,
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char *imx53_dt_board_compat[] __initdata = {
|
2012-02-17 19:07:00 +08:00
|
|
|
"fsl,imx53",
|
2011-10-17 08:42:16 +08:00
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)")
|
|
|
|
.map_io = mx53_map_io,
|
|
|
|
.init_early = imx53_init_early,
|
|
|
|
.init_irq = mx53_init_irq,
|
|
|
|
.handle_irq = imx53_handle_irq,
|
|
|
|
.timer = &imx53_timer,
|
|
|
|
.init_machine = imx53_dt_init,
|
2012-05-22 06:50:27 +08:00
|
|
|
.init_late = imx53_init_late,
|
2011-10-17 08:42:16 +08:00
|
|
|
.dt_compat = imx53_dt_board_compat,
|
2011-11-07 01:12:08 +08:00
|
|
|
.restart = mxc_restart,
|
2011-10-17 08:42:16 +08:00
|
|
|
MACHINE_END
|