1d2912cb1SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only 21dbae815STony Lindgren /* 31dbae815STony Lindgren * linux/arch/arm/mach-omap2/io.c 41dbae815STony Lindgren * 51dbae815STony Lindgren * OMAP2 I/O mapping code 61dbae815STony Lindgren * 71dbae815STony Lindgren * Copyright (C) 2005 Nokia Corporation 844169075SSantosh Shilimkar * Copyright (C) 2007-2009 Texas Instruments 9646e3ed1STony Lindgren * 10646e3ed1STony Lindgren * Author: 11646e3ed1STony Lindgren * Juha Yrjola <juha.yrjola@nokia.com> 12646e3ed1STony Lindgren * Syed Khasim <x0khasim@ti.com> 131dbae815STony Lindgren * 1444169075SSantosh Shilimkar * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> 151dbae815STony Lindgren */ 161dbae815STony Lindgren #include <linux/module.h> 171dbae815STony Lindgren #include <linux/kernel.h> 181dbae815STony Lindgren #include <linux/init.h> 19fced80c7SRussell King #include <linux/io.h> 202f135eafSPaul Walmsley #include <linux/clk.h> 211dbae815STony Lindgren 22120db2cbSTony Lindgren #include <asm/tlb.h> 23120db2cbSTony Lindgren #include <asm/mach/map.h> 24120db2cbSTony Lindgren 2545c3eb7dSTony Lindgren #include <linux/omap-dma.h> 26646e3ed1STony Lindgren 27dc843280STony Lindgren #include "omap_hwmod.h" 28dbc04161STony Lindgren #include "soc.h" 29ee0839c2STony Lindgren #include "iomap.h" 30ee0839c2STony Lindgren #include "voltage.h" 31ee0839c2STony Lindgren #include "powerdomain.h" 32ee0839c2STony Lindgren #include "clockdomain.h" 33ee0839c2STony Lindgren #include "common.h" 34e30384abSVaibhav Hiremath #include "clock.h" 35e80a9729SPaul Walmsley #include "clock2xxx.h" 36657ebfadSPaul Walmsley #include "clock3xxx.h" 373e6ece13SPaul Walmsley #include "sdrc.h" 38b6a4226cSPaul Walmsley #include "control.h" 393d82cbbbSTony Lindgren #include "serial.h" 40bf027ca1STony Lindgren #include "sram.h" 41c4ceedcbSPaul Walmsley #include "cm2xxx.h" 42c4ceedcbSPaul Walmsley #include "cm3xxx.h" 437632a02fSTero Kristo #include "cm33xx.h" 44ab6c9bbfSTero Kristo #include "cm44xx.h" 45d9a16f9aSPaul Walmsley #include "prm.h" 46d9a16f9aSPaul Walmsley #include "cm.h" 47d9a16f9aSPaul Walmsley #include "prcm_mpu44xx.h" 48d9a16f9aSPaul Walmsley #include "prminst44xx.h" 4963a293e0SPaul Walmsley #include "prm2xxx.h" 5063a293e0SPaul Walmsley #include "prm3xxx.h" 51d9bbe84fSTero Kristo #include "prm33xx.h" 5263a293e0SPaul Walmsley #include "prm44xx.h" 5369a1e7a1STero Kristo #include "opp2xxx.h" 54db711893SAndrew F. Davis #include "omap-secure.h" 551dbae815STony Lindgren 561dbae815STony Lindgren /* 57cfa9667dSTero Kristo * omap_clk_soc_init: points to a function that does the SoC-specific 58ff931c82SRajendra Nayak * clock initializations 59ff931c82SRajendra Nayak */ 60cfa9667dSTero Kristo static int (*omap_clk_soc_init)(void); 61ff931c82SRajendra Nayak 62ff931c82SRajendra Nayak /* 631dbae815STony Lindgren * The machine specific code may provide the extra mapping besides the 641dbae815STony Lindgren * default mapping provided here. 651dbae815STony Lindgren */ 66cc26b3b0SSyed Mohammed, Khasim 67e48f814eSTony Lindgren #if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430) 68cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap24xx_io_desc[] __initdata = { 691dbae815STony Lindgren { 701dbae815STony Lindgren .virtual = L3_24XX_VIRT, 711dbae815STony Lindgren .pfn = __phys_to_pfn(L3_24XX_PHYS), 721dbae815STony Lindgren .length = L3_24XX_SIZE, 731dbae815STony Lindgren .type = MT_DEVICE 741dbae815STony Lindgren }, 7509f21ed4SKyungmin Park { 7609f21ed4SKyungmin Park .virtual = L4_24XX_VIRT, 7709f21ed4SKyungmin Park .pfn = __phys_to_pfn(L4_24XX_PHYS), 7809f21ed4SKyungmin Park .length = L4_24XX_SIZE, 7909f21ed4SKyungmin Park .type = MT_DEVICE 8009f21ed4SKyungmin Park }, 81cc26b3b0SSyed Mohammed, Khasim }; 82cc26b3b0SSyed Mohammed, Khasim 8359b479e0STony Lindgren #ifdef CONFIG_SOC_OMAP2420 84cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap242x_io_desc[] __initdata = { 851dbae815STony Lindgren { 867adb9987SPaul Walmsley .virtual = DSP_MEM_2420_VIRT, 877adb9987SPaul Walmsley .pfn = __phys_to_pfn(DSP_MEM_2420_PHYS), 887adb9987SPaul Walmsley .length = DSP_MEM_2420_SIZE, 89c40fae95STony Lindgren .type = MT_DEVICE 90c40fae95STony Lindgren }, 91c40fae95STony Lindgren { 927adb9987SPaul Walmsley .virtual = DSP_IPI_2420_VIRT, 937adb9987SPaul Walmsley .pfn = __phys_to_pfn(DSP_IPI_2420_PHYS), 947adb9987SPaul Walmsley .length = DSP_IPI_2420_SIZE, 95c40fae95STony Lindgren .type = MT_DEVICE 96c40fae95STony Lindgren }, 97c40fae95STony Lindgren { 987adb9987SPaul Walmsley .virtual = DSP_MMU_2420_VIRT, 997adb9987SPaul Walmsley .pfn = __phys_to_pfn(DSP_MMU_2420_PHYS), 1007adb9987SPaul Walmsley .length = DSP_MMU_2420_SIZE, 1011dbae815STony Lindgren .type = MT_DEVICE 102cc26b3b0SSyed Mohammed, Khasim }, 1031dbae815STony Lindgren }; 1041dbae815STony Lindgren 105cc26b3b0SSyed Mohammed, Khasim #endif 106cc26b3b0SSyed Mohammed, Khasim 10759b479e0STony Lindgren #ifdef CONFIG_SOC_OMAP2430 108cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap243x_io_desc[] __initdata = { 109cc26b3b0SSyed Mohammed, Khasim { 110cc26b3b0SSyed Mohammed, Khasim .virtual = L4_WK_243X_VIRT, 111cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(L4_WK_243X_PHYS), 112cc26b3b0SSyed Mohammed, Khasim .length = L4_WK_243X_SIZE, 113cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 114cc26b3b0SSyed Mohammed, Khasim }, 115cc26b3b0SSyed Mohammed, Khasim { 116cc26b3b0SSyed Mohammed, Khasim .virtual = OMAP243X_GPMC_VIRT, 117cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(OMAP243X_GPMC_PHYS), 118cc26b3b0SSyed Mohammed, Khasim .length = OMAP243X_GPMC_SIZE, 119cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 120cc26b3b0SSyed Mohammed, Khasim }, 121cc26b3b0SSyed Mohammed, Khasim { 122cc26b3b0SSyed Mohammed, Khasim .virtual = OMAP243X_SDRC_VIRT, 123cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(OMAP243X_SDRC_PHYS), 124cc26b3b0SSyed Mohammed, Khasim .length = OMAP243X_SDRC_SIZE, 125cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 126cc26b3b0SSyed Mohammed, Khasim }, 127cc26b3b0SSyed Mohammed, Khasim { 128cc26b3b0SSyed Mohammed, Khasim .virtual = OMAP243X_SMS_VIRT, 129cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(OMAP243X_SMS_PHYS), 130cc26b3b0SSyed Mohammed, Khasim .length = OMAP243X_SMS_SIZE, 131cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 132cc26b3b0SSyed Mohammed, Khasim }, 133cc26b3b0SSyed Mohammed, Khasim }; 134cc26b3b0SSyed Mohammed, Khasim #endif 135cc26b3b0SSyed Mohammed, Khasim #endif 136cc26b3b0SSyed Mohammed, Khasim 137a8eb7ca0STony Lindgren #ifdef CONFIG_ARCH_OMAP3 138cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap34xx_io_desc[] __initdata = { 139cc26b3b0SSyed Mohammed, Khasim { 140cc26b3b0SSyed Mohammed, Khasim .virtual = L3_34XX_VIRT, 141cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(L3_34XX_PHYS), 142cc26b3b0SSyed Mohammed, Khasim .length = L3_34XX_SIZE, 143cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 144cc26b3b0SSyed Mohammed, Khasim }, 145cc26b3b0SSyed Mohammed, Khasim { 146cc26b3b0SSyed Mohammed, Khasim .virtual = L4_34XX_VIRT, 147cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(L4_34XX_PHYS), 148cc26b3b0SSyed Mohammed, Khasim .length = L4_34XX_SIZE, 149cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 150cc26b3b0SSyed Mohammed, Khasim }, 151cc26b3b0SSyed Mohammed, Khasim { 152cc26b3b0SSyed Mohammed, Khasim .virtual = OMAP34XX_GPMC_VIRT, 153cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(OMAP34XX_GPMC_PHYS), 154cc26b3b0SSyed Mohammed, Khasim .length = OMAP34XX_GPMC_SIZE, 155cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 156cc26b3b0SSyed Mohammed, Khasim }, 157cc26b3b0SSyed Mohammed, Khasim { 158cc26b3b0SSyed Mohammed, Khasim .virtual = OMAP343X_SMS_VIRT, 159cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(OMAP343X_SMS_PHYS), 160cc26b3b0SSyed Mohammed, Khasim .length = OMAP343X_SMS_SIZE, 161cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 162cc26b3b0SSyed Mohammed, Khasim }, 163cc26b3b0SSyed Mohammed, Khasim { 164cc26b3b0SSyed Mohammed, Khasim .virtual = OMAP343X_SDRC_VIRT, 165cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(OMAP343X_SDRC_PHYS), 166cc26b3b0SSyed Mohammed, Khasim .length = OMAP343X_SDRC_SIZE, 167cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 168cc26b3b0SSyed Mohammed, Khasim }, 169cc26b3b0SSyed Mohammed, Khasim { 170cc26b3b0SSyed Mohammed, Khasim .virtual = L4_PER_34XX_VIRT, 171cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(L4_PER_34XX_PHYS), 172cc26b3b0SSyed Mohammed, Khasim .length = L4_PER_34XX_SIZE, 173cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 174cc26b3b0SSyed Mohammed, Khasim }, 175cc26b3b0SSyed Mohammed, Khasim { 176cc26b3b0SSyed Mohammed, Khasim .virtual = L4_EMU_34XX_VIRT, 177cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(L4_EMU_34XX_PHYS), 178cc26b3b0SSyed Mohammed, Khasim .length = L4_EMU_34XX_SIZE, 179cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 180cc26b3b0SSyed Mohammed, Khasim }, 181cc26b3b0SSyed Mohammed, Khasim }; 182cc26b3b0SSyed Mohammed, Khasim #endif 18301001712SHemant Pedanekar 18433959553SKevin Hilman #ifdef CONFIG_SOC_TI81XX 185a920360fSHemant Pedanekar static struct map_desc omapti81xx_io_desc[] __initdata = { 18601001712SHemant Pedanekar { 18701001712SHemant Pedanekar .virtual = L4_34XX_VIRT, 18801001712SHemant Pedanekar .pfn = __phys_to_pfn(L4_34XX_PHYS), 18901001712SHemant Pedanekar .length = L4_34XX_SIZE, 19001001712SHemant Pedanekar .type = MT_DEVICE 1911e6cb146SAfzal Mohammed } 1921e6cb146SAfzal Mohammed }; 1931e6cb146SAfzal Mohammed #endif 1941e6cb146SAfzal Mohammed 195addb154aSAfzal Mohammed #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX) 1961e6cb146SAfzal Mohammed static struct map_desc omapam33xx_io_desc[] __initdata = { 19701001712SHemant Pedanekar { 19801001712SHemant Pedanekar .virtual = L4_34XX_VIRT, 19901001712SHemant Pedanekar .pfn = __phys_to_pfn(L4_34XX_PHYS), 20001001712SHemant Pedanekar .length = L4_34XX_SIZE, 20101001712SHemant Pedanekar .type = MT_DEVICE 20201001712SHemant Pedanekar }, 2031e6cb146SAfzal Mohammed { 2041e6cb146SAfzal Mohammed .virtual = L4_WK_AM33XX_VIRT, 2051e6cb146SAfzal Mohammed .pfn = __phys_to_pfn(L4_WK_AM33XX_PHYS), 2061e6cb146SAfzal Mohammed .length = L4_WK_AM33XX_SIZE, 2071e6cb146SAfzal Mohammed .type = MT_DEVICE 2081e6cb146SAfzal Mohammed } 20901001712SHemant Pedanekar }; 21001001712SHemant Pedanekar #endif 21101001712SHemant Pedanekar 21244169075SSantosh Shilimkar #ifdef CONFIG_ARCH_OMAP4 21344169075SSantosh Shilimkar static struct map_desc omap44xx_io_desc[] __initdata = { 21444169075SSantosh Shilimkar { 21544169075SSantosh Shilimkar .virtual = L3_44XX_VIRT, 21644169075SSantosh Shilimkar .pfn = __phys_to_pfn(L3_44XX_PHYS), 21744169075SSantosh Shilimkar .length = L3_44XX_SIZE, 21844169075SSantosh Shilimkar .type = MT_DEVICE, 21944169075SSantosh Shilimkar }, 22044169075SSantosh Shilimkar { 22144169075SSantosh Shilimkar .virtual = L4_44XX_VIRT, 22244169075SSantosh Shilimkar .pfn = __phys_to_pfn(L4_44XX_PHYS), 22344169075SSantosh Shilimkar .length = L4_44XX_SIZE, 22444169075SSantosh Shilimkar .type = MT_DEVICE, 22544169075SSantosh Shilimkar }, 22644169075SSantosh Shilimkar { 22744169075SSantosh Shilimkar .virtual = L4_PER_44XX_VIRT, 22844169075SSantosh Shilimkar .pfn = __phys_to_pfn(L4_PER_44XX_PHYS), 22944169075SSantosh Shilimkar .length = L4_PER_44XX_SIZE, 23044169075SSantosh Shilimkar .type = MT_DEVICE, 23144169075SSantosh Shilimkar }, 23244169075SSantosh Shilimkar }; 23344169075SSantosh Shilimkar #endif 234cc26b3b0SSyed Mohammed, Khasim 235ea827ad5SNishanth Menon #ifdef CONFIG_SOC_OMAP5 23605e152c7SR Sricharan static struct map_desc omap54xx_io_desc[] __initdata = { 23705e152c7SR Sricharan { 23805e152c7SR Sricharan .virtual = L3_54XX_VIRT, 23905e152c7SR Sricharan .pfn = __phys_to_pfn(L3_54XX_PHYS), 24005e152c7SR Sricharan .length = L3_54XX_SIZE, 24105e152c7SR Sricharan .type = MT_DEVICE, 24205e152c7SR Sricharan }, 24305e152c7SR Sricharan { 24405e152c7SR Sricharan .virtual = L4_54XX_VIRT, 24505e152c7SR Sricharan .pfn = __phys_to_pfn(L4_54XX_PHYS), 24605e152c7SR Sricharan .length = L4_54XX_SIZE, 24705e152c7SR Sricharan .type = MT_DEVICE, 24805e152c7SR Sricharan }, 24905e152c7SR Sricharan { 25005e152c7SR Sricharan .virtual = L4_WK_54XX_VIRT, 25105e152c7SR Sricharan .pfn = __phys_to_pfn(L4_WK_54XX_PHYS), 25205e152c7SR Sricharan .length = L4_WK_54XX_SIZE, 25305e152c7SR Sricharan .type = MT_DEVICE, 25405e152c7SR Sricharan }, 25505e152c7SR Sricharan { 25605e152c7SR Sricharan .virtual = L4_PER_54XX_VIRT, 25705e152c7SR Sricharan .pfn = __phys_to_pfn(L4_PER_54XX_PHYS), 25805e152c7SR Sricharan .length = L4_PER_54XX_SIZE, 25905e152c7SR Sricharan .type = MT_DEVICE, 26005e152c7SR Sricharan }, 26105e152c7SR Sricharan }; 26205e152c7SR Sricharan #endif 26305e152c7SR Sricharan 264ea827ad5SNishanth Menon #ifdef CONFIG_SOC_DRA7XX 265ea827ad5SNishanth Menon static struct map_desc dra7xx_io_desc[] __initdata = { 266ea827ad5SNishanth Menon { 267ea827ad5SNishanth Menon .virtual = L4_CFG_MPU_DRA7XX_VIRT, 268ea827ad5SNishanth Menon .pfn = __phys_to_pfn(L4_CFG_MPU_DRA7XX_PHYS), 269ea827ad5SNishanth Menon .length = L4_CFG_MPU_DRA7XX_SIZE, 270ea827ad5SNishanth Menon .type = MT_DEVICE, 271ea827ad5SNishanth Menon }, 272ea827ad5SNishanth Menon { 273ea827ad5SNishanth Menon .virtual = L3_MAIN_SN_DRA7XX_VIRT, 274ea827ad5SNishanth Menon .pfn = __phys_to_pfn(L3_MAIN_SN_DRA7XX_PHYS), 275ea827ad5SNishanth Menon .length = L3_MAIN_SN_DRA7XX_SIZE, 276ea827ad5SNishanth Menon .type = MT_DEVICE, 277ea827ad5SNishanth Menon }, 278ea827ad5SNishanth Menon { 279ea827ad5SNishanth Menon .virtual = L4_PER1_DRA7XX_VIRT, 280ea827ad5SNishanth Menon .pfn = __phys_to_pfn(L4_PER1_DRA7XX_PHYS), 281ea827ad5SNishanth Menon .length = L4_PER1_DRA7XX_SIZE, 282ea827ad5SNishanth Menon .type = MT_DEVICE, 283ea827ad5SNishanth Menon }, 284ea827ad5SNishanth Menon { 285ea827ad5SNishanth Menon .virtual = L4_PER2_DRA7XX_VIRT, 286ea827ad5SNishanth Menon .pfn = __phys_to_pfn(L4_PER2_DRA7XX_PHYS), 287ea827ad5SNishanth Menon .length = L4_PER2_DRA7XX_SIZE, 288ea827ad5SNishanth Menon .type = MT_DEVICE, 289ea827ad5SNishanth Menon }, 290ea827ad5SNishanth Menon { 291ea827ad5SNishanth Menon .virtual = L4_PER3_DRA7XX_VIRT, 292ea827ad5SNishanth Menon .pfn = __phys_to_pfn(L4_PER3_DRA7XX_PHYS), 293ea827ad5SNishanth Menon .length = L4_PER3_DRA7XX_SIZE, 294ea827ad5SNishanth Menon .type = MT_DEVICE, 295ea827ad5SNishanth Menon }, 296ea827ad5SNishanth Menon { 297ea827ad5SNishanth Menon .virtual = L4_CFG_DRA7XX_VIRT, 298ea827ad5SNishanth Menon .pfn = __phys_to_pfn(L4_CFG_DRA7XX_PHYS), 299ea827ad5SNishanth Menon .length = L4_CFG_DRA7XX_SIZE, 300ea827ad5SNishanth Menon .type = MT_DEVICE, 301ea827ad5SNishanth Menon }, 302ea827ad5SNishanth Menon { 303ea827ad5SNishanth Menon .virtual = L4_WKUP_DRA7XX_VIRT, 304ea827ad5SNishanth Menon .pfn = __phys_to_pfn(L4_WKUP_DRA7XX_PHYS), 305ea827ad5SNishanth Menon .length = L4_WKUP_DRA7XX_SIZE, 306ea827ad5SNishanth Menon .type = MT_DEVICE, 307ea827ad5SNishanth Menon }, 308ea827ad5SNishanth Menon }; 309ea827ad5SNishanth Menon #endif 310ea827ad5SNishanth Menon 31159b479e0STony Lindgren #ifdef CONFIG_SOC_OMAP2420 312b6a4226cSPaul Walmsley void __init omap242x_map_io(void) 3136fbd55d0STony Lindgren { 3146fbd55d0STony Lindgren iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); 3156fbd55d0STony Lindgren iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc)); 3166fbd55d0STony Lindgren } 3176fbd55d0STony Lindgren #endif 3186fbd55d0STony Lindgren 31959b479e0STony Lindgren #ifdef CONFIG_SOC_OMAP2430 320b6a4226cSPaul Walmsley void __init omap243x_map_io(void) 3216fbd55d0STony Lindgren { 3226fbd55d0STony Lindgren iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); 3236fbd55d0STony Lindgren iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc)); 3246fbd55d0STony Lindgren } 3256fbd55d0STony Lindgren #endif 3266fbd55d0STony Lindgren 327a8eb7ca0STony Lindgren #ifdef CONFIG_ARCH_OMAP3 328b6a4226cSPaul Walmsley void __init omap3_map_io(void) 3296fbd55d0STony Lindgren { 3306fbd55d0STony Lindgren iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc)); 3316fbd55d0STony Lindgren } 3326fbd55d0STony Lindgren #endif 3336fbd55d0STony Lindgren 33433959553SKevin Hilman #ifdef CONFIG_SOC_TI81XX 335b6a4226cSPaul Walmsley void __init ti81xx_map_io(void) 33601001712SHemant Pedanekar { 337a920360fSHemant Pedanekar iotable_init(omapti81xx_io_desc, ARRAY_SIZE(omapti81xx_io_desc)); 33801001712SHemant Pedanekar } 33901001712SHemant Pedanekar #endif 34001001712SHemant Pedanekar 341addb154aSAfzal Mohammed #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX) 342b6a4226cSPaul Walmsley void __init am33xx_map_io(void) 3431e6cb146SAfzal Mohammed { 3441e6cb146SAfzal Mohammed iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc)); 3456fbd55d0STony Lindgren } 3466fbd55d0STony Lindgren #endif 3476fbd55d0STony Lindgren 3486fbd55d0STony Lindgren #ifdef CONFIG_ARCH_OMAP4 349b6a4226cSPaul Walmsley void __init omap4_map_io(void) 3506fbd55d0STony Lindgren { 3516fbd55d0STony Lindgren iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); 352f746929fSRussell King omap_barriers_init(); 3536fbd55d0STony Lindgren } 3546fbd55d0STony Lindgren #endif 3556fbd55d0STony Lindgren 356ea827ad5SNishanth Menon #ifdef CONFIG_SOC_OMAP5 357b6a4226cSPaul Walmsley void __init omap5_map_io(void) 35805e152c7SR Sricharan { 35905e152c7SR Sricharan iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc)); 360f746929fSRussell King omap_barriers_init(); 36105e152c7SR Sricharan } 36205e152c7SR Sricharan #endif 363ea827ad5SNishanth Menon 364ea827ad5SNishanth Menon #ifdef CONFIG_SOC_DRA7XX 365ea827ad5SNishanth Menon void __init dra7xx_map_io(void) 366ea827ad5SNishanth Menon { 367ea827ad5SNishanth Menon iotable_init(dra7xx_io_desc, ARRAY_SIZE(dra7xx_io_desc)); 368456e8d53SNishanth Menon omap_barriers_init(); 369ea827ad5SNishanth Menon } 370ea827ad5SNishanth Menon #endif 3712f135eafSPaul Walmsley /* 3722f135eafSPaul Walmsley * omap2_init_reprogram_sdrc - reprogram SDRC timing parameters 3732f135eafSPaul Walmsley * 3742f135eafSPaul Walmsley * Sets the CORE DPLL3 M2 divider to the same value that it's at 3752f135eafSPaul Walmsley * currently. This has the effect of setting the SDRC SDRAM AC timing 3762f135eafSPaul Walmsley * registers to the values currently defined by the kernel. Currently 3772f135eafSPaul Walmsley * only defined for OMAP3; will return 0 if called on OMAP2. Returns 3782f135eafSPaul Walmsley * -EINVAL if the dpll3_m2_ck cannot be found, 0 if called on OMAP2, 3792f135eafSPaul Walmsley * or passes along the return value of clk_set_rate(). 3802f135eafSPaul Walmsley */ 3812f135eafSPaul Walmsley static int __init _omap2_init_reprogram_sdrc(void) 3822f135eafSPaul Walmsley { 3832f135eafSPaul Walmsley struct clk *dpll3_m2_ck; 3842f135eafSPaul Walmsley int v = -EINVAL; 3852f135eafSPaul Walmsley long rate; 3862f135eafSPaul Walmsley 3872f135eafSPaul Walmsley if (!cpu_is_omap34xx()) 3882f135eafSPaul Walmsley return 0; 3892f135eafSPaul Walmsley 3902f135eafSPaul Walmsley dpll3_m2_ck = clk_get(NULL, "dpll3_m2_ck"); 391e281f7ecSAaro Koskinen if (IS_ERR(dpll3_m2_ck)) 3922f135eafSPaul Walmsley return -EINVAL; 3932f135eafSPaul Walmsley 3942f135eafSPaul Walmsley rate = clk_get_rate(dpll3_m2_ck); 3952f135eafSPaul Walmsley pr_info("Reprogramming SDRC clock to %ld Hz\n", rate); 3962f135eafSPaul Walmsley v = clk_set_rate(dpll3_m2_ck, rate); 3972f135eafSPaul Walmsley if (v) 3982f135eafSPaul Walmsley pr_err("dpll3_m2_clk rate change failed: %d\n", v); 3992f135eafSPaul Walmsley 4002f135eafSPaul Walmsley clk_put(dpll3_m2_ck); 4012f135eafSPaul Walmsley 4022f135eafSPaul Walmsley return v; 4032f135eafSPaul Walmsley } 4042f135eafSPaul Walmsley 405*f21af425STony Lindgren #ifdef CONFIG_OMAP_HWMOD 4062092e5ccSPaul Walmsley static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data) 4072092e5ccSPaul Walmsley { 4082092e5ccSPaul Walmsley return omap_hwmod_set_postsetup_state(oh, *(u8 *)data); 4092092e5ccSPaul Walmsley } 4102092e5ccSPaul Walmsley 411293ea3d0SArnd Bergmann static void __init __maybe_unused omap_hwmod_init_postsetup(void) 412120db2cbSTony Lindgren { 4136d63b12dSTony Lindgren u8 postsetup_state = _HWMOD_STATE_DEFAULT; 4142092e5ccSPaul Walmsley 4152092e5ccSPaul Walmsley /* Set the default postsetup state for all hwmods */ 4162092e5ccSPaul Walmsley omap_hwmod_for_each(_set_hwmod_postsetup_state, &postsetup_state); 4174805734bSPaul Walmsley } 418*f21af425STony Lindgren #else 419*f21af425STony Lindgren static inline void omap_hwmod_init_postsetup(void) 420*f21af425STony Lindgren { 421*f21af425STony Lindgren } 422*f21af425STony Lindgren #endif 4234805734bSPaul Walmsley 42416110798SPaul Walmsley #ifdef CONFIG_SOC_OMAP2420 4258f5b5a41STony Lindgren void __init omap2420_init_early(void) 4268f5b5a41STony Lindgren { 427b6a4226cSPaul Walmsley omap2_set_globals_tap(OMAP242X_CLASS, OMAP2_L4_IO_ADDRESS(0x48014000)); 428b6a4226cSPaul Walmsley omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP2420_SDRC_BASE), 429b6a4226cSPaul Walmsley OMAP2_L3_IO_ADDRESS(OMAP2420_SMS_BASE)); 4302208bf11STero Kristo omap2_control_base_init(); 4314de34f35SVaibhav Hiremath omap2xxx_check_revision(); 432ab7b2ffcSTero Kristo omap2_prcm_base_init(); 4337b250affSTony Lindgren omap2xxx_voltagedomains_init(); 4347b250affSTony Lindgren omap242x_powerdomains_init(); 4357b250affSTony Lindgren omap242x_clockdomains_init(); 4367b250affSTony Lindgren omap2420_hwmod_init(); 4377b250affSTony Lindgren omap_hwmod_init_postsetup(); 43869a1e7a1STero Kristo omap_clk_soc_init = omap2420_dt_clk_init; 43969a1e7a1STero Kristo rate_table = omap2420_rate_table; 4408f5b5a41STony Lindgren } 441bbd707acSShawn Guo 442bbd707acSShawn Guo void __init omap2420_init_late(void) 443bbd707acSShawn Guo { 44402b83dcbSTony Lindgren omap_pm_soc_init = omap2_pm_init; 445bbd707acSShawn Guo } 44616110798SPaul Walmsley #endif 4478f5b5a41STony Lindgren 44816110798SPaul Walmsley #ifdef CONFIG_SOC_OMAP2430 4498f5b5a41STony Lindgren void __init omap2430_init_early(void) 4508f5b5a41STony Lindgren { 451b6a4226cSPaul Walmsley omap2_set_globals_tap(OMAP243X_CLASS, OMAP2_L4_IO_ADDRESS(0x4900a000)); 452b6a4226cSPaul Walmsley omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP243X_SDRC_BASE), 453b6a4226cSPaul Walmsley OMAP2_L3_IO_ADDRESS(OMAP243X_SMS_BASE)); 4542208bf11STero Kristo omap2_control_base_init(); 4554de34f35SVaibhav Hiremath omap2xxx_check_revision(); 456ab7b2ffcSTero Kristo omap2_prcm_base_init(); 4577b250affSTony Lindgren omap2xxx_voltagedomains_init(); 4587b250affSTony Lindgren omap243x_powerdomains_init(); 4597b250affSTony Lindgren omap243x_clockdomains_init(); 4607b250affSTony Lindgren omap2430_hwmod_init(); 4617b250affSTony Lindgren omap_hwmod_init_postsetup(); 46269a1e7a1STero Kristo omap_clk_soc_init = omap2430_dt_clk_init; 46369a1e7a1STero Kristo rate_table = omap2430_rate_table; 4647b250affSTony Lindgren } 465bbd707acSShawn Guo 466bbd707acSShawn Guo void __init omap2430_init_late(void) 467bbd707acSShawn Guo { 46802b83dcbSTony Lindgren omap_pm_soc_init = omap2_pm_init; 469bbd707acSShawn Guo } 470c4e2d245SSanjeev Premi #endif 4717b250affSTony Lindgren 4727b250affSTony Lindgren /* 4737b250affSTony Lindgren * Currently only board-omap3beagle.c should call this because of the 4747b250affSTony Lindgren * same machine_id for 34xx and 36xx beagle.. Will get fixed with DT. 4757b250affSTony Lindgren */ 476c4e2d245SSanjeev Premi #ifdef CONFIG_ARCH_OMAP3 4777b250affSTony Lindgren void __init omap3_init_early(void) 4787b250affSTony Lindgren { 479b6a4226cSPaul Walmsley omap2_set_globals_tap(OMAP343X_CLASS, OMAP2_L4_IO_ADDRESS(0x4830A000)); 480b6a4226cSPaul Walmsley omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE), 481b6a4226cSPaul Walmsley OMAP2_L3_IO_ADDRESS(OMAP343X_SMS_BASE)); 4822208bf11STero Kristo omap2_control_base_init(); 4834de34f35SVaibhav Hiremath omap3xxx_check_revision(); 4844de34f35SVaibhav Hiremath omap3xxx_check_features(); 485ab7b2ffcSTero Kristo omap2_prcm_base_init(); 4867b250affSTony Lindgren omap3xxx_voltagedomains_init(); 4877b250affSTony Lindgren omap3xxx_powerdomains_init(); 4887b250affSTony Lindgren omap3xxx_clockdomains_init(); 4897b250affSTony Lindgren omap3xxx_hwmod_init(); 4907b250affSTony Lindgren omap_hwmod_init_postsetup(); 491db711893SAndrew F. Davis omap_secure_init(); 4928f5b5a41STony Lindgren } 4938f5b5a41STony Lindgren 4948f5b5a41STony Lindgren void __init omap3430_init_early(void) 4958f5b5a41STony Lindgren { 4967b250affSTony Lindgren omap3_init_early(); 4973e049157STero Kristo omap_clk_soc_init = omap3430_dt_clk_init; 4988f5b5a41STony Lindgren } 4998f5b5a41STony Lindgren 5008f5b5a41STony Lindgren void __init omap35xx_init_early(void) 5018f5b5a41STony Lindgren { 5027b250affSTony Lindgren omap3_init_early(); 5033e049157STero Kristo omap_clk_soc_init = omap3430_dt_clk_init; 5048f5b5a41STony Lindgren } 5058f5b5a41STony Lindgren 5068f5b5a41STony Lindgren void __init omap3630_init_early(void) 5078f5b5a41STony Lindgren { 5087b250affSTony Lindgren omap3_init_early(); 5093e049157STero Kristo omap_clk_soc_init = omap3630_dt_clk_init; 5108f5b5a41STony Lindgren } 5118f5b5a41STony Lindgren 5128f5b5a41STony Lindgren void __init am35xx_init_early(void) 5138f5b5a41STony Lindgren { 5147b250affSTony Lindgren omap3_init_early(); 5153e049157STero Kristo omap_clk_soc_init = am35xx_dt_clk_init; 5168f5b5a41STony Lindgren } 5178f5b5a41STony Lindgren 518bbd707acSShawn Guo void __init omap3_init_late(void) 519bbd707acSShawn Guo { 52002b83dcbSTony Lindgren omap_pm_soc_init = omap3_pm_init; 521bbd707acSShawn Guo } 522bbd707acSShawn Guo 523bbd707acSShawn Guo void __init ti81xx_init_late(void) 524bbd707acSShawn Guo { 52502b83dcbSTony Lindgren omap_pm_soc_init = omap_pm_nop_init; 526bbd707acSShawn Guo } 527c4e2d245SSanjeev Premi #endif 5288f5b5a41STony Lindgren 529a64459c4SAida Mynzhasova #ifdef CONFIG_SOC_TI81XX 530a64459c4SAida Mynzhasova void __init ti814x_init_early(void) 531a64459c4SAida Mynzhasova { 532a64459c4SAida Mynzhasova omap2_set_globals_tap(TI814X_CLASS, 533a64459c4SAida Mynzhasova OMAP2_L4_IO_ADDRESS(TI81XX_TAP_BASE)); 5342208bf11STero Kristo omap2_control_base_init(); 535a64459c4SAida Mynzhasova omap3xxx_check_revision(); 536a64459c4SAida Mynzhasova ti81xx_check_features(); 537ab7b2ffcSTero Kristo omap2_prcm_base_init(); 538a64459c4SAida Mynzhasova omap3xxx_voltagedomains_init(); 539a64459c4SAida Mynzhasova omap3xxx_powerdomains_init(); 540185fde6dSTony Lindgren ti814x_clockdomains_init(); 5410f3ccb24STony Lindgren dm814x_hwmod_init(); 542a64459c4SAida Mynzhasova omap_hwmod_init_postsetup(); 5439cf705deSTony Lindgren omap_clk_soc_init = dm814x_dt_clk_init; 544db711893SAndrew F. Davis omap_secure_init(); 545a64459c4SAida Mynzhasova } 546a64459c4SAida Mynzhasova 547a64459c4SAida Mynzhasova void __init ti816x_init_early(void) 548a64459c4SAida Mynzhasova { 549a64459c4SAida Mynzhasova omap2_set_globals_tap(TI816X_CLASS, 550a64459c4SAida Mynzhasova OMAP2_L4_IO_ADDRESS(TI81XX_TAP_BASE)); 5512208bf11STero Kristo omap2_control_base_init(); 552a64459c4SAida Mynzhasova omap3xxx_check_revision(); 553a64459c4SAida Mynzhasova ti81xx_check_features(); 554ab7b2ffcSTero Kristo omap2_prcm_base_init(); 555a64459c4SAida Mynzhasova omap3xxx_voltagedomains_init(); 556a64459c4SAida Mynzhasova omap3xxx_powerdomains_init(); 557185fde6dSTony Lindgren ti816x_clockdomains_init(); 5580f3ccb24STony Lindgren dm816x_hwmod_init(); 559a64459c4SAida Mynzhasova omap_hwmod_init_postsetup(); 5609cf705deSTony Lindgren omap_clk_soc_init = dm816x_dt_clk_init; 561db711893SAndrew F. Davis omap_secure_init(); 562a64459c4SAida Mynzhasova } 563a64459c4SAida Mynzhasova #endif 564a64459c4SAida Mynzhasova 56508f30989SAfzal Mohammed #ifdef CONFIG_SOC_AM33XX 56608f30989SAfzal Mohammed void __init am33xx_init_early(void) 56708f30989SAfzal Mohammed { 568b6a4226cSPaul Walmsley omap2_set_globals_tap(AM335X_CLASS, 569b6a4226cSPaul Walmsley AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE)); 5702208bf11STero Kristo omap2_control_base_init(); 57108f30989SAfzal Mohammed omap3xxx_check_revision(); 5727bcad170SVaibhav Hiremath am33xx_check_features(); 573ab7b2ffcSTero Kristo omap2_prcm_base_init(); 5743f0ea764SVaibhav Hiremath am33xx_powerdomains_init(); 5759c80f3aaSVaibhav Hiremath am33xx_clockdomains_init(); 576149c09d3STero Kristo omap_clk_soc_init = am33xx_dt_clk_init; 577db711893SAndrew F. Davis omap_secure_init(); 57808f30989SAfzal Mohammed } 579765e7a06SNishanth Menon 580765e7a06SNishanth Menon void __init am33xx_init_late(void) 581765e7a06SNishanth Menon { 58202b83dcbSTony Lindgren omap_pm_soc_init = amx3_common_pm_init; 583765e7a06SNishanth Menon } 58408f30989SAfzal Mohammed #endif 58508f30989SAfzal Mohammed 586c5107027SAfzal Mohammed #ifdef CONFIG_SOC_AM43XX 587c5107027SAfzal Mohammed void __init am43xx_init_early(void) 588c5107027SAfzal Mohammed { 589c5107027SAfzal Mohammed omap2_set_globals_tap(AM335X_CLASS, 590c5107027SAfzal Mohammed AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE)); 5912208bf11STero Kristo omap2_control_base_init(); 592c5107027SAfzal Mohammed omap3xxx_check_revision(); 5937a2e0513SAfzal Mohammed am33xx_check_features(); 594ab7b2ffcSTero Kristo omap2_prcm_base_init(); 5958835cf6eSAmbresh K am43xx_powerdomains_init(); 5968835cf6eSAmbresh K am43xx_clockdomains_init(); 597d941f86fSSekhar Nori omap_l2_cache_init(); 598d22031e2STero Kristo omap_clk_soc_init = am43xx_dt_clk_init; 599db711893SAndrew F. Davis omap_secure_init(); 600c5107027SAfzal Mohammed } 601765e7a06SNishanth Menon 602765e7a06SNishanth Menon void __init am43xx_init_late(void) 603765e7a06SNishanth Menon { 60402b83dcbSTony Lindgren omap_pm_soc_init = amx3_common_pm_init; 605765e7a06SNishanth Menon } 606c5107027SAfzal Mohammed #endif 607c5107027SAfzal Mohammed 608c4e2d245SSanjeev Premi #ifdef CONFIG_ARCH_OMAP4 6098f5b5a41STony Lindgren void __init omap4430_init_early(void) 6108f5b5a41STony Lindgren { 611b6a4226cSPaul Walmsley omap2_set_globals_tap(OMAP443X_CLASS, 612b6a4226cSPaul Walmsley OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE)); 613d9a16f9aSPaul Walmsley omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE)); 614ca125b5eSTero Kristo omap2_control_base_init(); 6154de34f35SVaibhav Hiremath omap4xxx_check_revision(); 6164de34f35SVaibhav Hiremath omap4xxx_check_features(); 617ab7b2ffcSTero Kristo omap2_prcm_base_init(); 618f4b9f40aSTony Lindgren omap4_sar_ram_init(); 6190573b957STony Lindgren omap4_mpuss_early_init(); 620de70af49SNishanth Menon omap4_pm_init_early(); 6217b250affSTony Lindgren omap44xx_voltagedomains_init(); 6227b250affSTony Lindgren omap44xx_powerdomains_init(); 6237b250affSTony Lindgren omap44xx_clockdomains_init(); 624b39b14e6SSekhar Nori omap_l2_cache_init(); 625c8c88d85STero Kristo omap_clk_soc_init = omap4xxx_dt_clk_init; 626db711893SAndrew F. Davis omap_secure_init(); 6278f5b5a41STony Lindgren } 628bbd707acSShawn Guo 629bbd707acSShawn Guo void __init omap4430_init_late(void) 630bbd707acSShawn Guo { 63102b83dcbSTony Lindgren omap_pm_soc_init = omap4_pm_init; 632bbd707acSShawn Guo } 633c4e2d245SSanjeev Premi #endif 6348f5b5a41STony Lindgren 63505e152c7SR Sricharan #ifdef CONFIG_SOC_OMAP5 63605e152c7SR Sricharan void __init omap5_init_early(void) 63705e152c7SR Sricharan { 638b6a4226cSPaul Walmsley omap2_set_globals_tap(OMAP54XX_CLASS, 639b6a4226cSPaul Walmsley OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE)); 640d9a16f9aSPaul Walmsley omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); 641ca125b5eSTero Kristo omap2_control_base_init(); 642ab7b2ffcSTero Kristo omap2_prcm_base_init(); 64305e152c7SR Sricharan omap5xxx_check_revision(); 644f4b9f40aSTony Lindgren omap4_sar_ram_init(); 6458a8be46aSTony Lindgren omap4_mpuss_early_init(); 6468a8be46aSTony Lindgren omap4_pm_init_early(); 647e4020aa9SSantosh Shilimkar omap54xx_voltagedomains_init(); 648e4020aa9SSantosh Shilimkar omap54xx_powerdomains_init(); 649e4020aa9SSantosh Shilimkar omap54xx_clockdomains_init(); 650cfa9667dSTero Kristo omap_clk_soc_init = omap5xxx_dt_clk_init; 651db711893SAndrew F. Davis omap_secure_init(); 65205e152c7SR Sricharan } 653765e7a06SNishanth Menon 654765e7a06SNishanth Menon void __init omap5_init_late(void) 655765e7a06SNishanth Menon { 65602b83dcbSTony Lindgren omap_pm_soc_init = omap4_pm_init; 657765e7a06SNishanth Menon } 65805e152c7SR Sricharan #endif 65905e152c7SR Sricharan 660a3a9384aSR Sricharan #ifdef CONFIG_SOC_DRA7XX 661a3a9384aSR Sricharan void __init dra7xx_init_early(void) 662a3a9384aSR Sricharan { 663ec490f6fSNishanth Menon omap2_set_globals_tap(DRA7XX_CLASS, 664ec490f6fSNishanth Menon OMAP2_L4_IO_ADDRESS(DRA7XX_TAP_BASE)); 665a3a9384aSR Sricharan omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); 666ca125b5eSTero Kristo omap2_control_base_init(); 6676af16a1dSRajendra Nayak omap4_pm_init_early(); 668ab7b2ffcSTero Kristo omap2_prcm_base_init(); 669733d20eeSNishanth Menon dra7xxx_check_revision(); 6707de516a6SAmbresh K dra7xx_powerdomains_init(); 6717de516a6SAmbresh K dra7xx_clockdomains_init(); 672f1cf498eSTero Kristo omap_clk_soc_init = dra7xx_dt_clk_init; 673db711893SAndrew F. Davis omap_secure_init(); 674a3a9384aSR Sricharan } 675765e7a06SNishanth Menon 676765e7a06SNishanth Menon void __init dra7xx_init_late(void) 677765e7a06SNishanth Menon { 67802b83dcbSTony Lindgren omap_pm_soc_init = omap4_pm_init; 679765e7a06SNishanth Menon } 680a3a9384aSR Sricharan #endif 681a3a9384aSR Sricharan 682a3a9384aSR Sricharan 683a4ca9dbeSTony Lindgren void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, 6844805734bSPaul Walmsley struct omap_sdrc_params *sdrc_cs1) 6854805734bSPaul Walmsley { 686a66cb345STony Lindgren omap_sram_init(); 687a66cb345STony Lindgren 68801001712SHemant Pedanekar if (cpu_is_omap24xx() || omap3_has_sdrc()) { 68958cda884SJean Pihet omap2_sdrc_init(sdrc_cs0, sdrc_cs1); 6902f135eafSPaul Walmsley _omap2_init_reprogram_sdrc(); 691aa4b1f6eSKevin Hilman } 6921dbae815STony Lindgren } 693cfa9667dSTero Kristo 694cfa9667dSTero Kristo int __init omap_clk_init(void) 695cfa9667dSTero Kristo { 696cfa9667dSTero Kristo int ret = 0; 697cfa9667dSTero Kristo 698cfa9667dSTero Kristo if (!omap_clk_soc_init) 699cfa9667dSTero Kristo return 0; 700cfa9667dSTero Kristo 7018111e010STero Kristo ti_clk_init_features(); 7028111e010STero Kristo 703e9e63088STero Kristo omap2_clk_setup_ll_ops(); 704e9e63088STero Kristo 705fe87414fSTero Kristo ret = omap_control_init(); 706fe87414fSTero Kristo if (ret) 707fe87414fSTero Kristo return ret; 708fe87414fSTero Kristo 7093a1a388eSTero Kristo ret = omap_prcm_init(); 710c08ee14cSTero Kristo if (ret) 711c08ee14cSTero Kristo return ret; 712c08ee14cSTero Kristo 713c08ee14cSTero Kristo of_clk_init(NULL); 714c08ee14cSTero Kristo 715c08ee14cSTero Kristo ti_dt_clk_init_retry_clks(); 716c08ee14cSTero Kristo 717c08ee14cSTero Kristo ti_dt_clockdomains_setup(); 718c08ee14cSTero Kristo 719cfa9667dSTero Kristo ret = omap_clk_soc_init(); 720cfa9667dSTero Kristo 721cfa9667dSTero Kristo return ret; 722cfa9667dSTero Kristo } 723