1*d2912cb1SThomas 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" 541dbae815STony Lindgren 551dbae815STony Lindgren /* 56cfa9667dSTero Kristo * omap_clk_soc_init: points to a function that does the SoC-specific 57ff931c82SRajendra Nayak * clock initializations 58ff931c82SRajendra Nayak */ 59cfa9667dSTero Kristo static int (*omap_clk_soc_init)(void); 60ff931c82SRajendra Nayak 61ff931c82SRajendra Nayak /* 621dbae815STony Lindgren * The machine specific code may provide the extra mapping besides the 631dbae815STony Lindgren * default mapping provided here. 641dbae815STony Lindgren */ 65cc26b3b0SSyed Mohammed, Khasim 66e48f814eSTony Lindgren #if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430) 67cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap24xx_io_desc[] __initdata = { 681dbae815STony Lindgren { 691dbae815STony Lindgren .virtual = L3_24XX_VIRT, 701dbae815STony Lindgren .pfn = __phys_to_pfn(L3_24XX_PHYS), 711dbae815STony Lindgren .length = L3_24XX_SIZE, 721dbae815STony Lindgren .type = MT_DEVICE 731dbae815STony Lindgren }, 7409f21ed4SKyungmin Park { 7509f21ed4SKyungmin Park .virtual = L4_24XX_VIRT, 7609f21ed4SKyungmin Park .pfn = __phys_to_pfn(L4_24XX_PHYS), 7709f21ed4SKyungmin Park .length = L4_24XX_SIZE, 7809f21ed4SKyungmin Park .type = MT_DEVICE 7909f21ed4SKyungmin Park }, 80cc26b3b0SSyed Mohammed, Khasim }; 81cc26b3b0SSyed Mohammed, Khasim 8259b479e0STony Lindgren #ifdef CONFIG_SOC_OMAP2420 83cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap242x_io_desc[] __initdata = { 841dbae815STony Lindgren { 857adb9987SPaul Walmsley .virtual = DSP_MEM_2420_VIRT, 867adb9987SPaul Walmsley .pfn = __phys_to_pfn(DSP_MEM_2420_PHYS), 877adb9987SPaul Walmsley .length = DSP_MEM_2420_SIZE, 88c40fae95STony Lindgren .type = MT_DEVICE 89c40fae95STony Lindgren }, 90c40fae95STony Lindgren { 917adb9987SPaul Walmsley .virtual = DSP_IPI_2420_VIRT, 927adb9987SPaul Walmsley .pfn = __phys_to_pfn(DSP_IPI_2420_PHYS), 937adb9987SPaul Walmsley .length = DSP_IPI_2420_SIZE, 94c40fae95STony Lindgren .type = MT_DEVICE 95c40fae95STony Lindgren }, 96c40fae95STony Lindgren { 977adb9987SPaul Walmsley .virtual = DSP_MMU_2420_VIRT, 987adb9987SPaul Walmsley .pfn = __phys_to_pfn(DSP_MMU_2420_PHYS), 997adb9987SPaul Walmsley .length = DSP_MMU_2420_SIZE, 1001dbae815STony Lindgren .type = MT_DEVICE 101cc26b3b0SSyed Mohammed, Khasim }, 1021dbae815STony Lindgren }; 1031dbae815STony Lindgren 104cc26b3b0SSyed Mohammed, Khasim #endif 105cc26b3b0SSyed Mohammed, Khasim 10659b479e0STony Lindgren #ifdef CONFIG_SOC_OMAP2430 107cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap243x_io_desc[] __initdata = { 108cc26b3b0SSyed Mohammed, Khasim { 109cc26b3b0SSyed Mohammed, Khasim .virtual = L4_WK_243X_VIRT, 110cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(L4_WK_243X_PHYS), 111cc26b3b0SSyed Mohammed, Khasim .length = L4_WK_243X_SIZE, 112cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 113cc26b3b0SSyed Mohammed, Khasim }, 114cc26b3b0SSyed Mohammed, Khasim { 115cc26b3b0SSyed Mohammed, Khasim .virtual = OMAP243X_GPMC_VIRT, 116cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(OMAP243X_GPMC_PHYS), 117cc26b3b0SSyed Mohammed, Khasim .length = OMAP243X_GPMC_SIZE, 118cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 119cc26b3b0SSyed Mohammed, Khasim }, 120cc26b3b0SSyed Mohammed, Khasim { 121cc26b3b0SSyed Mohammed, Khasim .virtual = OMAP243X_SDRC_VIRT, 122cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(OMAP243X_SDRC_PHYS), 123cc26b3b0SSyed Mohammed, Khasim .length = OMAP243X_SDRC_SIZE, 124cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 125cc26b3b0SSyed Mohammed, Khasim }, 126cc26b3b0SSyed Mohammed, Khasim { 127cc26b3b0SSyed Mohammed, Khasim .virtual = OMAP243X_SMS_VIRT, 128cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(OMAP243X_SMS_PHYS), 129cc26b3b0SSyed Mohammed, Khasim .length = OMAP243X_SMS_SIZE, 130cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 131cc26b3b0SSyed Mohammed, Khasim }, 132cc26b3b0SSyed Mohammed, Khasim }; 133cc26b3b0SSyed Mohammed, Khasim #endif 134cc26b3b0SSyed Mohammed, Khasim #endif 135cc26b3b0SSyed Mohammed, Khasim 136a8eb7ca0STony Lindgren #ifdef CONFIG_ARCH_OMAP3 137cc26b3b0SSyed Mohammed, Khasim static struct map_desc omap34xx_io_desc[] __initdata = { 138cc26b3b0SSyed Mohammed, Khasim { 139cc26b3b0SSyed Mohammed, Khasim .virtual = L3_34XX_VIRT, 140cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(L3_34XX_PHYS), 141cc26b3b0SSyed Mohammed, Khasim .length = L3_34XX_SIZE, 142cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 143cc26b3b0SSyed Mohammed, Khasim }, 144cc26b3b0SSyed Mohammed, Khasim { 145cc26b3b0SSyed Mohammed, Khasim .virtual = L4_34XX_VIRT, 146cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(L4_34XX_PHYS), 147cc26b3b0SSyed Mohammed, Khasim .length = L4_34XX_SIZE, 148cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 149cc26b3b0SSyed Mohammed, Khasim }, 150cc26b3b0SSyed Mohammed, Khasim { 151cc26b3b0SSyed Mohammed, Khasim .virtual = OMAP34XX_GPMC_VIRT, 152cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(OMAP34XX_GPMC_PHYS), 153cc26b3b0SSyed Mohammed, Khasim .length = OMAP34XX_GPMC_SIZE, 154cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 155cc26b3b0SSyed Mohammed, Khasim }, 156cc26b3b0SSyed Mohammed, Khasim { 157cc26b3b0SSyed Mohammed, Khasim .virtual = OMAP343X_SMS_VIRT, 158cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(OMAP343X_SMS_PHYS), 159cc26b3b0SSyed Mohammed, Khasim .length = OMAP343X_SMS_SIZE, 160cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 161cc26b3b0SSyed Mohammed, Khasim }, 162cc26b3b0SSyed Mohammed, Khasim { 163cc26b3b0SSyed Mohammed, Khasim .virtual = OMAP343X_SDRC_VIRT, 164cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(OMAP343X_SDRC_PHYS), 165cc26b3b0SSyed Mohammed, Khasim .length = OMAP343X_SDRC_SIZE, 166cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 167cc26b3b0SSyed Mohammed, Khasim }, 168cc26b3b0SSyed Mohammed, Khasim { 169cc26b3b0SSyed Mohammed, Khasim .virtual = L4_PER_34XX_VIRT, 170cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(L4_PER_34XX_PHYS), 171cc26b3b0SSyed Mohammed, Khasim .length = L4_PER_34XX_SIZE, 172cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 173cc26b3b0SSyed Mohammed, Khasim }, 174cc26b3b0SSyed Mohammed, Khasim { 175cc26b3b0SSyed Mohammed, Khasim .virtual = L4_EMU_34XX_VIRT, 176cc26b3b0SSyed Mohammed, Khasim .pfn = __phys_to_pfn(L4_EMU_34XX_PHYS), 177cc26b3b0SSyed Mohammed, Khasim .length = L4_EMU_34XX_SIZE, 178cc26b3b0SSyed Mohammed, Khasim .type = MT_DEVICE 179cc26b3b0SSyed Mohammed, Khasim }, 180cc26b3b0SSyed Mohammed, Khasim }; 181cc26b3b0SSyed Mohammed, Khasim #endif 18201001712SHemant Pedanekar 18333959553SKevin Hilman #ifdef CONFIG_SOC_TI81XX 184a920360fSHemant Pedanekar static struct map_desc omapti81xx_io_desc[] __initdata = { 18501001712SHemant Pedanekar { 18601001712SHemant Pedanekar .virtual = L4_34XX_VIRT, 18701001712SHemant Pedanekar .pfn = __phys_to_pfn(L4_34XX_PHYS), 18801001712SHemant Pedanekar .length = L4_34XX_SIZE, 18901001712SHemant Pedanekar .type = MT_DEVICE 1901e6cb146SAfzal Mohammed } 1911e6cb146SAfzal Mohammed }; 1921e6cb146SAfzal Mohammed #endif 1931e6cb146SAfzal Mohammed 194addb154aSAfzal Mohammed #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX) 1951e6cb146SAfzal Mohammed static struct map_desc omapam33xx_io_desc[] __initdata = { 19601001712SHemant Pedanekar { 19701001712SHemant Pedanekar .virtual = L4_34XX_VIRT, 19801001712SHemant Pedanekar .pfn = __phys_to_pfn(L4_34XX_PHYS), 19901001712SHemant Pedanekar .length = L4_34XX_SIZE, 20001001712SHemant Pedanekar .type = MT_DEVICE 20101001712SHemant Pedanekar }, 2021e6cb146SAfzal Mohammed { 2031e6cb146SAfzal Mohammed .virtual = L4_WK_AM33XX_VIRT, 2041e6cb146SAfzal Mohammed .pfn = __phys_to_pfn(L4_WK_AM33XX_PHYS), 2051e6cb146SAfzal Mohammed .length = L4_WK_AM33XX_SIZE, 2061e6cb146SAfzal Mohammed .type = MT_DEVICE 2071e6cb146SAfzal Mohammed } 20801001712SHemant Pedanekar }; 20901001712SHemant Pedanekar #endif 21001001712SHemant Pedanekar 21144169075SSantosh Shilimkar #ifdef CONFIG_ARCH_OMAP4 21244169075SSantosh Shilimkar static struct map_desc omap44xx_io_desc[] __initdata = { 21344169075SSantosh Shilimkar { 21444169075SSantosh Shilimkar .virtual = L3_44XX_VIRT, 21544169075SSantosh Shilimkar .pfn = __phys_to_pfn(L3_44XX_PHYS), 21644169075SSantosh Shilimkar .length = L3_44XX_SIZE, 21744169075SSantosh Shilimkar .type = MT_DEVICE, 21844169075SSantosh Shilimkar }, 21944169075SSantosh Shilimkar { 22044169075SSantosh Shilimkar .virtual = L4_44XX_VIRT, 22144169075SSantosh Shilimkar .pfn = __phys_to_pfn(L4_44XX_PHYS), 22244169075SSantosh Shilimkar .length = L4_44XX_SIZE, 22344169075SSantosh Shilimkar .type = MT_DEVICE, 22444169075SSantosh Shilimkar }, 22544169075SSantosh Shilimkar { 22644169075SSantosh Shilimkar .virtual = L4_PER_44XX_VIRT, 22744169075SSantosh Shilimkar .pfn = __phys_to_pfn(L4_PER_44XX_PHYS), 22844169075SSantosh Shilimkar .length = L4_PER_44XX_SIZE, 22944169075SSantosh Shilimkar .type = MT_DEVICE, 23044169075SSantosh Shilimkar }, 23144169075SSantosh Shilimkar }; 23244169075SSantosh Shilimkar #endif 233cc26b3b0SSyed Mohammed, Khasim 234ea827ad5SNishanth Menon #ifdef CONFIG_SOC_OMAP5 23505e152c7SR Sricharan static struct map_desc omap54xx_io_desc[] __initdata = { 23605e152c7SR Sricharan { 23705e152c7SR Sricharan .virtual = L3_54XX_VIRT, 23805e152c7SR Sricharan .pfn = __phys_to_pfn(L3_54XX_PHYS), 23905e152c7SR Sricharan .length = L3_54XX_SIZE, 24005e152c7SR Sricharan .type = MT_DEVICE, 24105e152c7SR Sricharan }, 24205e152c7SR Sricharan { 24305e152c7SR Sricharan .virtual = L4_54XX_VIRT, 24405e152c7SR Sricharan .pfn = __phys_to_pfn(L4_54XX_PHYS), 24505e152c7SR Sricharan .length = L4_54XX_SIZE, 24605e152c7SR Sricharan .type = MT_DEVICE, 24705e152c7SR Sricharan }, 24805e152c7SR Sricharan { 24905e152c7SR Sricharan .virtual = L4_WK_54XX_VIRT, 25005e152c7SR Sricharan .pfn = __phys_to_pfn(L4_WK_54XX_PHYS), 25105e152c7SR Sricharan .length = L4_WK_54XX_SIZE, 25205e152c7SR Sricharan .type = MT_DEVICE, 25305e152c7SR Sricharan }, 25405e152c7SR Sricharan { 25505e152c7SR Sricharan .virtual = L4_PER_54XX_VIRT, 25605e152c7SR Sricharan .pfn = __phys_to_pfn(L4_PER_54XX_PHYS), 25705e152c7SR Sricharan .length = L4_PER_54XX_SIZE, 25805e152c7SR Sricharan .type = MT_DEVICE, 25905e152c7SR Sricharan }, 26005e152c7SR Sricharan }; 26105e152c7SR Sricharan #endif 26205e152c7SR Sricharan 263ea827ad5SNishanth Menon #ifdef CONFIG_SOC_DRA7XX 264ea827ad5SNishanth Menon static struct map_desc dra7xx_io_desc[] __initdata = { 265ea827ad5SNishanth Menon { 266ea827ad5SNishanth Menon .virtual = L4_CFG_MPU_DRA7XX_VIRT, 267ea827ad5SNishanth Menon .pfn = __phys_to_pfn(L4_CFG_MPU_DRA7XX_PHYS), 268ea827ad5SNishanth Menon .length = L4_CFG_MPU_DRA7XX_SIZE, 269ea827ad5SNishanth Menon .type = MT_DEVICE, 270ea827ad5SNishanth Menon }, 271ea827ad5SNishanth Menon { 272ea827ad5SNishanth Menon .virtual = L3_MAIN_SN_DRA7XX_VIRT, 273ea827ad5SNishanth Menon .pfn = __phys_to_pfn(L3_MAIN_SN_DRA7XX_PHYS), 274ea827ad5SNishanth Menon .length = L3_MAIN_SN_DRA7XX_SIZE, 275ea827ad5SNishanth Menon .type = MT_DEVICE, 276ea827ad5SNishanth Menon }, 277ea827ad5SNishanth Menon { 278ea827ad5SNishanth Menon .virtual = L4_PER1_DRA7XX_VIRT, 279ea827ad5SNishanth Menon .pfn = __phys_to_pfn(L4_PER1_DRA7XX_PHYS), 280ea827ad5SNishanth Menon .length = L4_PER1_DRA7XX_SIZE, 281ea827ad5SNishanth Menon .type = MT_DEVICE, 282ea827ad5SNishanth Menon }, 283ea827ad5SNishanth Menon { 284ea827ad5SNishanth Menon .virtual = L4_PER2_DRA7XX_VIRT, 285ea827ad5SNishanth Menon .pfn = __phys_to_pfn(L4_PER2_DRA7XX_PHYS), 286ea827ad5SNishanth Menon .length = L4_PER2_DRA7XX_SIZE, 287ea827ad5SNishanth Menon .type = MT_DEVICE, 288ea827ad5SNishanth Menon }, 289ea827ad5SNishanth Menon { 290ea827ad5SNishanth Menon .virtual = L4_PER3_DRA7XX_VIRT, 291ea827ad5SNishanth Menon .pfn = __phys_to_pfn(L4_PER3_DRA7XX_PHYS), 292ea827ad5SNishanth Menon .length = L4_PER3_DRA7XX_SIZE, 293ea827ad5SNishanth Menon .type = MT_DEVICE, 294ea827ad5SNishanth Menon }, 295ea827ad5SNishanth Menon { 296ea827ad5SNishanth Menon .virtual = L4_CFG_DRA7XX_VIRT, 297ea827ad5SNishanth Menon .pfn = __phys_to_pfn(L4_CFG_DRA7XX_PHYS), 298ea827ad5SNishanth Menon .length = L4_CFG_DRA7XX_SIZE, 299ea827ad5SNishanth Menon .type = MT_DEVICE, 300ea827ad5SNishanth Menon }, 301ea827ad5SNishanth Menon { 302ea827ad5SNishanth Menon .virtual = L4_WKUP_DRA7XX_VIRT, 303ea827ad5SNishanth Menon .pfn = __phys_to_pfn(L4_WKUP_DRA7XX_PHYS), 304ea827ad5SNishanth Menon .length = L4_WKUP_DRA7XX_SIZE, 305ea827ad5SNishanth Menon .type = MT_DEVICE, 306ea827ad5SNishanth Menon }, 307ea827ad5SNishanth Menon }; 308ea827ad5SNishanth Menon #endif 309ea827ad5SNishanth Menon 31059b479e0STony Lindgren #ifdef CONFIG_SOC_OMAP2420 311b6a4226cSPaul Walmsley void __init omap242x_map_io(void) 3126fbd55d0STony Lindgren { 3136fbd55d0STony Lindgren iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); 3146fbd55d0STony Lindgren iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc)); 3156fbd55d0STony Lindgren } 3166fbd55d0STony Lindgren #endif 3176fbd55d0STony Lindgren 31859b479e0STony Lindgren #ifdef CONFIG_SOC_OMAP2430 319b6a4226cSPaul Walmsley void __init omap243x_map_io(void) 3206fbd55d0STony Lindgren { 3216fbd55d0STony Lindgren iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); 3226fbd55d0STony Lindgren iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc)); 3236fbd55d0STony Lindgren } 3246fbd55d0STony Lindgren #endif 3256fbd55d0STony Lindgren 326a8eb7ca0STony Lindgren #ifdef CONFIG_ARCH_OMAP3 327b6a4226cSPaul Walmsley void __init omap3_map_io(void) 3286fbd55d0STony Lindgren { 3296fbd55d0STony Lindgren iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc)); 3306fbd55d0STony Lindgren } 3316fbd55d0STony Lindgren #endif 3326fbd55d0STony Lindgren 33333959553SKevin Hilman #ifdef CONFIG_SOC_TI81XX 334b6a4226cSPaul Walmsley void __init ti81xx_map_io(void) 33501001712SHemant Pedanekar { 336a920360fSHemant Pedanekar iotable_init(omapti81xx_io_desc, ARRAY_SIZE(omapti81xx_io_desc)); 33701001712SHemant Pedanekar } 33801001712SHemant Pedanekar #endif 33901001712SHemant Pedanekar 340addb154aSAfzal Mohammed #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX) 341b6a4226cSPaul Walmsley void __init am33xx_map_io(void) 3421e6cb146SAfzal Mohammed { 3431e6cb146SAfzal Mohammed iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc)); 3446fbd55d0STony Lindgren } 3456fbd55d0STony Lindgren #endif 3466fbd55d0STony Lindgren 3476fbd55d0STony Lindgren #ifdef CONFIG_ARCH_OMAP4 348b6a4226cSPaul Walmsley void __init omap4_map_io(void) 3496fbd55d0STony Lindgren { 3506fbd55d0STony Lindgren iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); 351f746929fSRussell King omap_barriers_init(); 3526fbd55d0STony Lindgren } 3536fbd55d0STony Lindgren #endif 3546fbd55d0STony Lindgren 355ea827ad5SNishanth Menon #ifdef CONFIG_SOC_OMAP5 356b6a4226cSPaul Walmsley void __init omap5_map_io(void) 35705e152c7SR Sricharan { 35805e152c7SR Sricharan iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc)); 359f746929fSRussell King omap_barriers_init(); 36005e152c7SR Sricharan } 36105e152c7SR Sricharan #endif 362ea827ad5SNishanth Menon 363ea827ad5SNishanth Menon #ifdef CONFIG_SOC_DRA7XX 364ea827ad5SNishanth Menon void __init dra7xx_map_io(void) 365ea827ad5SNishanth Menon { 366ea827ad5SNishanth Menon iotable_init(dra7xx_io_desc, ARRAY_SIZE(dra7xx_io_desc)); 367456e8d53SNishanth Menon omap_barriers_init(); 368ea827ad5SNishanth Menon } 369ea827ad5SNishanth Menon #endif 3702f135eafSPaul Walmsley /* 3712f135eafSPaul Walmsley * omap2_init_reprogram_sdrc - reprogram SDRC timing parameters 3722f135eafSPaul Walmsley * 3732f135eafSPaul Walmsley * Sets the CORE DPLL3 M2 divider to the same value that it's at 3742f135eafSPaul Walmsley * currently. This has the effect of setting the SDRC SDRAM AC timing 3752f135eafSPaul Walmsley * registers to the values currently defined by the kernel. Currently 3762f135eafSPaul Walmsley * only defined for OMAP3; will return 0 if called on OMAP2. Returns 3772f135eafSPaul Walmsley * -EINVAL if the dpll3_m2_ck cannot be found, 0 if called on OMAP2, 3782f135eafSPaul Walmsley * or passes along the return value of clk_set_rate(). 3792f135eafSPaul Walmsley */ 3802f135eafSPaul Walmsley static int __init _omap2_init_reprogram_sdrc(void) 3812f135eafSPaul Walmsley { 3822f135eafSPaul Walmsley struct clk *dpll3_m2_ck; 3832f135eafSPaul Walmsley int v = -EINVAL; 3842f135eafSPaul Walmsley long rate; 3852f135eafSPaul Walmsley 3862f135eafSPaul Walmsley if (!cpu_is_omap34xx()) 3872f135eafSPaul Walmsley return 0; 3882f135eafSPaul Walmsley 3892f135eafSPaul Walmsley dpll3_m2_ck = clk_get(NULL, "dpll3_m2_ck"); 390e281f7ecSAaro Koskinen if (IS_ERR(dpll3_m2_ck)) 3912f135eafSPaul Walmsley return -EINVAL; 3922f135eafSPaul Walmsley 3932f135eafSPaul Walmsley rate = clk_get_rate(dpll3_m2_ck); 3942f135eafSPaul Walmsley pr_info("Reprogramming SDRC clock to %ld Hz\n", rate); 3952f135eafSPaul Walmsley v = clk_set_rate(dpll3_m2_ck, rate); 3962f135eafSPaul Walmsley if (v) 3972f135eafSPaul Walmsley pr_err("dpll3_m2_clk rate change failed: %d\n", v); 3982f135eafSPaul Walmsley 3992f135eafSPaul Walmsley clk_put(dpll3_m2_ck); 4002f135eafSPaul Walmsley 4012f135eafSPaul Walmsley return v; 4022f135eafSPaul Walmsley } 4032f135eafSPaul Walmsley 4042092e5ccSPaul Walmsley static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data) 4052092e5ccSPaul Walmsley { 4062092e5ccSPaul Walmsley return omap_hwmod_set_postsetup_state(oh, *(u8 *)data); 4072092e5ccSPaul Walmsley } 4082092e5ccSPaul Walmsley 409293ea3d0SArnd Bergmann static void __init __maybe_unused omap_hwmod_init_postsetup(void) 410120db2cbSTony Lindgren { 4116d63b12dSTony Lindgren u8 postsetup_state = _HWMOD_STATE_DEFAULT; 4122092e5ccSPaul Walmsley 4132092e5ccSPaul Walmsley /* Set the default postsetup state for all hwmods */ 4142092e5ccSPaul Walmsley omap_hwmod_for_each(_set_hwmod_postsetup_state, &postsetup_state); 4154805734bSPaul Walmsley } 4164805734bSPaul Walmsley 41716110798SPaul Walmsley #ifdef CONFIG_SOC_OMAP2420 4188f5b5a41STony Lindgren void __init omap2420_init_early(void) 4198f5b5a41STony Lindgren { 420b6a4226cSPaul Walmsley omap2_set_globals_tap(OMAP242X_CLASS, OMAP2_L4_IO_ADDRESS(0x48014000)); 421b6a4226cSPaul Walmsley omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP2420_SDRC_BASE), 422b6a4226cSPaul Walmsley OMAP2_L3_IO_ADDRESS(OMAP2420_SMS_BASE)); 4232208bf11STero Kristo omap2_control_base_init(); 4244de34f35SVaibhav Hiremath omap2xxx_check_revision(); 425ab7b2ffcSTero Kristo omap2_prcm_base_init(); 4267b250affSTony Lindgren omap2xxx_voltagedomains_init(); 4277b250affSTony Lindgren omap242x_powerdomains_init(); 4287b250affSTony Lindgren omap242x_clockdomains_init(); 4297b250affSTony Lindgren omap2420_hwmod_init(); 4307b250affSTony Lindgren omap_hwmod_init_postsetup(); 43169a1e7a1STero Kristo omap_clk_soc_init = omap2420_dt_clk_init; 43269a1e7a1STero Kristo rate_table = omap2420_rate_table; 4338f5b5a41STony Lindgren } 434bbd707acSShawn Guo 435bbd707acSShawn Guo void __init omap2420_init_late(void) 436bbd707acSShawn Guo { 43702b83dcbSTony Lindgren omap_pm_soc_init = omap2_pm_init; 438bbd707acSShawn Guo } 43916110798SPaul Walmsley #endif 4408f5b5a41STony Lindgren 44116110798SPaul Walmsley #ifdef CONFIG_SOC_OMAP2430 4428f5b5a41STony Lindgren void __init omap2430_init_early(void) 4438f5b5a41STony Lindgren { 444b6a4226cSPaul Walmsley omap2_set_globals_tap(OMAP243X_CLASS, OMAP2_L4_IO_ADDRESS(0x4900a000)); 445b6a4226cSPaul Walmsley omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP243X_SDRC_BASE), 446b6a4226cSPaul Walmsley OMAP2_L3_IO_ADDRESS(OMAP243X_SMS_BASE)); 4472208bf11STero Kristo omap2_control_base_init(); 4484de34f35SVaibhav Hiremath omap2xxx_check_revision(); 449ab7b2ffcSTero Kristo omap2_prcm_base_init(); 4507b250affSTony Lindgren omap2xxx_voltagedomains_init(); 4517b250affSTony Lindgren omap243x_powerdomains_init(); 4527b250affSTony Lindgren omap243x_clockdomains_init(); 4537b250affSTony Lindgren omap2430_hwmod_init(); 4547b250affSTony Lindgren omap_hwmod_init_postsetup(); 45569a1e7a1STero Kristo omap_clk_soc_init = omap2430_dt_clk_init; 45669a1e7a1STero Kristo rate_table = omap2430_rate_table; 4577b250affSTony Lindgren } 458bbd707acSShawn Guo 459bbd707acSShawn Guo void __init omap2430_init_late(void) 460bbd707acSShawn Guo { 46102b83dcbSTony Lindgren omap_pm_soc_init = omap2_pm_init; 462bbd707acSShawn Guo } 463c4e2d245SSanjeev Premi #endif 4647b250affSTony Lindgren 4657b250affSTony Lindgren /* 4667b250affSTony Lindgren * Currently only board-omap3beagle.c should call this because of the 4677b250affSTony Lindgren * same machine_id for 34xx and 36xx beagle.. Will get fixed with DT. 4687b250affSTony Lindgren */ 469c4e2d245SSanjeev Premi #ifdef CONFIG_ARCH_OMAP3 4707b250affSTony Lindgren void __init omap3_init_early(void) 4717b250affSTony Lindgren { 472b6a4226cSPaul Walmsley omap2_set_globals_tap(OMAP343X_CLASS, OMAP2_L4_IO_ADDRESS(0x4830A000)); 473b6a4226cSPaul Walmsley omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE), 474b6a4226cSPaul Walmsley OMAP2_L3_IO_ADDRESS(OMAP343X_SMS_BASE)); 4752208bf11STero Kristo omap2_control_base_init(); 4764de34f35SVaibhav Hiremath omap3xxx_check_revision(); 4774de34f35SVaibhav Hiremath omap3xxx_check_features(); 478ab7b2ffcSTero Kristo omap2_prcm_base_init(); 4797b250affSTony Lindgren omap3xxx_voltagedomains_init(); 4807b250affSTony Lindgren omap3xxx_powerdomains_init(); 4817b250affSTony Lindgren omap3xxx_clockdomains_init(); 4827b250affSTony Lindgren omap3xxx_hwmod_init(); 4837b250affSTony Lindgren omap_hwmod_init_postsetup(); 4848f5b5a41STony Lindgren } 4858f5b5a41STony Lindgren 4868f5b5a41STony Lindgren void __init omap3430_init_early(void) 4878f5b5a41STony Lindgren { 4887b250affSTony Lindgren omap3_init_early(); 4893e049157STero Kristo omap_clk_soc_init = omap3430_dt_clk_init; 4908f5b5a41STony Lindgren } 4918f5b5a41STony Lindgren 4928f5b5a41STony Lindgren void __init omap35xx_init_early(void) 4938f5b5a41STony Lindgren { 4947b250affSTony Lindgren omap3_init_early(); 4953e049157STero Kristo omap_clk_soc_init = omap3430_dt_clk_init; 4968f5b5a41STony Lindgren } 4978f5b5a41STony Lindgren 4988f5b5a41STony Lindgren void __init omap3630_init_early(void) 4998f5b5a41STony Lindgren { 5007b250affSTony Lindgren omap3_init_early(); 5013e049157STero Kristo omap_clk_soc_init = omap3630_dt_clk_init; 5028f5b5a41STony Lindgren } 5038f5b5a41STony Lindgren 5048f5b5a41STony Lindgren void __init am35xx_init_early(void) 5058f5b5a41STony Lindgren { 5067b250affSTony Lindgren omap3_init_early(); 5073e049157STero Kristo omap_clk_soc_init = am35xx_dt_clk_init; 5088f5b5a41STony Lindgren } 5098f5b5a41STony Lindgren 510bbd707acSShawn Guo void __init omap3_init_late(void) 511bbd707acSShawn Guo { 51202b83dcbSTony Lindgren omap_pm_soc_init = omap3_pm_init; 513bbd707acSShawn Guo } 514bbd707acSShawn Guo 515bbd707acSShawn Guo void __init ti81xx_init_late(void) 516bbd707acSShawn Guo { 51702b83dcbSTony Lindgren omap_pm_soc_init = omap_pm_nop_init; 518bbd707acSShawn Guo } 519c4e2d245SSanjeev Premi #endif 5208f5b5a41STony Lindgren 521a64459c4SAida Mynzhasova #ifdef CONFIG_SOC_TI81XX 522a64459c4SAida Mynzhasova void __init ti814x_init_early(void) 523a64459c4SAida Mynzhasova { 524a64459c4SAida Mynzhasova omap2_set_globals_tap(TI814X_CLASS, 525a64459c4SAida Mynzhasova OMAP2_L4_IO_ADDRESS(TI81XX_TAP_BASE)); 5262208bf11STero Kristo omap2_control_base_init(); 527a64459c4SAida Mynzhasova omap3xxx_check_revision(); 528a64459c4SAida Mynzhasova ti81xx_check_features(); 529ab7b2ffcSTero Kristo omap2_prcm_base_init(); 530a64459c4SAida Mynzhasova omap3xxx_voltagedomains_init(); 531a64459c4SAida Mynzhasova omap3xxx_powerdomains_init(); 532185fde6dSTony Lindgren ti814x_clockdomains_init(); 5330f3ccb24STony Lindgren dm814x_hwmod_init(); 534a64459c4SAida Mynzhasova omap_hwmod_init_postsetup(); 5359cf705deSTony Lindgren omap_clk_soc_init = dm814x_dt_clk_init; 536a64459c4SAida Mynzhasova } 537a64459c4SAida Mynzhasova 538a64459c4SAida Mynzhasova void __init ti816x_init_early(void) 539a64459c4SAida Mynzhasova { 540a64459c4SAida Mynzhasova omap2_set_globals_tap(TI816X_CLASS, 541a64459c4SAida Mynzhasova OMAP2_L4_IO_ADDRESS(TI81XX_TAP_BASE)); 5422208bf11STero Kristo omap2_control_base_init(); 543a64459c4SAida Mynzhasova omap3xxx_check_revision(); 544a64459c4SAida Mynzhasova ti81xx_check_features(); 545ab7b2ffcSTero Kristo omap2_prcm_base_init(); 546a64459c4SAida Mynzhasova omap3xxx_voltagedomains_init(); 547a64459c4SAida Mynzhasova omap3xxx_powerdomains_init(); 548185fde6dSTony Lindgren ti816x_clockdomains_init(); 5490f3ccb24STony Lindgren dm816x_hwmod_init(); 550a64459c4SAida Mynzhasova omap_hwmod_init_postsetup(); 5519cf705deSTony Lindgren omap_clk_soc_init = dm816x_dt_clk_init; 552a64459c4SAida Mynzhasova } 553a64459c4SAida Mynzhasova #endif 554a64459c4SAida Mynzhasova 55508f30989SAfzal Mohammed #ifdef CONFIG_SOC_AM33XX 55608f30989SAfzal Mohammed void __init am33xx_init_early(void) 55708f30989SAfzal Mohammed { 558b6a4226cSPaul Walmsley omap2_set_globals_tap(AM335X_CLASS, 559b6a4226cSPaul Walmsley AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE)); 5602208bf11STero Kristo omap2_control_base_init(); 56108f30989SAfzal Mohammed omap3xxx_check_revision(); 5627bcad170SVaibhav Hiremath am33xx_check_features(); 563ab7b2ffcSTero Kristo omap2_prcm_base_init(); 5643f0ea764SVaibhav Hiremath am33xx_powerdomains_init(); 5659c80f3aaSVaibhav Hiremath am33xx_clockdomains_init(); 566a2cfc509SVaibhav Hiremath am33xx_hwmod_init(); 567a2cfc509SVaibhav Hiremath omap_hwmod_init_postsetup(); 568149c09d3STero Kristo omap_clk_soc_init = am33xx_dt_clk_init; 56908f30989SAfzal Mohammed } 570765e7a06SNishanth Menon 571765e7a06SNishanth Menon void __init am33xx_init_late(void) 572765e7a06SNishanth Menon { 57302b83dcbSTony Lindgren omap_pm_soc_init = amx3_common_pm_init; 574765e7a06SNishanth Menon } 57508f30989SAfzal Mohammed #endif 57608f30989SAfzal Mohammed 577c5107027SAfzal Mohammed #ifdef CONFIG_SOC_AM43XX 578c5107027SAfzal Mohammed void __init am43xx_init_early(void) 579c5107027SAfzal Mohammed { 580c5107027SAfzal Mohammed omap2_set_globals_tap(AM335X_CLASS, 581c5107027SAfzal Mohammed AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE)); 5822208bf11STero Kristo omap2_control_base_init(); 583c5107027SAfzal Mohammed omap3xxx_check_revision(); 5847a2e0513SAfzal Mohammed am33xx_check_features(); 585ab7b2ffcSTero Kristo omap2_prcm_base_init(); 5868835cf6eSAmbresh K am43xx_powerdomains_init(); 5878835cf6eSAmbresh K am43xx_clockdomains_init(); 5888835cf6eSAmbresh K am43xx_hwmod_init(); 5898835cf6eSAmbresh K omap_hwmod_init_postsetup(); 590d941f86fSSekhar Nori omap_l2_cache_init(); 591d22031e2STero Kristo omap_clk_soc_init = am43xx_dt_clk_init; 592c5107027SAfzal Mohammed } 593765e7a06SNishanth Menon 594765e7a06SNishanth Menon void __init am43xx_init_late(void) 595765e7a06SNishanth Menon { 59602b83dcbSTony Lindgren omap_pm_soc_init = amx3_common_pm_init; 597765e7a06SNishanth Menon } 598c5107027SAfzal Mohammed #endif 599c5107027SAfzal Mohammed 600c4e2d245SSanjeev Premi #ifdef CONFIG_ARCH_OMAP4 6018f5b5a41STony Lindgren void __init omap4430_init_early(void) 6028f5b5a41STony Lindgren { 603b6a4226cSPaul Walmsley omap2_set_globals_tap(OMAP443X_CLASS, 604b6a4226cSPaul Walmsley OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE)); 605d9a16f9aSPaul Walmsley omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE)); 606ca125b5eSTero Kristo omap2_control_base_init(); 6074de34f35SVaibhav Hiremath omap4xxx_check_revision(); 6084de34f35SVaibhav Hiremath omap4xxx_check_features(); 609ab7b2ffcSTero Kristo omap2_prcm_base_init(); 610f4b9f40aSTony Lindgren omap4_sar_ram_init(); 6110573b957STony Lindgren omap4_mpuss_early_init(); 612de70af49SNishanth Menon omap4_pm_init_early(); 6137b250affSTony Lindgren omap44xx_voltagedomains_init(); 6147b250affSTony Lindgren omap44xx_powerdomains_init(); 6157b250affSTony Lindgren omap44xx_clockdomains_init(); 6167b250affSTony Lindgren omap44xx_hwmod_init(); 6177b250affSTony Lindgren omap_hwmod_init_postsetup(); 618b39b14e6SSekhar Nori omap_l2_cache_init(); 619c8c88d85STero Kristo omap_clk_soc_init = omap4xxx_dt_clk_init; 6208f5b5a41STony Lindgren } 621bbd707acSShawn Guo 622bbd707acSShawn Guo void __init omap4430_init_late(void) 623bbd707acSShawn Guo { 62402b83dcbSTony Lindgren omap_pm_soc_init = omap4_pm_init; 625bbd707acSShawn Guo } 626c4e2d245SSanjeev Premi #endif 6278f5b5a41STony Lindgren 62805e152c7SR Sricharan #ifdef CONFIG_SOC_OMAP5 62905e152c7SR Sricharan void __init omap5_init_early(void) 63005e152c7SR Sricharan { 631b6a4226cSPaul Walmsley omap2_set_globals_tap(OMAP54XX_CLASS, 632b6a4226cSPaul Walmsley OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE)); 633d9a16f9aSPaul Walmsley omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); 634ca125b5eSTero Kristo omap2_control_base_init(); 635ab7b2ffcSTero Kristo omap2_prcm_base_init(); 63605e152c7SR Sricharan omap5xxx_check_revision(); 637f4b9f40aSTony Lindgren omap4_sar_ram_init(); 6388a8be46aSTony Lindgren omap4_mpuss_early_init(); 6398a8be46aSTony Lindgren omap4_pm_init_early(); 640e4020aa9SSantosh Shilimkar omap54xx_voltagedomains_init(); 641e4020aa9SSantosh Shilimkar omap54xx_powerdomains_init(); 642e4020aa9SSantosh Shilimkar omap54xx_clockdomains_init(); 643e4020aa9SSantosh Shilimkar omap54xx_hwmod_init(); 644e4020aa9SSantosh Shilimkar omap_hwmod_init_postsetup(); 645cfa9667dSTero Kristo omap_clk_soc_init = omap5xxx_dt_clk_init; 64605e152c7SR Sricharan } 647765e7a06SNishanth Menon 648765e7a06SNishanth Menon void __init omap5_init_late(void) 649765e7a06SNishanth Menon { 65002b83dcbSTony Lindgren omap_pm_soc_init = omap4_pm_init; 651765e7a06SNishanth Menon } 65205e152c7SR Sricharan #endif 65305e152c7SR Sricharan 654a3a9384aSR Sricharan #ifdef CONFIG_SOC_DRA7XX 655a3a9384aSR Sricharan void __init dra7xx_init_early(void) 656a3a9384aSR Sricharan { 657ec490f6fSNishanth Menon omap2_set_globals_tap(DRA7XX_CLASS, 658ec490f6fSNishanth Menon OMAP2_L4_IO_ADDRESS(DRA7XX_TAP_BASE)); 659a3a9384aSR Sricharan omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); 660ca125b5eSTero Kristo omap2_control_base_init(); 6616af16a1dSRajendra Nayak omap4_pm_init_early(); 662ab7b2ffcSTero Kristo omap2_prcm_base_init(); 663733d20eeSNishanth Menon dra7xxx_check_revision(); 6647de516a6SAmbresh K dra7xx_powerdomains_init(); 6657de516a6SAmbresh K dra7xx_clockdomains_init(); 6667de516a6SAmbresh K dra7xx_hwmod_init(); 6677de516a6SAmbresh K omap_hwmod_init_postsetup(); 668f1cf498eSTero Kristo omap_clk_soc_init = dra7xx_dt_clk_init; 669a3a9384aSR Sricharan } 670765e7a06SNishanth Menon 671765e7a06SNishanth Menon void __init dra7xx_init_late(void) 672765e7a06SNishanth Menon { 67302b83dcbSTony Lindgren omap_pm_soc_init = omap4_pm_init; 674765e7a06SNishanth Menon } 675a3a9384aSR Sricharan #endif 676a3a9384aSR Sricharan 677a3a9384aSR Sricharan 678a4ca9dbeSTony Lindgren void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, 6794805734bSPaul Walmsley struct omap_sdrc_params *sdrc_cs1) 6804805734bSPaul Walmsley { 681a66cb345STony Lindgren omap_sram_init(); 682a66cb345STony Lindgren 68301001712SHemant Pedanekar if (cpu_is_omap24xx() || omap3_has_sdrc()) { 68458cda884SJean Pihet omap2_sdrc_init(sdrc_cs0, sdrc_cs1); 6852f135eafSPaul Walmsley _omap2_init_reprogram_sdrc(); 686aa4b1f6eSKevin Hilman } 6871dbae815STony Lindgren } 688cfa9667dSTero Kristo 689cfa9667dSTero Kristo int __init omap_clk_init(void) 690cfa9667dSTero Kristo { 691cfa9667dSTero Kristo int ret = 0; 692cfa9667dSTero Kristo 693cfa9667dSTero Kristo if (!omap_clk_soc_init) 694cfa9667dSTero Kristo return 0; 695cfa9667dSTero Kristo 6968111e010STero Kristo ti_clk_init_features(); 6978111e010STero Kristo 698e9e63088STero Kristo omap2_clk_setup_ll_ops(); 699e9e63088STero Kristo 700fe87414fSTero Kristo ret = omap_control_init(); 701fe87414fSTero Kristo if (ret) 702fe87414fSTero Kristo return ret; 703fe87414fSTero Kristo 7043a1a388eSTero Kristo ret = omap_prcm_init(); 705c08ee14cSTero Kristo if (ret) 706c08ee14cSTero Kristo return ret; 707c08ee14cSTero Kristo 708c08ee14cSTero Kristo of_clk_init(NULL); 709c08ee14cSTero Kristo 710c08ee14cSTero Kristo ti_dt_clk_init_retry_clks(); 711c08ee14cSTero Kristo 712c08ee14cSTero Kristo ti_dt_clockdomains_setup(); 713c08ee14cSTero Kristo 714cfa9667dSTero Kristo ret = omap_clk_soc_init(); 715cfa9667dSTero Kristo 716cfa9667dSTero Kristo return ret; 717cfa9667dSTero Kristo } 718