blob: de5ab8d88549de87ea88fc92c2bf4eda7a022e38 [file] [log] [blame]
Alexander Shiyan24980dc2014-07-26 13:45:28 +04001/*
2 * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 */
9
10#include <linux/of_platform.h>
11#include <asm/mach/arch.h>
Alexander Shiyane1291cf2016-08-06 07:56:25 +030012#include <asm/mach/map.h>
Alexander Shiyan24980dc2014-07-26 13:45:28 +040013
14#include "common.h"
Alexander Shiyane1291cf2016-08-06 07:56:25 +030015#include "hardware.h"
16
17#define MX1_AVIC_ADDR 0x00223000
18
19static void __init imx1_init_early(void)
20{
21 mxc_set_cpu_type(MXC_CPU_MX1);
22}
23
24static void __init imx1_init_irq(void)
25{
26 void __iomem *avic_addr;
27
28 avic_addr = ioremap(MX1_AVIC_ADDR, SZ_4K);
29 WARN_ON(!avic_addr);
30
31 mxc_init_irq(avic_addr);
32}
Alexander Shiyan24980dc2014-07-26 13:45:28 +040033
34static const char * const imx1_dt_board_compat[] __initconst = {
35 "fsl,imx1",
36 NULL
37};
38
39DT_MACHINE_START(IMX1_DT, "Freescale i.MX1 (Device Tree Support)")
Alexander Shiyane1291cf2016-08-06 07:56:25 +030040 .map_io = debug_ll_io_init,
Alexander Shiyan24980dc2014-07-26 13:45:28 +040041 .init_early = imx1_init_early,
Alexander Shiyane1291cf2016-08-06 07:56:25 +030042 .init_irq = imx1_init_irq,
Alexander Shiyan24980dc2014-07-26 13:45:28 +040043 .dt_compat = imx1_dt_board_compat,
44 .restart = mxc_restart,
45MACHINE_END