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

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

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ 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  * AM43xx Power domains framework
  4  *
  5  * Copyright (C) 2013 Texas Instruments, Inc.
  6  */
  7 
  8 #include <linux/kernel.h>
  9 #include <linux/init.h>
 10 
 11 #include "powerdomain.h"
 12 
 13 #include "prcm-common.h"
 14 #include "prcm44xx.h"
 15 #include "prcm43xx.h"
 16 
 17 static struct powerdomain gfx_43xx_pwrdm = {
 18         .name             = "gfx_pwrdm",
 19         .voltdm           = { .name = "core" },
 20         .prcm_offs        = AM43XX_PRM_GFX_INST,
 21         .prcm_partition   = AM43XX_PRM_PARTITION,
 22         .pwrsts           = PWRSTS_OFF_ON,
 23         .banks            = 1,
 24         .pwrsts_mem_on  = {
 25                 [0] = PWRSTS_ON,        /* gfx_mem */
 26         },
 27         .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
 28 };
 29 
 30 static struct powerdomain mpu_43xx_pwrdm = {
 31         .name             = "mpu_pwrdm",
 32         .voltdm           = { .name = "mpu" },
 33         .prcm_offs        = AM43XX_PRM_MPU_INST,
 34         .prcm_partition   = AM43XX_PRM_PARTITION,
 35         .pwrsts           = PWRSTS_OFF_RET_ON,
 36         .pwrsts_logic_ret = PWRSTS_OFF_RET,
 37         .banks            = 3,
 38         .pwrsts_mem_ret = {
 39                 [0] = PWRSTS_OFF_RET,   /* mpu_l1 */
 40                 [1] = PWRSTS_OFF_RET,   /* mpu_l2 */
 41                 [2] = PWRSTS_OFF_RET,   /* mpu_ram */
 42         },
 43         .pwrsts_mem_on  = {
 44                 [0] = PWRSTS_ON,        /* mpu_l1 */
 45                 [1] = PWRSTS_ON,        /* mpu_l2 */
 46                 [2] = PWRSTS_ON,        /* mpu_ram */
 47         },
 48         .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
 49 };
 50 
 51 static struct powerdomain rtc_43xx_pwrdm = {
 52         .name             = "rtc_pwrdm",
 53         .voltdm           = { .name = "rtc" },
 54         .prcm_offs        = AM43XX_PRM_RTC_INST,
 55         .prcm_partition   = AM43XX_PRM_PARTITION,
 56         .pwrsts           = PWRSTS_ON,
 57 };
 58 
 59 static struct powerdomain wkup_43xx_pwrdm = {
 60         .name             = "wkup_pwrdm",
 61         .voltdm           = { .name = "core" },
 62         .prcm_offs        = AM43XX_PRM_WKUP_INST,
 63         .prcm_partition   = AM43XX_PRM_PARTITION,
 64         .pwrsts           = PWRSTS_ON,
 65         .banks            = 1,
 66         .pwrsts_mem_on  = {
 67                 [0] = PWRSTS_ON,        /* debugss_mem */
 68         },
 69 };
 70 
 71 static struct powerdomain tamper_43xx_pwrdm = {
 72         .name             = "tamper_pwrdm",
 73         .voltdm           = { .name = "tamper" },
 74         .prcm_offs        = AM43XX_PRM_TAMPER_INST,
 75         .prcm_partition   = AM43XX_PRM_PARTITION,
 76         .pwrsts           = PWRSTS_ON,
 77 };
 78 
 79 static struct powerdomain cefuse_43xx_pwrdm = {
 80         .name             = "cefuse_pwrdm",
 81         .voltdm           = { .name = "core" },
 82         .prcm_offs        = AM43XX_PRM_CEFUSE_INST,
 83         .prcm_partition   = AM43XX_PRM_PARTITION,
 84         .pwrsts           = PWRSTS_OFF_ON,
 85         .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
 86 };
 87 
 88 static struct powerdomain per_43xx_pwrdm = {
 89         .name             = "per_pwrdm",
 90         .voltdm           = { .name = "core" },
 91         .prcm_offs        = AM43XX_PRM_PER_INST,
 92         .prcm_partition   = AM43XX_PRM_PARTITION,
 93         .pwrsts           = PWRSTS_OFF_RET_ON,
 94         .pwrsts_logic_ret = PWRSTS_OFF_RET,
 95         .banks            = 4,
 96         .pwrsts_mem_ret = {
 97                 [0] = PWRSTS_OFF_RET,   /* icss_mem */
 98                 [1] = PWRSTS_OFF_RET,   /* per_mem */
 99                 [2] = PWRSTS_OFF_RET,   /* ram1_mem */
100                 [3] = PWRSTS_OFF_RET,   /* ram2_mem */
101         },
102         .pwrsts_mem_on  = {
103                 [0] = PWRSTS_ON,        /* icss_mem */
104                 [1] = PWRSTS_ON,        /* per_mem */
105                 [2] = PWRSTS_ON,        /* ram1_mem */
106                 [3] = PWRSTS_ON,        /* ram2_mem */
107         },
108         .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
109 };
110 
111 static struct powerdomain *powerdomains_am43xx[] __initdata = {
112         &gfx_43xx_pwrdm,
113         &mpu_43xx_pwrdm,
114         &rtc_43xx_pwrdm,
115         &wkup_43xx_pwrdm,
116         &tamper_43xx_pwrdm,
117         &cefuse_43xx_pwrdm,
118         &per_43xx_pwrdm,
119         NULL
120 };
121 
122 static int am43xx_check_vcvp(void)
123 {
124         return 0;
125 }
126 
127 void __init am43xx_powerdomains_init(void)
128 {
129         omap4_pwrdm_operations.pwrdm_has_voltdm = am43xx_check_vcvp;
130         pwrdm_register_platform_funcs(&omap4_pwrdm_operations);
131         pwrdm_register_pwrdms(powerdomains_am43xx);
132         pwrdm_complete_init();
133 }
134 

~ [ 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