2011-10-17 02:42:17 +02: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
|
|
|
|
*/
|
|
|
|
|
|
|
|
#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 15:01:00 +02:00
|
|
|
#include "common.h"
|
2013-05-10 03:13:44 +02:00
|
|
|
#include "hardware.h"
|
2012-09-14 08:14:45 +02:00
|
|
|
#include "mx51.h"
|
2012-09-13 15:01:00 +02:00
|
|
|
|
2011-10-17 02:42:17 +02:00
|
|
|
static void __init imx51_dt_init(void)
|
|
|
|
{
|
2013-03-27 14:01:33 +01:00
|
|
|
struct platform_device_info devinfo = { .name = "cpufreq-cpu0", };
|
|
|
|
|
2013-05-10 03:13:44 +02:00
|
|
|
mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
|
|
|
|
|
2012-11-21 16:43:05 +01:00
|
|
|
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
2013-03-27 14:01:33 +01:00
|
|
|
platform_device_register_full(&devinfo);
|
2011-10-17 02:42:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static const char *imx51_dt_board_compat[] __initdata = {
|
2012-02-17 12:07:00 +01:00
|
|
|
"fsl,imx51",
|
2011-10-17 02:42:17 +02:00
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2012-11-08 20:40:59 +01:00
|
|
|
static void __init imx51_timer_init(void)
|
|
|
|
{
|
|
|
|
mx51_clocks_init_dt();
|
|
|
|
}
|
|
|
|
|
2011-10-17 02:42:17 +02:00
|
|
|
DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
|
|
|
|
.map_io = mx51_map_io,
|
|
|
|
.init_early = imx51_init_early,
|
|
|
|
.init_irq = mx51_init_irq,
|
|
|
|
.handle_irq = imx51_handle_irq,
|
2012-11-08 20:40:59 +01:00
|
|
|
.init_time = imx51_timer_init,
|
2011-10-17 02:42:17 +02:00
|
|
|
.init_machine = imx51_dt_init,
|
2012-04-26 05:42:34 +02:00
|
|
|
.init_late = imx51_init_late,
|
2011-10-17 02:42:17 +02:00
|
|
|
.dt_compat = imx51_dt_board_compat,
|
2011-11-06 18:12:08 +01:00
|
|
|
.restart = mxc_restart,
|
2011-10-17 02:42:17 +02:00
|
|
|
MACHINE_END
|