xref: /openbmc/linux/arch/arm/mach-omap2/io.c (revision 7adb9987177f7aa269505ef65f4b4ed84bbc17b5)
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>
2591773a00STomi Valkeinen #include <linux/omapfb.h>
261dbae815STony Lindgren 
27120db2cbSTony Lindgren #include <asm/tlb.h>
28120db2cbSTony Lindgren 
29120db2cbSTony Lindgren #include <asm/mach/map.h>
30120db2cbSTony Lindgren 
31ce491cf8STony Lindgren #include <plat/mux.h>
32ce491cf8STony Lindgren #include <plat/sram.h>
33ce491cf8STony Lindgren #include <plat/sdrc.h>
34ce491cf8STony Lindgren #include <plat/gpmc.h>
35ce491cf8STony Lindgren #include <plat/serial.h>
36afedec18STomi Valkeinen #include <plat/vram.h>
37646e3ed1STony Lindgren 
38646e3ed1STony Lindgren #include "clock.h"
391dbae815STony Lindgren 
40ce491cf8STony Lindgren #include <plat/omap-pm.h>
41ce491cf8STony Lindgren #include <plat/powerdomain.h>
429717100fSPaul Walmsley #include "powerdomains.h"
439717100fSPaul Walmsley 
44ce491cf8STony Lindgren #include <plat/clockdomain.h>
45801954d3SPaul Walmsley #include "clockdomains.h"
46ce491cf8STony Lindgren #include <plat/omap_hwmod.h>
4702bfc030SPaul Walmsley #include "omap_hwmod_2420.h"
4802bfc030SPaul Walmsley #include "omap_hwmod_2430.h"
4902bfc030SPaul Walmsley #include "omap_hwmod_34xx.h"
5002bfc030SPaul Walmsley 
511dbae815STony Lindgren /*
521dbae815STony Lindgren  * The machine specific code may provide the extra mapping besides the
531dbae815STony Lindgren  * default mapping provided here.
541dbae815STony Lindgren  */
55cc26b3b0SSyed Mohammed, Khasim 
56cc26b3b0SSyed Mohammed, Khasim #ifdef CONFIG_ARCH_OMAP24XX
57cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap24xx_io_desc[] __initdata = {
581dbae815STony Lindgren 	{
591dbae815STony Lindgren 		.virtual	= L3_24XX_VIRT,
601dbae815STony Lindgren 		.pfn		= __phys_to_pfn(L3_24XX_PHYS),
611dbae815STony Lindgren 		.length		= L3_24XX_SIZE,
621dbae815STony Lindgren 		.type		= MT_DEVICE
631dbae815STony Lindgren 	},
6409f21ed4SKyungmin Park 	{
6509f21ed4SKyungmin Park 		.virtual	= L4_24XX_VIRT,
6609f21ed4SKyungmin Park 		.pfn		= __phys_to_pfn(L4_24XX_PHYS),
6709f21ed4SKyungmin Park 		.length		= L4_24XX_SIZE,
6809f21ed4SKyungmin Park 		.type		= MT_DEVICE
6909f21ed4SKyungmin Park 	},
70cc26b3b0SSyed Mohammed, Khasim };
71cc26b3b0SSyed Mohammed, Khasim 
72cc26b3b0SSyed Mohammed, Khasim #ifdef CONFIG_ARCH_OMAP2420
73cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap242x_io_desc[] __initdata = {
741dbae815STony Lindgren 	{
75*7adb9987SPaul Walmsley 		.virtual	= DSP_MEM_2420_VIRT,
76*7adb9987SPaul Walmsley 		.pfn		= __phys_to_pfn(DSP_MEM_2420_PHYS),
77*7adb9987SPaul Walmsley 		.length		= DSP_MEM_2420_SIZE,
78c40fae95STony Lindgren 		.type		= MT_DEVICE
79c40fae95STony Lindgren 	},
80c40fae95STony Lindgren 	{
81*7adb9987SPaul Walmsley 		.virtual	= DSP_IPI_2420_VIRT,
82*7adb9987SPaul Walmsley 		.pfn		= __phys_to_pfn(DSP_IPI_2420_PHYS),
83*7adb9987SPaul Walmsley 		.length		= DSP_IPI_2420_SIZE,
84c40fae95STony Lindgren 		.type		= MT_DEVICE
85c40fae95STony Lindgren 	},
86c40fae95STony Lindgren 	{
87*7adb9987SPaul Walmsley 		.virtual	= DSP_MMU_2420_VIRT,
88*7adb9987SPaul Walmsley 		.pfn		= __phys_to_pfn(DSP_MMU_2420_PHYS),
89*7adb9987SPaul Walmsley 		.length		= DSP_MMU_2420_SIZE,
901dbae815STony Lindgren 		.type		= MT_DEVICE
91cc26b3b0SSyed Mohammed, Khasim 	},
921dbae815STony Lindgren };
931dbae815STony Lindgren 
94cc26b3b0SSyed Mohammed, Khasim #endif
95cc26b3b0SSyed Mohammed, Khasim 
96cc26b3b0SSyed Mohammed, Khasim #ifdef CONFIG_ARCH_OMAP2430
97cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap243x_io_desc[] __initdata = {
98cc26b3b0SSyed Mohammed, Khasim 	{
99cc26b3b0SSyed Mohammed, Khasim 		.virtual	= L4_WK_243X_VIRT,
100cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(L4_WK_243X_PHYS),
101cc26b3b0SSyed Mohammed, Khasim 		.length		= L4_WK_243X_SIZE,
102cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
103cc26b3b0SSyed Mohammed, Khasim 	},
104cc26b3b0SSyed Mohammed, Khasim 	{
105cc26b3b0SSyed Mohammed, Khasim 		.virtual	= OMAP243X_GPMC_VIRT,
106cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(OMAP243X_GPMC_PHYS),
107cc26b3b0SSyed Mohammed, Khasim 		.length		= OMAP243X_GPMC_SIZE,
108cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
109cc26b3b0SSyed Mohammed, Khasim 	},
110cc26b3b0SSyed Mohammed, Khasim 	{
111cc26b3b0SSyed Mohammed, Khasim 		.virtual	= OMAP243X_SDRC_VIRT,
112cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(OMAP243X_SDRC_PHYS),
113cc26b3b0SSyed Mohammed, Khasim 		.length		= OMAP243X_SDRC_SIZE,
114cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
115cc26b3b0SSyed Mohammed, Khasim 	},
116cc26b3b0SSyed Mohammed, Khasim 	{
117cc26b3b0SSyed Mohammed, Khasim 		.virtual	= OMAP243X_SMS_VIRT,
118cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(OMAP243X_SMS_PHYS),
119cc26b3b0SSyed Mohammed, Khasim 		.length		= OMAP243X_SMS_SIZE,
120cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
121cc26b3b0SSyed Mohammed, Khasim 	},
122cc26b3b0SSyed Mohammed, Khasim };
123cc26b3b0SSyed Mohammed, Khasim #endif
124cc26b3b0SSyed Mohammed, Khasim #endif
125cc26b3b0SSyed Mohammed, Khasim 
126cc26b3b0SSyed Mohammed, Khasim #ifdef	CONFIG_ARCH_OMAP34XX
127cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap34xx_io_desc[] __initdata = {
128cc26b3b0SSyed Mohammed, Khasim 	{
129cc26b3b0SSyed Mohammed, Khasim 		.virtual	= L3_34XX_VIRT,
130cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(L3_34XX_PHYS),
131cc26b3b0SSyed Mohammed, Khasim 		.length		= L3_34XX_SIZE,
132cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
133cc26b3b0SSyed Mohammed, Khasim 	},
134cc26b3b0SSyed Mohammed, Khasim 	{
135cc26b3b0SSyed Mohammed, Khasim 		.virtual	= L4_34XX_VIRT,
136cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(L4_34XX_PHYS),
137cc26b3b0SSyed Mohammed, Khasim 		.length		= L4_34XX_SIZE,
138cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
139cc26b3b0SSyed Mohammed, Khasim 	},
140cc26b3b0SSyed Mohammed, Khasim 	{
141cc26b3b0SSyed Mohammed, Khasim 		.virtual	= L4_WK_34XX_VIRT,
142cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(L4_WK_34XX_PHYS),
143cc26b3b0SSyed Mohammed, Khasim 		.length		= L4_WK_34XX_SIZE,
144cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
145cc26b3b0SSyed Mohammed, Khasim 	},
146cc26b3b0SSyed Mohammed, Khasim 	{
147cc26b3b0SSyed Mohammed, Khasim 		.virtual	= OMAP34XX_GPMC_VIRT,
148cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(OMAP34XX_GPMC_PHYS),
149cc26b3b0SSyed Mohammed, Khasim 		.length		= OMAP34XX_GPMC_SIZE,
150cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
151cc26b3b0SSyed Mohammed, Khasim 	},
152cc26b3b0SSyed Mohammed, Khasim 	{
153cc26b3b0SSyed Mohammed, Khasim 		.virtual	= OMAP343X_SMS_VIRT,
154cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(OMAP343X_SMS_PHYS),
155cc26b3b0SSyed Mohammed, Khasim 		.length		= OMAP343X_SMS_SIZE,
156cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
157cc26b3b0SSyed Mohammed, Khasim 	},
158cc26b3b0SSyed Mohammed, Khasim 	{
159cc26b3b0SSyed Mohammed, Khasim 		.virtual	= OMAP343X_SDRC_VIRT,
160cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(OMAP343X_SDRC_PHYS),
161cc26b3b0SSyed Mohammed, Khasim 		.length		= OMAP343X_SDRC_SIZE,
162cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
163cc26b3b0SSyed Mohammed, Khasim 	},
164cc26b3b0SSyed Mohammed, Khasim 	{
165cc26b3b0SSyed Mohammed, Khasim 		.virtual	= L4_PER_34XX_VIRT,
166cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(L4_PER_34XX_PHYS),
167cc26b3b0SSyed Mohammed, Khasim 		.length		= L4_PER_34XX_SIZE,
168cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
169cc26b3b0SSyed Mohammed, Khasim 	},
170cc26b3b0SSyed Mohammed, Khasim 	{
171cc26b3b0SSyed Mohammed, Khasim 		.virtual	= L4_EMU_34XX_VIRT,
172cc26b3b0SSyed Mohammed, Khasim 		.pfn		= __phys_to_pfn(L4_EMU_34XX_PHYS),
173cc26b3b0SSyed Mohammed, Khasim 		.length		= L4_EMU_34XX_SIZE,
174cc26b3b0SSyed Mohammed, Khasim 		.type		= MT_DEVICE
175cc26b3b0SSyed Mohammed, Khasim 	},
176cc26b3b0SSyed Mohammed, Khasim };
177cc26b3b0SSyed Mohammed, Khasim #endif
17844169075SSantosh Shilimkar #ifdef	CONFIG_ARCH_OMAP4
17944169075SSantosh Shilimkar static struct map_desc omap44xx_io_desc[] __initdata = {
18044169075SSantosh Shilimkar 	{
18144169075SSantosh Shilimkar 		.virtual	= L3_44XX_VIRT,
18244169075SSantosh Shilimkar 		.pfn		= __phys_to_pfn(L3_44XX_PHYS),
18344169075SSantosh Shilimkar 		.length		= L3_44XX_SIZE,
18444169075SSantosh Shilimkar 		.type		= MT_DEVICE,
18544169075SSantosh Shilimkar 	},
18644169075SSantosh Shilimkar 	{
18744169075SSantosh Shilimkar 		.virtual	= L4_44XX_VIRT,
18844169075SSantosh Shilimkar 		.pfn		= __phys_to_pfn(L4_44XX_PHYS),
18944169075SSantosh Shilimkar 		.length		= L4_44XX_SIZE,
19044169075SSantosh Shilimkar 		.type		= MT_DEVICE,
19144169075SSantosh Shilimkar 	},
19244169075SSantosh Shilimkar 	{
19344169075SSantosh Shilimkar 		.virtual	= L4_WK_44XX_VIRT,
19444169075SSantosh Shilimkar 		.pfn		= __phys_to_pfn(L4_WK_44XX_PHYS),
19544169075SSantosh Shilimkar 		.length		= L4_WK_44XX_SIZE,
19644169075SSantosh Shilimkar 		.type		= MT_DEVICE,
19744169075SSantosh Shilimkar 	},
19844169075SSantosh Shilimkar 	{
19944169075SSantosh Shilimkar 		.virtual	= OMAP44XX_GPMC_VIRT,
20044169075SSantosh Shilimkar 		.pfn		= __phys_to_pfn(OMAP44XX_GPMC_PHYS),
20144169075SSantosh Shilimkar 		.length		= OMAP44XX_GPMC_SIZE,
20244169075SSantosh Shilimkar 		.type		= MT_DEVICE,
20344169075SSantosh Shilimkar 	},
20444169075SSantosh Shilimkar 	{
205f5d2d659SSantosh Shilimkar 		.virtual	= OMAP44XX_EMIF1_VIRT,
206f5d2d659SSantosh Shilimkar 		.pfn		= __phys_to_pfn(OMAP44XX_EMIF1_PHYS),
207f5d2d659SSantosh Shilimkar 		.length		= OMAP44XX_EMIF1_SIZE,
208f5d2d659SSantosh Shilimkar 		.type		= MT_DEVICE,
209f5d2d659SSantosh Shilimkar 	},
210f5d2d659SSantosh Shilimkar 	{
211f5d2d659SSantosh Shilimkar 		.virtual	= OMAP44XX_EMIF2_VIRT,
212f5d2d659SSantosh Shilimkar 		.pfn		= __phys_to_pfn(OMAP44XX_EMIF2_PHYS),
213f5d2d659SSantosh Shilimkar 		.length		= OMAP44XX_EMIF2_SIZE,
214f5d2d659SSantosh Shilimkar 		.type		= MT_DEVICE,
215f5d2d659SSantosh Shilimkar 	},
216f5d2d659SSantosh Shilimkar 	{
217f5d2d659SSantosh Shilimkar 		.virtual	= OMAP44XX_DMM_VIRT,
218f5d2d659SSantosh Shilimkar 		.pfn		= __phys_to_pfn(OMAP44XX_DMM_PHYS),
219f5d2d659SSantosh Shilimkar 		.length		= OMAP44XX_DMM_SIZE,
220f5d2d659SSantosh Shilimkar 		.type		= MT_DEVICE,
221f5d2d659SSantosh Shilimkar 	},
222f5d2d659SSantosh Shilimkar 	{
22344169075SSantosh Shilimkar 		.virtual	= L4_PER_44XX_VIRT,
22444169075SSantosh Shilimkar 		.pfn		= __phys_to_pfn(L4_PER_44XX_PHYS),
22544169075SSantosh Shilimkar 		.length		= L4_PER_44XX_SIZE,
22644169075SSantosh Shilimkar 		.type		= MT_DEVICE,
22744169075SSantosh Shilimkar 	},
22844169075SSantosh Shilimkar 	{
22944169075SSantosh Shilimkar 		.virtual	= L4_EMU_44XX_VIRT,
23044169075SSantosh Shilimkar 		.pfn		= __phys_to_pfn(L4_EMU_44XX_PHYS),
23144169075SSantosh Shilimkar 		.length		= L4_EMU_44XX_SIZE,
23244169075SSantosh Shilimkar 		.type		= MT_DEVICE,
23344169075SSantosh Shilimkar 	},
23444169075SSantosh Shilimkar };
23544169075SSantosh Shilimkar #endif
236cc26b3b0SSyed Mohammed, Khasim 
237120db2cbSTony Lindgren void __init omap2_map_common_io(void)
2381dbae815STony Lindgren {
239cc26b3b0SSyed Mohammed, Khasim #if defined(CONFIG_ARCH_OMAP2420)
240cc26b3b0SSyed Mohammed, Khasim 	iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
241cc26b3b0SSyed Mohammed, Khasim 	iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc));
242cc26b3b0SSyed Mohammed, Khasim #endif
243cc26b3b0SSyed Mohammed, Khasim 
244cc26b3b0SSyed Mohammed, Khasim #if defined(CONFIG_ARCH_OMAP2430)
245cc26b3b0SSyed Mohammed, Khasim 	iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
246cc26b3b0SSyed Mohammed, Khasim 	iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc));
247cc26b3b0SSyed Mohammed, Khasim #endif
248cc26b3b0SSyed Mohammed, Khasim 
249cc26b3b0SSyed Mohammed, Khasim #if defined(CONFIG_ARCH_OMAP34XX)
250cc26b3b0SSyed Mohammed, Khasim 	iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc));
251cc26b3b0SSyed Mohammed, Khasim #endif
252120db2cbSTony Lindgren 
25344169075SSantosh Shilimkar #if defined(CONFIG_ARCH_OMAP4)
25444169075SSantosh Shilimkar 	iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc));
25544169075SSantosh Shilimkar #endif
256120db2cbSTony Lindgren 	/* Normally devicemaps_init() would flush caches and tlb after
257120db2cbSTony Lindgren 	 * mdesc->map_io(), but we must also do it here because of the CPU
258120db2cbSTony Lindgren 	 * revision check below.
259120db2cbSTony Lindgren 	 */
260120db2cbSTony Lindgren 	local_flush_tlb_all();
261120db2cbSTony Lindgren 	flush_cache_all();
262120db2cbSTony Lindgren 
2631dbae815STony Lindgren 	omap2_check_revision();
2641dbae815STony Lindgren 	omap_sram_init();
265b7cc6d46SImre Deak 	omapfb_reserve_sdram();
266afedec18STomi Valkeinen 	omap_vram_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);
3225b7815b5SSantosh Shilimkar #endif
323d79b1267SRajendra Nayak 	omap2_clk_init();
324b3c6df3aSPaul Walmsley 	omap_serial_early_init();
3255b7815b5SSantosh Shilimkar #ifndef CONFIG_ARCH_OMAP4
32602bfc030SPaul Walmsley 	omap_hwmod_late_init();
327c0407a96SPaul Walmsley 	omap_pm_if_init();
32858cda884SJean Pihet 	omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
3292f135eafSPaul Walmsley 	_omap2_init_reprogram_sdrc();
33044169075SSantosh Shilimkar #endif
3314bbbc1adSJuha Yrjola 	gpmc_init();
3321dbae815STony Lindgren }
333