1
2
3
4
5
6
7
8
9
10
11
12
13#include <linux/io.h>
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>
19
20#include "common.h"
21#include "hardware.h"
22
23static void __init imx51_init_early(void)
24{
25 mxc_set_cpu_type(MXC_CPU_MX51);
26}
27
28
29
30
31
32
33
34#define MX51_MIPI_HSC_BASE 0x83fdc000
35static void __init imx51_ipu_mipi_setup(void)
36{
37 void __iomem *hsc_addr;
38
39 hsc_addr = ioremap(MX51_MIPI_HSC_BASE, SZ_16K);
40 WARN_ON(!hsc_addr);
41
42
43 imx_writel(0xf00, hsc_addr);
44
45
46 imx_writel(imx_readl(hsc_addr + 0x800) | 0x30ff, hsc_addr + 0x800);
47
48 iounmap(hsc_addr);
49}
50
51static void __init imx51_dt_init(void)
52{
53 struct platform_device_info devinfo = { .name = "cpufreq-dt", };
54
55 imx51_ipu_mipi_setup();
56 imx_src_init();
57
58 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
59 platform_device_register_full(&devinfo);
60}
61
62static void __init imx51_init_late(void)
63{
64 mx51_neon_fixup();
65 imx51_pm_init();
66}
67
68static const char * const imx51_dt_board_compat[] __initconst = {
69 "fsl,imx51",
70 NULL
71};
72
73DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
74 .init_early = imx51_init_early,
75 .init_irq = tzic_init_irq,
76 .init_machine = imx51_dt_init,
77 .init_late = imx51_init_late,
78 .dt_compat = imx51_dt_board_compat,
79MACHINE_END
80