xref: /openbmc/linux/arch/arm/mach-omap2/io.c (revision ce491cf85466c3377228c5a852ea627ec5136956)
11dbae815STony Lindgren /*
21dbae815STony Lindgren  * linux/arch/arm/mach-omap2/io.c
31dbae815STony Lindgren  *
41dbae815STony Lindgren  * OMAP2 I/O mapping code
51dbae815STony Lindgren  *
61dbae815STony Lindgren  * Copyright (C) 2005 Nokia Corporation
744169075SSantosh Shilimkar  * Copyright (C) 2007-2009 Texas Instruments
8646e3ed1STony Lindgren  *
9646e3ed1STony Lindgren  * Author:
10646e3ed1STony Lindgren  *	Juha Yrjola <juha.yrjola@nokia.com>
11646e3ed1STony Lindgren  *	Syed Khasim <x0khasim@ti.com>
121dbae815STony Lindgren  *
1344169075SSantosh Shilimkar  * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
1444169075SSantosh Shilimkar  *
151dbae815STony Lindgren  * This program is free software; you can redistribute it and/or modify
161dbae815STony Lindgren  * it under the terms of the GNU General Public License version 2 as
171dbae815STony Lindgren  * published by the Free Software Foundation.
181dbae815STony Lindgren  */
191dbae815STony Lindgren 
201dbae815STony Lindgren #include <linux/module.h>
211dbae815STony Lindgren #include <linux/kernel.h>
221dbae815STony Lindgren #include <linux/init.h>
23fced80c7SRussell King #include <linux/io.h>
242f135eafSPaul Walmsley #include <linux/clk.h>
251dbae815STony Lindgren 
26120db2cbSTony Lindgren #include <asm/tlb.h>
27120db2cbSTony Lindgren 
28120db2cbSTony Lindgren #include <asm/mach/map.h>
29120db2cbSTony Lindgren 
30*ce491cf8STony Lindgren #include <plat/mux.h>
31*ce491cf8STony Lindgren #include <plat/omapfb.h>
32*ce491cf8STony Lindgren #include <plat/sram.h>
33*ce491cf8STony Lindgren #include <plat/sdrc.h>
34*ce491cf8STony Lindgren #include <plat/gpmc.h>
35*ce491cf8STony Lindgren #include <plat/serial.h>
36646e3ed1STony Lindgren 
3744169075SSantosh Shilimkar #ifndef CONFIG_ARCH_OMAP4	/* FIXME: Remove this once clkdev is ready */
38646e3ed1STony Lindgren #include "clock.h"
391dbae815STony Lindgren 
40*ce491cf8STony Lindgren #include <plat/omap-pm.h>
41*ce491cf8STony Lindgren #include <plat/powerdomain.h>
429717100fSPaul Walmsley #include "powerdomains.h"
439717100fSPaul Walmsley 
44*ce491cf8STony Lindgren #include <plat/clockdomain.h>
45801954d3SPaul Walmsley #include "clockdomains.h"
4644169075SSantosh Shilimkar #endif
47*ce491cf8STony Lindgren #include <plat/omap_hwmod.h>
4802bfc030SPaul Walmsley #include "omap_hwmod_2420.h"
4902bfc030SPaul Walmsley #include "omap_hwmod_2430.h"
5002bfc030SPaul Walmsley #include "omap_hwmod_34xx.h"
5102bfc030SPaul Walmsley 
521dbae815STony Lindgren /*
531dbae815STony Lindgren  * The machine specific code may provide the extra mapping besides the
541dbae815STony Lindgren  * default mapping provided here.
551dbae815STony Lindgren  */
56cc26b3b0SSyed Mohammed, Khasim 
57cc26b3b0SSyed Mohammed, Khasim #ifdef CONFIG_ARCH_OMAP24XX
58cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap24xx_io_desc[] __initdata = {
591dbae815STony Lindgren 	{
601dbae815STony Lindgren 		.virtual	= L3_24XX_VIRT,
611dbae815STony Lindgren 		.pfn		= __phys_to_pfn(L3_24XX_PHYS),
621dbae815STony Lindgren 		.length		= L3_24XX_SIZE,
631dbae815STony Lindgren 		.type		= MT_DEVICE
641dbae815STony Lindgren 	},
6509f21ed4SKyungmin Park 	{
6609f21ed4SKyungmin Park 		.virtual	= L4_24XX_VIRT,
6709f21ed4SKyungmin Park 		.pfn		= __phys_to_pfn(L4_24XX_PHYS),
6809f21ed4SKyungmin Park 		.length		= L4_24XX_SIZE,
6909f21ed4SKyungmin Park 		.type		= MT_DEVICE
7009f21ed4SKyungmin Park 	},
71cc26b3b0SSyed Mohammed, Khasim };
72cc26b3b0SSyed Mohammed, Khasim 
73cc26b3b0SSyed Mohammed, Khasim #ifdef CONFIG_ARCH_OMAP2420
74cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap242x_io_desc[] __initdata = {
751dbae815STony Lindgren 	{
76c40fae95STony Lindgren 		.virtual	= DSP_MEM_24XX_VIRT,
77c40fae95STony Lindgren 		.pfn		= __phys_to_pfn(DSP_MEM_24XX_PHYS),
78c40fae95STony Lindgren 		.length		= DSP_MEM_24XX_SIZE,
79c40fae95STony Lindgren 		.type		= MT_DEVICE
80c40fae95STony Lindgren 	},
81c40fae95STony Lindgren 	{
82c40fae95STony Lindgren 		.virtual	= DSP_IPI_24XX_VIRT,
83c40fae95STony Lindgren 		.pfn		= __phys_to_pfn(DSP_IPI_24XX_PHYS),
84c40fae95STony Lindgren 		.length		= DSP_IPI_24XX_SIZE,
85c40fae95STony Lindgren 		.type		= MT_DEVICE
86c40fae95STony Lindgren 	},
87c40fae95STony Lindgren 	{
88c40fae95STony Lindgren 		.virtual	= DSP_MMU_24XX_VIRT,
89c40fae95STony Lindgren 		.pfn		= __phys_to_pfn(DSP_MMU_24XX_PHYS),
90c40fae95STony Lindgren 		.length		= DSP_MMU_24XX_SIZE,
911dbae815STony Lindgren 		.type		= MT_DEVICE
92cc26b3b0SSyed Mohammed, Khasim 	},
931dbae815STony Lindgren };
941dbae815STony Lindgren 
95cc26b3b0SSyed Mohammed, Khasim #endif
96cc26b3b0SSyed Mohammed, Khasim 
97cc26b3b0SSyed Mohammed, Khasim #ifdef CONFIG_ARCH_OMAP2430
98cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap243x_io_desc[] __initdata = {
99cc26b3b0SSyed Mohammed, Khasim 	{
100cc26b3b0SSyed Mohammed, Khasim 		.virtual	= L4_WK_243X_VIRT,
101cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(L4_WK_243X_PHYS),
102cc26b3b0SSyed Mohammed, Khasim 		.length		= L4_WK_243X_SIZE,
103cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
104cc26b3b0SSyed Mohammed, Khasim 	},
105cc26b3b0SSyed Mohammed, Khasim 	{
106cc26b3b0SSyed Mohammed, Khasim 		.virtual	= OMAP243X_GPMC_VIRT,
107cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(OMAP243X_GPMC_PHYS),
108cc26b3b0SSyed Mohammed, Khasim 		.length		= OMAP243X_GPMC_SIZE,
109cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
110cc26b3b0SSyed Mohammed, Khasim 	},
111cc26b3b0SSyed Mohammed, Khasim 	{
112cc26b3b0SSyed Mohammed, Khasim 		.virtual	= OMAP243X_SDRC_VIRT,
113cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(OMAP243X_SDRC_PHYS),
114cc26b3b0SSyed Mohammed, Khasim 		.length		= OMAP243X_SDRC_SIZE,
115cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
116cc26b3b0SSyed Mohammed, Khasim 	},
117cc26b3b0SSyed Mohammed, Khasim 	{
118cc26b3b0SSyed Mohammed, Khasim 		.virtual	= OMAP243X_SMS_VIRT,
119cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(OMAP243X_SMS_PHYS),
120cc26b3b0SSyed Mohammed, Khasim 		.length		= OMAP243X_SMS_SIZE,
121cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
122cc26b3b0SSyed Mohammed, Khasim 	},
123cc26b3b0SSyed Mohammed, Khasim };
124cc26b3b0SSyed Mohammed, Khasim #endif
125cc26b3b0SSyed Mohammed, Khasim #endif
126cc26b3b0SSyed Mohammed, Khasim 
127cc26b3b0SSyed Mohammed, Khasim #ifdef	CONFIG_ARCH_OMAP34XX
128cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap34xx_io_desc[] __initdata = {
129cc26b3b0SSyed Mohammed, Khasim 	{
130cc26b3b0SSyed Mohammed, Khasim 		.virtual	= L3_34XX_VIRT,
131cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(L3_34XX_PHYS),
132cc26b3b0SSyed Mohammed, Khasim 		.length		= L3_34XX_SIZE,
133cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
134cc26b3b0SSyed Mohammed, Khasim 	},
135cc26b3b0SSyed Mohammed, Khasim 	{
136cc26b3b0SSyed Mohammed, Khasim 		.virtual	= L4_34XX_VIRT,
137cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(L4_34XX_PHYS),
138cc26b3b0SSyed Mohammed, Khasim 		.length		= L4_34XX_SIZE,
139cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
140cc26b3b0SSyed Mohammed, Khasim 	},
141cc26b3b0SSyed Mohammed, Khasim 	{
142cc26b3b0SSyed Mohammed, Khasim 		.virtual	= L4_WK_34XX_VIRT,
143cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(L4_WK_34XX_PHYS),
144cc26b3b0SSyed Mohammed, Khasim 		.length		= L4_WK_34XX_SIZE,
145cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
146cc26b3b0SSyed Mohammed, Khasim 	},
147cc26b3b0SSyed Mohammed, Khasim 	{
148cc26b3b0SSyed Mohammed, Khasim 		.virtual	= OMAP34XX_GPMC_VIRT,
149cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(OMAP34XX_GPMC_PHYS),
150cc26b3b0SSyed Mohammed, Khasim 		.length		= OMAP34XX_GPMC_SIZE,
151cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
152cc26b3b0SSyed Mohammed, Khasim 	},
153cc26b3b0SSyed Mohammed, Khasim 	{
154cc26b3b0SSyed Mohammed, Khasim 		.virtual	= OMAP343X_SMS_VIRT,
155cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(OMAP343X_SMS_PHYS),
156cc26b3b0SSyed Mohammed, Khasim 		.length		= OMAP343X_SMS_SIZE,
157cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
158cc26b3b0SSyed Mohammed, Khasim 	},
159cc26b3b0SSyed Mohammed, Khasim 	{
160cc26b3b0SSyed Mohammed, Khasim 		.virtual	= OMAP343X_SDRC_VIRT,
161cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(OMAP343X_SDRC_PHYS),
162cc26b3b0SSyed Mohammed, Khasim 		.length		= OMAP343X_SDRC_SIZE,
163cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
164cc26b3b0SSyed Mohammed, Khasim 	},
165cc26b3b0SSyed Mohammed, Khasim 	{
166cc26b3b0SSyed Mohammed, Khasim 		.virtual	= L4_PER_34XX_VIRT,
167cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(L4_PER_34XX_PHYS),
168cc26b3b0SSyed Mohammed, Khasim 		.length		= L4_PER_34XX_SIZE,
169cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
170cc26b3b0SSyed Mohammed, Khasim 	},
171cc26b3b0SSyed Mohammed, Khasim 	{
172cc26b3b0SSyed Mohammed, Khasim 		.virtual	= L4_EMU_34XX_VIRT,
173cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(L4_EMU_34XX_PHYS),
174cc26b3b0SSyed Mohammed, Khasim 		.length		= L4_EMU_34XX_SIZE,
175cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
176cc26b3b0SSyed Mohammed, Khasim 	},
177cc26b3b0SSyed Mohammed, Khasim };
178cc26b3b0SSyed Mohammed, Khasim #endif
17944169075SSantosh Shilimkar #ifdef	CONFIG_ARCH_OMAP4
18044169075SSantosh Shilimkar static struct map_desc omap44xx_io_desc[] __initdata = {
18144169075SSantosh Shilimkar 	{
18244169075SSantosh Shilimkar 		.virtual	= L3_44XX_VIRT,
18344169075SSantosh Shilimkar 		.pfn		= __phys_to_pfn(L3_44XX_PHYS),
18444169075SSantosh Shilimkar 		.length		= L3_44XX_SIZE,
18544169075SSantosh Shilimkar 		.type		= MT_DEVICE,
18644169075SSantosh Shilimkar 	},
18744169075SSantosh Shilimkar 	{
18844169075SSantosh Shilimkar 		.virtual	= L4_44XX_VIRT,
18944169075SSantosh Shilimkar 		.pfn		= __phys_to_pfn(L4_44XX_PHYS),
19044169075SSantosh Shilimkar 		.length		= L4_44XX_SIZE,
19144169075SSantosh Shilimkar 		.type		= MT_DEVICE,
19244169075SSantosh Shilimkar 	},
19344169075SSantosh Shilimkar 	{
19444169075SSantosh Shilimkar 		.virtual	= L4_WK_44XX_VIRT,
19544169075SSantosh Shilimkar 		.pfn		= __phys_to_pfn(L4_WK_44XX_PHYS),
19644169075SSantosh Shilimkar 		.length		= L4_WK_44XX_SIZE,
19744169075SSantosh Shilimkar 		.type		= MT_DEVICE,
19844169075SSantosh Shilimkar 	},
19944169075SSantosh Shilimkar 	{
20044169075SSantosh Shilimkar 		.virtual	= OMAP44XX_GPMC_VIRT,
20144169075SSantosh Shilimkar 		.pfn		= __phys_to_pfn(OMAP44XX_GPMC_PHYS),
20244169075SSantosh Shilimkar 		.length		= OMAP44XX_GPMC_SIZE,
20344169075SSantosh Shilimkar 		.type		= MT_DEVICE,
20444169075SSantosh Shilimkar 	},
20544169075SSantosh Shilimkar 	{
206f5d2d659SSantosh Shilimkar 		.virtual	= OMAP44XX_EMIF1_VIRT,
207f5d2d659SSantosh Shilimkar 		.pfn		= __phys_to_pfn(OMAP44XX_EMIF1_PHYS),
208f5d2d659SSantosh Shilimkar 		.length		= OMAP44XX_EMIF1_SIZE,
209f5d2d659SSantosh Shilimkar 		.type		= MT_DEVICE,
210f5d2d659SSantosh Shilimkar 	},
211f5d2d659SSantosh Shilimkar 	{
212f5d2d659SSantosh Shilimkar 		.virtual	= OMAP44XX_EMIF2_VIRT,
213f5d2d659SSantosh Shilimkar 		.pfn		= __phys_to_pfn(OMAP44XX_EMIF2_PHYS),
214f5d2d659SSantosh Shilimkar 		.length		= OMAP44XX_EMIF2_SIZE,
215f5d2d659SSantosh Shilimkar 		.type		= MT_DEVICE,
216f5d2d659SSantosh Shilimkar 	},
217f5d2d659SSantosh Shilimkar 	{
218f5d2d659SSantosh Shilimkar 		.virtual	= OMAP44XX_DMM_VIRT,
219f5d2d659SSantosh Shilimkar 		.pfn		= __phys_to_pfn(OMAP44XX_DMM_PHYS),
220f5d2d659SSantosh Shilimkar 		.length		= OMAP44XX_DMM_SIZE,
221f5d2d659SSantosh Shilimkar 		.type		= MT_DEVICE,
222f5d2d659SSantosh Shilimkar 	},
223f5d2d659SSantosh Shilimkar 	{
22444169075SSantosh Shilimkar 		.virtual	= L4_PER_44XX_VIRT,
22544169075SSantosh Shilimkar 		.pfn		= __phys_to_pfn(L4_PER_44XX_PHYS),
22644169075SSantosh Shilimkar 		.length		= L4_PER_44XX_SIZE,
22744169075SSantosh Shilimkar 		.type		= MT_DEVICE,
22844169075SSantosh Shilimkar 	},
22944169075SSantosh Shilimkar 	{
23044169075SSantosh Shilimkar 		.virtual	= L4_EMU_44XX_VIRT,
23144169075SSantosh Shilimkar 		.pfn		= __phys_to_pfn(L4_EMU_44XX_PHYS),
23244169075SSantosh Shilimkar 		.length		= L4_EMU_44XX_SIZE,
23344169075SSantosh Shilimkar 		.type		= MT_DEVICE,
23444169075SSantosh Shilimkar 	},
23544169075SSantosh Shilimkar };
23644169075SSantosh Shilimkar #endif
237cc26b3b0SSyed Mohammed, Khasim 
238120db2cbSTony Lindgren void __init omap2_map_common_io(void)
2391dbae815STony Lindgren {
240cc26b3b0SSyed Mohammed, Khasim #if defined(CONFIG_ARCH_OMAP2420)
241cc26b3b0SSyed Mohammed, Khasim 	iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
242cc26b3b0SSyed Mohammed, Khasim 	iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc));
243cc26b3b0SSyed Mohammed, Khasim #endif
244cc26b3b0SSyed Mohammed, Khasim 
245cc26b3b0SSyed Mohammed, Khasim #if defined(CONFIG_ARCH_OMAP2430)
246cc26b3b0SSyed Mohammed, Khasim 	iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
247cc26b3b0SSyed Mohammed, Khasim 	iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc));
248cc26b3b0SSyed Mohammed, Khasim #endif
249cc26b3b0SSyed Mohammed, Khasim 
250cc26b3b0SSyed Mohammed, Khasim #if defined(CONFIG_ARCH_OMAP34XX)
251cc26b3b0SSyed Mohammed, Khasim 	iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc));
252cc26b3b0SSyed Mohammed, Khasim #endif
253120db2cbSTony Lindgren 
25444169075SSantosh Shilimkar #if defined(CONFIG_ARCH_OMAP4)
25544169075SSantosh Shilimkar 	iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc));
25644169075SSantosh Shilimkar #endif
257120db2cbSTony Lindgren 	/* Normally devicemaps_init() would flush caches and tlb after
258120db2cbSTony Lindgren 	 * mdesc->map_io(), but we must also do it here because of the CPU
259120db2cbSTony Lindgren 	 * revision check below.
260120db2cbSTony Lindgren 	 */
261120db2cbSTony Lindgren 	local_flush_tlb_all();
262120db2cbSTony Lindgren 	flush_cache_all();
263120db2cbSTony Lindgren 
2641dbae815STony Lindgren 	omap2_check_revision();
2651dbae815STony Lindgren 	omap_sram_init();
266b7cc6d46SImre Deak 	omapfb_reserve_sdram();
267120db2cbSTony Lindgren }
268120db2cbSTony Lindgren 
2692f135eafSPaul Walmsley /*
2702f135eafSPaul Walmsley  * omap2_init_reprogram_sdrc - reprogram SDRC timing parameters
2712f135eafSPaul Walmsley  *
2722f135eafSPaul Walmsley  * Sets the CORE DPLL3 M2 divider to the same value that it's at
2732f135eafSPaul Walmsley  * currently.  This has the effect of setting the SDRC SDRAM AC timing
2742f135eafSPaul Walmsley  * registers to the values currently defined by the kernel.  Currently
2752f135eafSPaul Walmsley  * only defined for OMAP3; will return 0 if called on OMAP2.  Returns
2762f135eafSPaul Walmsley  * -EINVAL if the dpll3_m2_ck cannot be found, 0 if called on OMAP2,
2772f135eafSPaul Walmsley  * or passes along the return value of clk_set_rate().
2782f135eafSPaul Walmsley  */
2792f135eafSPaul Walmsley static int __init _omap2_init_reprogram_sdrc(void)
2802f135eafSPaul Walmsley {
2812f135eafSPaul Walmsley 	struct clk *dpll3_m2_ck;
2822f135eafSPaul Walmsley 	int v = -EINVAL;
2832f135eafSPaul Walmsley 	long rate;
2842f135eafSPaul Walmsley 
2852f135eafSPaul Walmsley 	if (!cpu_is_omap34xx())
2862f135eafSPaul Walmsley 		return 0;
2872f135eafSPaul Walmsley 
2882f135eafSPaul Walmsley 	dpll3_m2_ck = clk_get(NULL, "dpll3_m2_ck");
2892f135eafSPaul Walmsley 	if (!dpll3_m2_ck)
2902f135eafSPaul Walmsley 		return -EINVAL;
2912f135eafSPaul Walmsley 
2922f135eafSPaul Walmsley 	rate = clk_get_rate(dpll3_m2_ck);
2932f135eafSPaul Walmsley 	pr_info("Reprogramming SDRC clock to %ld Hz\n", rate);
2942f135eafSPaul Walmsley 	v = clk_set_rate(dpll3_m2_ck, rate);
2952f135eafSPaul Walmsley 	if (v)
2962f135eafSPaul Walmsley 		pr_err("dpll3_m2_clk rate change failed: %d\n", v);
2972f135eafSPaul Walmsley 
2982f135eafSPaul Walmsley 	clk_put(dpll3_m2_ck);
2992f135eafSPaul Walmsley 
3002f135eafSPaul Walmsley 	return v;
3012f135eafSPaul Walmsley }
3022f135eafSPaul Walmsley 
30358cda884SJean Pihet void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
30458cda884SJean Pihet 				 struct omap_sdrc_params *sdrc_cs1)
305120db2cbSTony Lindgren {
30602bfc030SPaul Walmsley 	struct omap_hwmod **hwmods = NULL;
30702bfc030SPaul Walmsley 
30802bfc030SPaul Walmsley 	if (cpu_is_omap2420())
30902bfc030SPaul Walmsley 		hwmods = omap2420_hwmods;
31002bfc030SPaul Walmsley 	else if (cpu_is_omap2430())
31102bfc030SPaul Walmsley 		hwmods = omap2430_hwmods;
31202bfc030SPaul Walmsley 	else if (cpu_is_omap34xx())
31302bfc030SPaul Walmsley 		hwmods = omap34xx_hwmods;
31402bfc030SPaul Walmsley 
31544169075SSantosh Shilimkar #ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once the clkdev is ready */
316c0407a96SPaul Walmsley 	/* The OPP tables have to be registered before a clk init */
31761f04ee8STony Lindgren 	omap_hwmod_init(hwmods);
31861f04ee8STony Lindgren 	omap2_mux_init();
319c0407a96SPaul Walmsley 	omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps);
3209717100fSPaul Walmsley 	pwrdm_init(powerdomains_omap);
321801954d3SPaul Walmsley 	clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps);
3221dbae815STony Lindgren 	omap2_clk_init();
323b3c6df3aSPaul Walmsley 	omap_serial_early_init();
32402bfc030SPaul Walmsley 	omap_hwmod_late_init();
325c0407a96SPaul Walmsley 	omap_pm_if_init();
32658cda884SJean Pihet 	omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
3272f135eafSPaul Walmsley 	_omap2_init_reprogram_sdrc();
32844169075SSantosh Shilimkar #endif
3294bbbc1adSJuha Yrjola 	gpmc_init();
3301dbae815STony Lindgren }
331