2 * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
3 * Copyright 2011 Linaro Ltd.
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:
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
14 #include <linux/irq.h>
15 #include <linux/of_irq.h>
16 #include <linux/of_platform.h>
17 #include <asm/mach/arch.h>
18 #include <asm/mach/time.h>
23 static void __init
imx51_init_early(void)
25 mxc_set_cpu_type(MXC_CPU_MX51
);
29 * The MIPI HSC unit has been removed from the i.MX51 Reference Manual by
30 * the Freescale marketing division. However this did not remove the
31 * hardware from the chip which still needs to be configured for proper
34 #define MX51_MIPI_HSC_BASE 0x83fdc000
35 static void __init
imx51_ipu_mipi_setup(void)
37 void __iomem
*hsc_addr
;
39 hsc_addr
= ioremap(MX51_MIPI_HSC_BASE
, SZ_16K
);
42 /* setup MIPI module to legacy mode */
43 imx_writel(0xf00, hsc_addr
);
45 /* CSI mode: reserved; DI control mode: legacy (from Freescale BSP) */
46 imx_writel(imx_readl(hsc_addr
+ 0x800) | 0x30ff, hsc_addr
+ 0x800);
51 static void __init
imx51_dt_init(void)
53 imx51_ipu_mipi_setup();
56 imx_aips_allow_unprivileged_access("fsl,imx51-aipstz");
59 static void __init
imx51_init_late(void)
65 static const char * const imx51_dt_board_compat
[] __initconst
= {
70 DT_MACHINE_START(IMX51_DT
, "Freescale i.MX51 (Device Tree Support)")
71 .init_early
= imx51_init_early
,
72 .init_machine
= imx51_dt_init
,
73 .init_late
= imx51_init_late
,
74 .dt_compat
= imx51_dt_board_compat
,