~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-omap2/voltagedomains44xx_data.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-only
  2 /*
  3  * OMAP3/OMAP4 Voltage Management Routines
  4  *
  5  * Author: Thara Gopinath       <thara@ti.com>
  6  *
  7  * Copyright (C) 2007 Texas Instruments, Inc.
  8  * Rajendra Nayak <rnayak@ti.com>
  9  * Lesly A M <x0080970@ti.com>
 10  *
 11  * Copyright (C) 2008 Nokia Corporation
 12  * Kalle Jokiniemi
 13  *
 14  * Copyright (C) 2010 Texas Instruments, Inc.
 15  * Thara Gopinath <thara@ti.com>
 16  */
 17 #include <linux/kernel.h>
 18 #include <linux/err.h>
 19 #include <linux/init.h>
 20 
 21 #include "common.h"
 22 #include "soc.h"
 23 #include "prm-regbits-44xx.h"
 24 #include "prm44xx.h"
 25 #include "prcm44xx.h"
 26 #include "prminst44xx.h"
 27 #include "voltage.h"
 28 #include "omap_opp_data.h"
 29 #include "vc.h"
 30 #include "vp.h"
 31 
 32 static const struct omap_vfsm_instance omap4_vdd_mpu_vfsm = {
 33         .voltsetup_reg = OMAP4_PRM_VOLTSETUP_MPU_RET_SLEEP_OFFSET,
 34         .voltsetup_off_reg = OMAP4_PRM_VOLTSETUP_MPU_OFF_OFFSET,
 35 };
 36 
 37 static const struct omap_vfsm_instance omap4_vdd_iva_vfsm = {
 38         .voltsetup_reg = OMAP4_PRM_VOLTSETUP_IVA_RET_SLEEP_OFFSET,
 39         .voltsetup_off_reg = OMAP4_PRM_VOLTSETUP_IVA_OFF_OFFSET,
 40 };
 41 
 42 static const struct omap_vfsm_instance omap4_vdd_core_vfsm = {
 43         .voltsetup_reg = OMAP4_PRM_VOLTSETUP_CORE_RET_SLEEP_OFFSET,
 44         .voltsetup_off_reg = OMAP4_PRM_VOLTSETUP_CORE_OFF_OFFSET,
 45 };
 46 
 47 static struct voltagedomain omap4_voltdm_mpu = {
 48         .name = "mpu",
 49         .scalable = true,
 50         .read = omap4_prm_vcvp_read,
 51         .write = omap4_prm_vcvp_write,
 52         .rmw = omap4_prm_vcvp_rmw,
 53         .vc = &omap4_vc_mpu,
 54         .vfsm = &omap4_vdd_mpu_vfsm,
 55         .vp = &omap4_vp_mpu,
 56 };
 57 
 58 static struct voltagedomain omap4_voltdm_iva = {
 59         .name = "iva",
 60         .scalable = true,
 61         .read = omap4_prm_vcvp_read,
 62         .write = omap4_prm_vcvp_write,
 63         .rmw = omap4_prm_vcvp_rmw,
 64         .vc = &omap4_vc_iva,
 65         .vfsm = &omap4_vdd_iva_vfsm,
 66         .vp = &omap4_vp_iva,
 67 };
 68 
 69 static struct voltagedomain omap4_voltdm_core = {
 70         .name = "core",
 71         .scalable = true,
 72         .read = omap4_prm_vcvp_read,
 73         .write = omap4_prm_vcvp_write,
 74         .rmw = omap4_prm_vcvp_rmw,
 75         .vc = &omap4_vc_core,
 76         .vfsm = &omap4_vdd_core_vfsm,
 77         .vp = &omap4_vp_core,
 78 };
 79 
 80 static struct voltagedomain omap4_voltdm_wkup = {
 81         .name = "wakeup",
 82 };
 83 
 84 static struct voltagedomain *voltagedomains_omap4[] __initdata = {
 85         &omap4_voltdm_mpu,
 86         &omap4_voltdm_iva,
 87         &omap4_voltdm_core,
 88         &omap4_voltdm_wkup,
 89         NULL,
 90 };
 91 
 92 static const char *const sys_clk_name __initconst = "sys_clkin_ck";
 93 
 94 void __init omap44xx_voltagedomains_init(void)
 95 {
 96         struct voltagedomain *voltdm;
 97         int i;
 98 
 99         /*
100          * XXX Will depend on the process, validation, and binning
101          * for the currently-running IC
102          */
103 #ifdef CONFIG_PM_OPP
104         if (cpu_is_omap443x()) {
105                 omap4_voltdm_mpu.volt_data = omap443x_vdd_mpu_volt_data;
106                 omap4_voltdm_iva.volt_data = omap443x_vdd_iva_volt_data;
107                 omap4_voltdm_core.volt_data = omap443x_vdd_core_volt_data;
108         } else if (cpu_is_omap446x()) {
109                 omap4_voltdm_mpu.volt_data = omap446x_vdd_mpu_volt_data;
110                 omap4_voltdm_iva.volt_data = omap446x_vdd_iva_volt_data;
111                 omap4_voltdm_core.volt_data = omap446x_vdd_core_volt_data;
112         }
113 #endif
114 
115         omap4_voltdm_mpu.vp_param = &omap4_mpu_vp_data;
116         omap4_voltdm_iva.vp_param = &omap4_iva_vp_data;
117         omap4_voltdm_core.vp_param = &omap4_core_vp_data;
118 
119         omap4_voltdm_mpu.vc_param = &omap4_mpu_vc_data;
120         omap4_voltdm_iva.vc_param = &omap4_iva_vc_data;
121         omap4_voltdm_core.vc_param = &omap4_core_vc_data;
122 
123         for (i = 0; voltdm = voltagedomains_omap4[i], voltdm; i++)
124                 voltdm->sys_clk.name = sys_clk_name;
125 
126         voltdm_init(voltagedomains_omap4);
127 };
128 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php