diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-11-12 09:39:55 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-11-16 10:33:20 -0500 |
commit | a4dfccf8a8044fe2ed38b96e0546eaf8e669eb5f (patch) | |
tree | 9d344c12f61ce2c3d1ca451c3f347aa9a2f6300f /arch/arm | |
parent | 376aaac1837af8ed6c1014958396322c44306cbf (diff) |
ARM i.MX51: setup MIPI during startup
The MIPI interface has to be initialized for proper IPU support.
The MIPI officially is not supported, but still needs initialization.
This patch adds this to the SoC startup as all it does is poking
some magic values into registers for which we do not have documentation.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-imx/mm-imx5.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c index f92caf1b30ba..79d71cf23a1d 100644 --- a/arch/arm/mach-imx/mm-imx5.c +++ b/arch/arm/mach-imx/mm-imx5.c | |||
@@ -81,8 +81,28 @@ void __init imx50_init_early(void) | |||
81 | mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR)); | 81 | mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR)); |
82 | } | 82 | } |
83 | 83 | ||
84 | /* | ||
85 | * The MIPI HSC unit has been removed from the i.MX51 Reference Manual by | ||
86 | * the Freescale marketing division. However this did not remove the | ||
87 | * hardware from the chip which still needs to be configured for proper | ||
88 | * IPU support. | ||
89 | */ | ||
90 | static void __init imx51_ipu_mipi_setup(void) | ||
91 | { | ||
92 | void __iomem *hsc_addr; | ||
93 | hsc_addr = MX51_IO_ADDRESS(MX51_MIPI_HSC_BASE_ADDR); | ||
94 | |||
95 | /* setup MIPI module to legacy mode */ | ||
96 | __raw_writel(0xf00, hsc_addr); | ||
97 | |||
98 | /* CSI mode: reserved; DI control mode: legacy (from Freescale BSP) */ | ||
99 | __raw_writel(__raw_readl(hsc_addr + 0x800) | 0x30ff, | ||
100 | hsc_addr + 0x800); | ||
101 | } | ||
102 | |||
84 | void __init imx51_init_early(void) | 103 | void __init imx51_init_early(void) |
85 | { | 104 | { |
105 | imx51_ipu_mipi_setup(); | ||
86 | mxc_set_cpu_type(MXC_CPU_MX51); | 106 | mxc_set_cpu_type(MXC_CPU_MX51); |
87 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); | 107 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); |
88 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); | 108 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); |