Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. |
| 3 | * Copyright 2011 Linaro Ltd. |
| 4 | * |
| 5 | * The code contained herein is licensed under the GNU General Public |
| 6 | * License. You may obtain a copy of the GNU General Public License |
| 7 | * Version 2 or later at the following locations: |
| 8 | * |
| 9 | * http://www.opensource.org/licenses/gpl-license.html |
| 10 | * http://www.gnu.org/copyleft/gpl.html |
| 11 | */ |
| 12 | |
Shawn Guo | 394025ef | 2012-05-11 13:09:45 +0800 | [diff] [blame] | 13 | #include <linux/clk.h> |
| 14 | #include <linux/clkdev.h> |
| 15 | #include <linux/err.h> |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 16 | #include <linux/io.h> |
| 17 | #include <linux/irq.h> |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 18 | #include <linux/of_irq.h> |
| 19 | #include <linux/of_platform.h> |
| 20 | #include <asm/mach/arch.h> |
| 21 | #include <asm/mach/time.h> |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 22 | |
Shawn Guo | e337247 | 2012-09-13 21:01:00 +0800 | [diff] [blame] | 23 | #include "common.h" |
Shawn Guo | 18cb680 | 2013-05-10 09:13:44 +0800 | [diff] [blame] | 24 | #include "hardware.h" |
Shawn Guo | e337247 | 2012-09-13 21:01:00 +0800 | [diff] [blame] | 25 | |
Shawn Guo | ff4ab23 | 2014-05-20 15:34:06 +0800 | [diff] [blame] | 26 | static void __init imx53_init_early(void) |
| 27 | { |
| 28 | mxc_set_cpu_type(MXC_CPU_MX53); |
| 29 | } |
| 30 | |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 31 | static void __init imx53_dt_init(void) |
| 32 | { |
Shawn Guo | ff4ab23 | 2014-05-20 15:34:06 +0800 | [diff] [blame] | 33 | imx_src_init(); |
Shawn Guo | 18cb680 | 2013-05-10 09:13:44 +0800 | [diff] [blame] | 34 | |
Steffen Trumtrar | 6befda9 | 2014-07-07 11:41:27 +0200 | [diff] [blame] | 35 | imx_aips_allow_unprivileged_access("fsl,imx53-aipstz"); |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 36 | } |
| 37 | |
Shawn Guo | ff4ab23 | 2014-05-20 15:34:06 +0800 | [diff] [blame] | 38 | static void __init imx53_init_late(void) |
| 39 | { |
| 40 | imx53_pm_init(); |
| 41 | } |
| 42 | |
Shawn Guo | 8756dd9 | 2014-07-01 16:03:00 +0800 | [diff] [blame] | 43 | static const char * const imx53_dt_board_compat[] __initconst = { |
Sascha Hauer | 3f8976d | 2012-02-17 12:07:00 +0100 | [diff] [blame] | 44 | "fsl,imx53", |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 45 | NULL |
| 46 | }; |
| 47 | |
| 48 | DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 49 | .init_early = imx53_init_early, |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 50 | .init_machine = imx53_dt_init, |
Robert Lee | aa96a18 | 2012-05-21 17:50:27 -0500 | [diff] [blame] | 51 | .init_late = imx53_init_late, |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 52 | .dt_compat = imx53_dt_board_compat, |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 53 | MACHINE_END |