Thomas Gleixner | 2874c5f | 2019-05-27 08:55:01 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
Alexander Shiyan | 24980dc | 2014-07-26 13:45:28 +0400 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru> |
Alexander Shiyan | 24980dc | 2014-07-26 13:45:28 +0400 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <linux/of_platform.h> |
| 7 | #include <asm/mach/arch.h> |
Alexander Shiyan | e1291cf | 2016-08-06 07:56:25 +0300 | [diff] [blame] | 8 | #include <asm/mach/map.h> |
Alexander Shiyan | 24980dc | 2014-07-26 13:45:28 +0400 | [diff] [blame] | 9 | |
| 10 | #include "common.h" |
Alexander Shiyan | e1291cf | 2016-08-06 07:56:25 +0300 | [diff] [blame] | 11 | #include "hardware.h" |
| 12 | |
| 13 | #define MX1_AVIC_ADDR 0x00223000 |
| 14 | |
| 15 | static void __init imx1_init_early(void) |
| 16 | { |
| 17 | mxc_set_cpu_type(MXC_CPU_MX1); |
| 18 | } |
| 19 | |
| 20 | static void __init imx1_init_irq(void) |
| 21 | { |
| 22 | void __iomem *avic_addr; |
| 23 | |
| 24 | avic_addr = ioremap(MX1_AVIC_ADDR, SZ_4K); |
| 25 | WARN_ON(!avic_addr); |
| 26 | |
| 27 | mxc_init_irq(avic_addr); |
| 28 | } |
Alexander Shiyan | 24980dc | 2014-07-26 13:45:28 +0400 | [diff] [blame] | 29 | |
| 30 | static const char * const imx1_dt_board_compat[] __initconst = { |
| 31 | "fsl,imx1", |
| 32 | NULL |
| 33 | }; |
| 34 | |
| 35 | DT_MACHINE_START(IMX1_DT, "Freescale i.MX1 (Device Tree Support)") |
Alexander Shiyan | 24980dc | 2014-07-26 13:45:28 +0400 | [diff] [blame] | 36 | .init_early = imx1_init_early, |
Alexander Shiyan | e1291cf | 2016-08-06 07:56:25 +0300 | [diff] [blame] | 37 | .init_irq = imx1_init_irq, |
Alexander Shiyan | 24980dc | 2014-07-26 13:45:28 +0400 | [diff] [blame] | 38 | .dt_compat = imx1_dt_board_compat, |
| 39 | .restart = mxc_restart, |
| 40 | MACHINE_END |