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 | |
Fabio Estevam | f40f38d | 2012-11-21 13:43:05 -0200 | [diff] [blame] | 35 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
Steffen Trumtrar | 6befda9 | 2014-07-07 11:41:27 +0200 | [diff] [blame] | 36 | |
| 37 | imx_aips_allow_unprivileged_access("fsl,imx53-aipstz"); |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 38 | } |
| 39 | |
Shawn Guo | ff4ab23 | 2014-05-20 15:34:06 +0800 | [diff] [blame] | 40 | static void __init imx53_init_late(void) |
| 41 | { |
| 42 | imx53_pm_init(); |
Lucas Stach | 9a31634 | 2014-09-26 15:41:04 +0200 | [diff] [blame] | 43 | |
| 44 | platform_device_register_simple("cpufreq-dt", -1, NULL, 0); |
Shawn Guo | ff4ab23 | 2014-05-20 15:34:06 +0800 | [diff] [blame] | 45 | } |
| 46 | |
Shawn Guo | 8756dd9 | 2014-07-01 16:03:00 +0800 | [diff] [blame] | 47 | static const char * const imx53_dt_board_compat[] __initconst = { |
Sascha Hauer | 3f8976d | 2012-02-17 12:07:00 +0100 | [diff] [blame] | 48 | "fsl,imx53", |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 49 | NULL |
| 50 | }; |
| 51 | |
| 52 | DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 53 | .init_early = imx53_init_early, |
Shawn Guo | fffa051 | 2014-05-19 20:19:06 +0800 | [diff] [blame] | 54 | .init_irq = tzic_init_irq, |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 55 | .init_machine = imx53_dt_init, |
Robert Lee | aa96a18 | 2012-05-21 17:50:27 -0500 | [diff] [blame] | 56 | .init_late = imx53_init_late, |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 57 | .dt_compat = imx53_dt_board_compat, |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 58 | MACHINE_END |