Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/rcpm: add RCPM driver

There is a RCPM (Run Control/Power Management) in Freescale QorIQ
series processors. The device performs tasks associated with device
run control and power management.

The driver implements some features: mask/unmask irq, enter/exit low
power states, freeze time base, etc.

Signed-off-by: Chenhui Zhao <chenhui.zhao@freescale.com>
Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
[scottwood: remove __KERNEL__ ifdef]
Signed-off-by: Scott Wood <oss@buserror.net>

authored by

chenhui zhao and committed by
Scott Wood
d17799f9 e7affb1d

+571
+1
arch/powerpc/include/asm/cputhreads.h
··· 103 103 return 1; 104 104 } 105 105 106 + void book3e_stop_thread(int thread); 106 107 107 108 #endif /* _ASM_POWERPC_CPUTHREADS_H */ 108 109
+51
arch/powerpc/include/asm/fsl_pm.h
··· 1 + /* 2 + * Support Power Management 3 + * 4 + * Copyright 2014-2015 Freescale Semiconductor Inc. 5 + * 6 + * This program is free software; you can redistribute it and/or modify it 7 + * under the terms of the GNU General Public License as published by the 8 + * Free Software Foundation; either version 2 of the License, or (at your 9 + * option) any later version. 10 + */ 11 + #ifndef __PPC_FSL_PM_H 12 + #define __PPC_FSL_PM_H 13 + 14 + #define E500_PM_PH10 1 15 + #define E500_PM_PH15 2 16 + #define E500_PM_PH20 3 17 + #define E500_PM_PH30 4 18 + #define E500_PM_DOZE E500_PM_PH10 19 + #define E500_PM_NAP E500_PM_PH15 20 + 21 + #define PLAT_PM_SLEEP 20 22 + #define PLAT_PM_LPM20 30 23 + 24 + #define FSL_PM_SLEEP (1 << 0) 25 + #define FSL_PM_DEEP_SLEEP (1 << 1) 26 + 27 + struct fsl_pm_ops { 28 + /* mask pending interrupts to the RCPM from MPIC */ 29 + void (*irq_mask)(int cpu); 30 + 31 + /* unmask pending interrupts to the RCPM from MPIC */ 32 + void (*irq_unmask)(int cpu); 33 + void (*cpu_enter_state)(int cpu, int state); 34 + void (*cpu_exit_state)(int cpu, int state); 35 + void (*cpu_up_prepare)(int cpu); 36 + void (*cpu_die)(int cpu); 37 + int (*plat_enter_sleep)(void); 38 + void (*freeze_time_base)(bool freeze); 39 + 40 + /* keep the power of IP blocks during sleep/deep sleep */ 41 + void (*set_ip_power)(bool enable, u32 mask); 42 + 43 + /* get platform supported power management modes */ 44 + unsigned int (*get_pm_modes)(void); 45 + }; 46 + 47 + extern const struct fsl_pm_ops *qoriq_pm_ops; 48 + 49 + int __init fsl_rcpm_init(void); 50 + 51 + #endif /* __PPC_FSL_PM_H */
+19
arch/powerpc/kernel/head_64.S
··· 181 181 #endif 182 182 183 183 #ifdef CONFIG_PPC_BOOK3E 184 + /* 185 + * stop a thread in the same core 186 + * input parameter: 187 + * r3 = the thread physical id 188 + */ 189 + _GLOBAL(book3e_stop_thread) 190 + cmpi 0, r3, 0 191 + beq 10f 192 + cmpi 0, r3, 1 193 + beq 10f 194 + /* If the thread id is invalid, just exit. */ 195 + b 13f 196 + 10: 197 + li r4, 1 198 + sld r4, r4, r3 199 + mtspr SPRN_TENC, r4 200 + 13: 201 + blr 202 + 184 203 _GLOBAL(fsl_secondary_thread_init) 185 204 mfspr r4,SPRN_BUCSR 186 205
+1
arch/powerpc/platforms/85xx/Kconfig
··· 8 8 select FSL_PCI if PCI 9 9 select SERIAL_8250_EXTENDED if SERIAL_8250 10 10 select SERIAL_8250_SHARE_IRQ if SERIAL_8250 11 + select FSL_CORENET_RCPM if PPC_E500MC 11 12 default y 12 13 13 14 if FSL_SOC_BOOKE
+3
arch/powerpc/platforms/85xx/common.c
··· 9 9 #include <linux/of_irq.h> 10 10 #include <linux/of_platform.h> 11 11 12 + #include <asm/fsl_pm.h> 12 13 #include <soc/fsl/qe/qe.h> 13 14 #include <sysdev/cpm2_pic.h> 14 15 15 16 #include "mpc85xx.h" 17 + 18 + const struct fsl_pm_ops *qoriq_pm_ops; 16 19 17 20 static const struct of_device_id mpc85xx_common_ids[] __initconst = { 18 21 { .type = "soc", },
+5
arch/powerpc/sysdev/Kconfig
··· 40 40 config GE_FPGA 41 41 bool 42 42 default n 43 + 44 + config FSL_CORENET_RCPM 45 + bool 46 + help 47 + This option enables support for RCPM (Run Control/Power Management).
+1
arch/powerpc/sysdev/Makefile
··· 20 20 obj-$(CONFIG_FSL_SOC) += fsl_soc.o fsl_mpic_err.o 21 21 obj-$(CONFIG_FSL_PCI) += fsl_pci.o $(fsl-msi-obj-y) 22 22 obj-$(CONFIG_FSL_PMC) += fsl_pmc.o 23 + obj-$(CONFIG_FSL_CORENET_RCPM) += fsl_rcpm.o 23 24 obj-$(CONFIG_FSL_LBC) += fsl_lbc.o 24 25 obj-$(CONFIG_FSL_GTM) += fsl_gtm.o 25 26 obj-$(CONFIG_FSL_85XX_CACHE_SRAM) += fsl_85xx_l2ctlr.o fsl_85xx_cache_sram.o
+385
arch/powerpc/sysdev/fsl_rcpm.c
··· 1 + /* 2 + * RCPM(Run Control/Power Management) support 3 + * 4 + * Copyright 2012-2015 Freescale Semiconductor Inc. 5 + * 6 + * Author: Chenhui Zhao <chenhui.zhao@freescale.com> 7 + * 8 + * This program is free software; you can redistribute it and/or modify it 9 + * under the terms of the GNU General Public License as published by the 10 + * Free Software Foundation; either version 2 of the License, or (at your 11 + * option) any later version. 12 + */ 13 + 14 + #define pr_fmt(fmt) "%s: " fmt, __func__ 15 + 16 + #include <linux/types.h> 17 + #include <linux/errno.h> 18 + #include <linux/of_address.h> 19 + #include <linux/export.h> 20 + 21 + #include <asm/io.h> 22 + #include <linux/fsl/guts.h> 23 + #include <asm/cputhreads.h> 24 + #include <asm/fsl_pm.h> 25 + 26 + static struct ccsr_rcpm_v1 __iomem *rcpm_v1_regs; 27 + static struct ccsr_rcpm_v2 __iomem *rcpm_v2_regs; 28 + static unsigned int fsl_supported_pm_modes; 29 + 30 + static void rcpm_v1_irq_mask(int cpu) 31 + { 32 + int hw_cpu = get_hard_smp_processor_id(cpu); 33 + unsigned int mask = 1 << hw_cpu; 34 + 35 + setbits32(&rcpm_v1_regs->cpmimr, mask); 36 + setbits32(&rcpm_v1_regs->cpmcimr, mask); 37 + setbits32(&rcpm_v1_regs->cpmmcmr, mask); 38 + setbits32(&rcpm_v1_regs->cpmnmimr, mask); 39 + } 40 + 41 + static void rcpm_v2_irq_mask(int cpu) 42 + { 43 + int hw_cpu = get_hard_smp_processor_id(cpu); 44 + unsigned int mask = 1 << hw_cpu; 45 + 46 + setbits32(&rcpm_v2_regs->tpmimr0, mask); 47 + setbits32(&rcpm_v2_regs->tpmcimr0, mask); 48 + setbits32(&rcpm_v2_regs->tpmmcmr0, mask); 49 + setbits32(&rcpm_v2_regs->tpmnmimr0, mask); 50 + } 51 + 52 + static void rcpm_v1_irq_unmask(int cpu) 53 + { 54 + int hw_cpu = get_hard_smp_processor_id(cpu); 55 + unsigned int mask = 1 << hw_cpu; 56 + 57 + clrbits32(&rcpm_v1_regs->cpmimr, mask); 58 + clrbits32(&rcpm_v1_regs->cpmcimr, mask); 59 + clrbits32(&rcpm_v1_regs->cpmmcmr, mask); 60 + clrbits32(&rcpm_v1_regs->cpmnmimr, mask); 61 + } 62 + 63 + static void rcpm_v2_irq_unmask(int cpu) 64 + { 65 + int hw_cpu = get_hard_smp_processor_id(cpu); 66 + unsigned int mask = 1 << hw_cpu; 67 + 68 + clrbits32(&rcpm_v2_regs->tpmimr0, mask); 69 + clrbits32(&rcpm_v2_regs->tpmcimr0, mask); 70 + clrbits32(&rcpm_v2_regs->tpmmcmr0, mask); 71 + clrbits32(&rcpm_v2_regs->tpmnmimr0, mask); 72 + } 73 + 74 + static void rcpm_v1_set_ip_power(bool enable, u32 mask) 75 + { 76 + if (enable) 77 + setbits32(&rcpm_v1_regs->ippdexpcr, mask); 78 + else 79 + clrbits32(&rcpm_v1_regs->ippdexpcr, mask); 80 + } 81 + 82 + static void rcpm_v2_set_ip_power(bool enable, u32 mask) 83 + { 84 + if (enable) 85 + setbits32(&rcpm_v2_regs->ippdexpcr[0], mask); 86 + else 87 + clrbits32(&rcpm_v2_regs->ippdexpcr[0], mask); 88 + } 89 + 90 + static void rcpm_v1_cpu_enter_state(int cpu, int state) 91 + { 92 + int hw_cpu = get_hard_smp_processor_id(cpu); 93 + unsigned int mask = 1 << hw_cpu; 94 + 95 + switch (state) { 96 + case E500_PM_PH10: 97 + setbits32(&rcpm_v1_regs->cdozcr, mask); 98 + break; 99 + case E500_PM_PH15: 100 + setbits32(&rcpm_v1_regs->cnapcr, mask); 101 + break; 102 + default: 103 + pr_warn("Unknown cpu PM state (%d)\n", state); 104 + break; 105 + } 106 + } 107 + 108 + static void rcpm_v2_cpu_enter_state(int cpu, int state) 109 + { 110 + int hw_cpu = get_hard_smp_processor_id(cpu); 111 + u32 mask = 1 << cpu_core_index_of_thread(cpu); 112 + 113 + switch (state) { 114 + case E500_PM_PH10: 115 + /* one bit corresponds to one thread for PH10 of 6500 */ 116 + setbits32(&rcpm_v2_regs->tph10setr0, 1 << hw_cpu); 117 + break; 118 + case E500_PM_PH15: 119 + setbits32(&rcpm_v2_regs->pcph15setr, mask); 120 + break; 121 + case E500_PM_PH20: 122 + setbits32(&rcpm_v2_regs->pcph20setr, mask); 123 + break; 124 + case E500_PM_PH30: 125 + setbits32(&rcpm_v2_regs->pcph30setr, mask); 126 + break; 127 + default: 128 + pr_warn("Unknown cpu PM state (%d)\n", state); 129 + } 130 + } 131 + 132 + static void rcpm_v1_cpu_die(int cpu) 133 + { 134 + rcpm_v1_cpu_enter_state(cpu, E500_PM_PH15); 135 + } 136 + 137 + #ifdef CONFIG_PPC64 138 + static void qoriq_disable_thread(int cpu) 139 + { 140 + int thread = cpu_thread_in_core(cpu); 141 + 142 + book3e_stop_thread(thread); 143 + } 144 + #endif 145 + 146 + static void rcpm_v2_cpu_die(int cpu) 147 + { 148 + #ifdef CONFIG_PPC64 149 + int primary; 150 + 151 + if (threads_per_core == 2) { 152 + primary = cpu_first_thread_sibling(cpu); 153 + if (cpu_is_offline(primary) && cpu_is_offline(primary + 1)) { 154 + /* if both threads are offline, put the cpu in PH20 */ 155 + rcpm_v2_cpu_enter_state(cpu, E500_PM_PH20); 156 + } else { 157 + /* if only one thread is offline, disable the thread */ 158 + qoriq_disable_thread(cpu); 159 + } 160 + } 161 + #endif 162 + 163 + if (threads_per_core == 1) 164 + rcpm_v2_cpu_enter_state(cpu, E500_PM_PH20); 165 + } 166 + 167 + static void rcpm_v1_cpu_exit_state(int cpu, int state) 168 + { 169 + int hw_cpu = get_hard_smp_processor_id(cpu); 170 + unsigned int mask = 1 << hw_cpu; 171 + 172 + switch (state) { 173 + case E500_PM_PH10: 174 + clrbits32(&rcpm_v1_regs->cdozcr, mask); 175 + break; 176 + case E500_PM_PH15: 177 + clrbits32(&rcpm_v1_regs->cnapcr, mask); 178 + break; 179 + default: 180 + pr_warn("Unknown cpu PM state (%d)\n", state); 181 + break; 182 + } 183 + } 184 + 185 + static void rcpm_v1_cpu_up_prepare(int cpu) 186 + { 187 + rcpm_v1_cpu_exit_state(cpu, E500_PM_PH15); 188 + rcpm_v1_irq_unmask(cpu); 189 + } 190 + 191 + static void rcpm_v2_cpu_exit_state(int cpu, int state) 192 + { 193 + int hw_cpu = get_hard_smp_processor_id(cpu); 194 + u32 mask = 1 << cpu_core_index_of_thread(cpu); 195 + 196 + switch (state) { 197 + case E500_PM_PH10: 198 + setbits32(&rcpm_v2_regs->tph10clrr0, 1 << hw_cpu); 199 + break; 200 + case E500_PM_PH15: 201 + setbits32(&rcpm_v2_regs->pcph15clrr, mask); 202 + break; 203 + case E500_PM_PH20: 204 + setbits32(&rcpm_v2_regs->pcph20clrr, mask); 205 + break; 206 + case E500_PM_PH30: 207 + setbits32(&rcpm_v2_regs->pcph30clrr, mask); 208 + break; 209 + default: 210 + pr_warn("Unknown cpu PM state (%d)\n", state); 211 + } 212 + } 213 + 214 + static void rcpm_v2_cpu_up_prepare(int cpu) 215 + { 216 + rcpm_v2_cpu_exit_state(cpu, E500_PM_PH20); 217 + rcpm_v2_irq_unmask(cpu); 218 + } 219 + 220 + static int rcpm_v1_plat_enter_state(int state) 221 + { 222 + u32 *pmcsr_reg = &rcpm_v1_regs->powmgtcsr; 223 + int ret = 0; 224 + int result; 225 + 226 + switch (state) { 227 + case PLAT_PM_SLEEP: 228 + setbits32(pmcsr_reg, RCPM_POWMGTCSR_SLP); 229 + 230 + /* Upon resume, wait for RCPM_POWMGTCSR_SLP bit to be clear. */ 231 + result = spin_event_timeout( 232 + !(in_be32(pmcsr_reg) & RCPM_POWMGTCSR_SLP), 10000, 10); 233 + if (!result) { 234 + pr_err("timeout waiting for SLP bit to be cleared\n"); 235 + ret = -ETIMEDOUT; 236 + } 237 + break; 238 + default: 239 + pr_warn("Unknown platform PM state (%d)", state); 240 + ret = -EINVAL; 241 + } 242 + 243 + return ret; 244 + } 245 + 246 + static int rcpm_v2_plat_enter_state(int state) 247 + { 248 + u32 *pmcsr_reg = &rcpm_v2_regs->powmgtcsr; 249 + int ret = 0; 250 + int result; 251 + 252 + switch (state) { 253 + case PLAT_PM_LPM20: 254 + /* clear previous LPM20 status */ 255 + setbits32(pmcsr_reg, RCPM_POWMGTCSR_P_LPM20_ST); 256 + /* enter LPM20 status */ 257 + setbits32(pmcsr_reg, RCPM_POWMGTCSR_LPM20_RQ); 258 + 259 + /* At this point, the device is in LPM20 status. */ 260 + 261 + /* resume ... */ 262 + result = spin_event_timeout( 263 + !(in_be32(pmcsr_reg) & RCPM_POWMGTCSR_LPM20_ST), 10000, 10); 264 + if (!result) { 265 + pr_err("timeout waiting for LPM20 bit to be cleared\n"); 266 + ret = -ETIMEDOUT; 267 + } 268 + break; 269 + default: 270 + pr_warn("Unknown platform PM state (%d)\n", state); 271 + ret = -EINVAL; 272 + } 273 + 274 + return ret; 275 + } 276 + 277 + static int rcpm_v1_plat_enter_sleep(void) 278 + { 279 + return rcpm_v1_plat_enter_state(PLAT_PM_SLEEP); 280 + } 281 + 282 + static int rcpm_v2_plat_enter_sleep(void) 283 + { 284 + return rcpm_v2_plat_enter_state(PLAT_PM_LPM20); 285 + } 286 + 287 + static void rcpm_common_freeze_time_base(u32 *tben_reg, int freeze) 288 + { 289 + static u32 mask; 290 + 291 + if (freeze) { 292 + mask = in_be32(tben_reg); 293 + clrbits32(tben_reg, mask); 294 + } else { 295 + setbits32(tben_reg, mask); 296 + } 297 + 298 + /* read back to push the previous write */ 299 + in_be32(tben_reg); 300 + } 301 + 302 + static void rcpm_v1_freeze_time_base(bool freeze) 303 + { 304 + rcpm_common_freeze_time_base(&rcpm_v1_regs->ctbenr, freeze); 305 + } 306 + 307 + static void rcpm_v2_freeze_time_base(bool freeze) 308 + { 309 + rcpm_common_freeze_time_base(&rcpm_v2_regs->pctbenr, freeze); 310 + } 311 + 312 + static unsigned int rcpm_get_pm_modes(void) 313 + { 314 + return fsl_supported_pm_modes; 315 + } 316 + 317 + static const struct fsl_pm_ops qoriq_rcpm_v1_ops = { 318 + .irq_mask = rcpm_v1_irq_mask, 319 + .irq_unmask = rcpm_v1_irq_unmask, 320 + .cpu_enter_state = rcpm_v1_cpu_enter_state, 321 + .cpu_exit_state = rcpm_v1_cpu_exit_state, 322 + .cpu_up_prepare = rcpm_v1_cpu_up_prepare, 323 + .cpu_die = rcpm_v1_cpu_die, 324 + .plat_enter_sleep = rcpm_v1_plat_enter_sleep, 325 + .set_ip_power = rcpm_v1_set_ip_power, 326 + .freeze_time_base = rcpm_v1_freeze_time_base, 327 + .get_pm_modes = rcpm_get_pm_modes, 328 + }; 329 + 330 + static const struct fsl_pm_ops qoriq_rcpm_v2_ops = { 331 + .irq_mask = rcpm_v2_irq_mask, 332 + .irq_unmask = rcpm_v2_irq_unmask, 333 + .cpu_enter_state = rcpm_v2_cpu_enter_state, 334 + .cpu_exit_state = rcpm_v2_cpu_exit_state, 335 + .cpu_up_prepare = rcpm_v2_cpu_up_prepare, 336 + .cpu_die = rcpm_v2_cpu_die, 337 + .plat_enter_sleep = rcpm_v2_plat_enter_sleep, 338 + .set_ip_power = rcpm_v2_set_ip_power, 339 + .freeze_time_base = rcpm_v2_freeze_time_base, 340 + .get_pm_modes = rcpm_get_pm_modes, 341 + }; 342 + 343 + static const struct of_device_id rcpm_matches[] = { 344 + { 345 + .compatible = "fsl,qoriq-rcpm-1.0", 346 + .data = &qoriq_rcpm_v1_ops, 347 + }, 348 + { 349 + .compatible = "fsl,qoriq-rcpm-2.0", 350 + .data = &qoriq_rcpm_v2_ops, 351 + }, 352 + { 353 + .compatible = "fsl,qoriq-rcpm-2.1", 354 + .data = &qoriq_rcpm_v2_ops, 355 + }, 356 + {}, 357 + }; 358 + 359 + int __init fsl_rcpm_init(void) 360 + { 361 + struct device_node *np; 362 + const struct of_device_id *match; 363 + void __iomem *base; 364 + 365 + np = of_find_matching_node_and_match(NULL, rcpm_matches, &match); 366 + if (!np) 367 + return 0; 368 + 369 + base = of_iomap(np, 0); 370 + of_node_put(np); 371 + if (!base) { 372 + pr_err("of_iomap() error.\n"); 373 + return -ENOMEM; 374 + } 375 + 376 + rcpm_v1_regs = base; 377 + rcpm_v2_regs = base; 378 + 379 + /* support sleep by default */ 380 + fsl_supported_pm_modes = FSL_PM_SLEEP; 381 + 382 + qoriq_pm_ops = match->data; 383 + 384 + return 0; 385 + }
+105
include/linux/fsl/guts.h
··· 189 189 190 190 #endif 191 191 192 + struct ccsr_rcpm_v1 { 193 + u8 res0000[4]; 194 + __be32 cdozsr; /* 0x0004 Core Doze Status Register */ 195 + u8 res0008[4]; 196 + __be32 cdozcr; /* 0x000c Core Doze Control Register */ 197 + u8 res0010[4]; 198 + __be32 cnapsr; /* 0x0014 Core Nap Status Register */ 199 + u8 res0018[4]; 200 + __be32 cnapcr; /* 0x001c Core Nap Control Register */ 201 + u8 res0020[4]; 202 + __be32 cdozpsr; /* 0x0024 Core Doze Previous Status Register */ 203 + u8 res0028[4]; 204 + __be32 cnappsr; /* 0x002c Core Nap Previous Status Register */ 205 + u8 res0030[4]; 206 + __be32 cwaitsr; /* 0x0034 Core Wait Status Register */ 207 + u8 res0038[4]; 208 + __be32 cwdtdsr; /* 0x003c Core Watchdog Detect Status Register */ 209 + __be32 powmgtcsr; /* 0x0040 PM Control&Status Register */ 210 + #define RCPM_POWMGTCSR_SLP 0x00020000 211 + u8 res0044[12]; 212 + __be32 ippdexpcr; /* 0x0050 IP Powerdown Exception Control Register */ 213 + u8 res0054[16]; 214 + __be32 cpmimr; /* 0x0064 Core PM IRQ Mask Register */ 215 + u8 res0068[4]; 216 + __be32 cpmcimr; /* 0x006c Core PM Critical IRQ Mask Register */ 217 + u8 res0070[4]; 218 + __be32 cpmmcmr; /* 0x0074 Core PM Machine Check Mask Register */ 219 + u8 res0078[4]; 220 + __be32 cpmnmimr; /* 0x007c Core PM NMI Mask Register */ 221 + u8 res0080[4]; 222 + __be32 ctbenr; /* 0x0084 Core Time Base Enable Register */ 223 + u8 res0088[4]; 224 + __be32 ctbckselr; /* 0x008c Core Time Base Clock Select Register */ 225 + u8 res0090[4]; 226 + __be32 ctbhltcr; /* 0x0094 Core Time Base Halt Control Register */ 227 + u8 res0098[4]; 228 + __be32 cmcpmaskcr; /* 0x00a4 Core Machine Check Mask Register */ 229 + }; 230 + 231 + struct ccsr_rcpm_v2 { 232 + u8 res_00[12]; 233 + __be32 tph10sr0; /* Thread PH10 Status Register */ 234 + u8 res_10[12]; 235 + __be32 tph10setr0; /* Thread PH10 Set Control Register */ 236 + u8 res_20[12]; 237 + __be32 tph10clrr0; /* Thread PH10 Clear Control Register */ 238 + u8 res_30[12]; 239 + __be32 tph10psr0; /* Thread PH10 Previous Status Register */ 240 + u8 res_40[12]; 241 + __be32 twaitsr0; /* Thread Wait Status Register */ 242 + u8 res_50[96]; 243 + __be32 pcph15sr; /* Physical Core PH15 Status Register */ 244 + __be32 pcph15setr; /* Physical Core PH15 Set Control Register */ 245 + __be32 pcph15clrr; /* Physical Core PH15 Clear Control Register */ 246 + __be32 pcph15psr; /* Physical Core PH15 Prev Status Register */ 247 + u8 res_c0[16]; 248 + __be32 pcph20sr; /* Physical Core PH20 Status Register */ 249 + __be32 pcph20setr; /* Physical Core PH20 Set Control Register */ 250 + __be32 pcph20clrr; /* Physical Core PH20 Clear Control Register */ 251 + __be32 pcph20psr; /* Physical Core PH20 Prev Status Register */ 252 + __be32 pcpw20sr; /* Physical Core PW20 Status Register */ 253 + u8 res_e0[12]; 254 + __be32 pcph30sr; /* Physical Core PH30 Status Register */ 255 + __be32 pcph30setr; /* Physical Core PH30 Set Control Register */ 256 + __be32 pcph30clrr; /* Physical Core PH30 Clear Control Register */ 257 + __be32 pcph30psr; /* Physical Core PH30 Prev Status Register */ 258 + u8 res_100[32]; 259 + __be32 ippwrgatecr; /* IP Power Gating Control Register */ 260 + u8 res_124[12]; 261 + __be32 powmgtcsr; /* Power Management Control & Status Reg */ 262 + #define RCPM_POWMGTCSR_LPM20_RQ 0x00100000 263 + #define RCPM_POWMGTCSR_LPM20_ST 0x00000200 264 + #define RCPM_POWMGTCSR_P_LPM20_ST 0x00000100 265 + u8 res_134[12]; 266 + __be32 ippdexpcr[4]; /* IP Powerdown Exception Control Reg */ 267 + u8 res_150[12]; 268 + __be32 tpmimr0; /* Thread PM Interrupt Mask Reg */ 269 + u8 res_160[12]; 270 + __be32 tpmcimr0; /* Thread PM Crit Interrupt Mask Reg */ 271 + u8 res_170[12]; 272 + __be32 tpmmcmr0; /* Thread PM Machine Check Interrupt Mask Reg */ 273 + u8 res_180[12]; 274 + __be32 tpmnmimr0; /* Thread PM NMI Mask Reg */ 275 + u8 res_190[12]; 276 + __be32 tmcpmaskcr0; /* Thread Machine Check Mask Control Reg */ 277 + __be32 pctbenr; /* Physical Core Time Base Enable Reg */ 278 + __be32 pctbclkselr; /* Physical Core Time Base Clock Select */ 279 + __be32 tbclkdivr; /* Time Base Clock Divider Register */ 280 + u8 res_1ac[4]; 281 + __be32 ttbhltcr[4]; /* Thread Time Base Halt Control Register */ 282 + __be32 clpcl10sr; /* Cluster PCL10 Status Register */ 283 + __be32 clpcl10setr; /* Cluster PCL30 Set Control Register */ 284 + __be32 clpcl10clrr; /* Cluster PCL30 Clear Control Register */ 285 + __be32 clpcl10psr; /* Cluster PCL30 Prev Status Register */ 286 + __be32 cddslpsetr; /* Core Domain Deep Sleep Set Register */ 287 + __be32 cddslpclrr; /* Core Domain Deep Sleep Clear Register */ 288 + __be32 cdpwroksetr; /* Core Domain Power OK Set Register */ 289 + __be32 cdpwrokclrr; /* Core Domain Power OK Clear Register */ 290 + __be32 cdpwrensr; /* Core Domain Power Enable Status Register */ 291 + __be32 cddslsr; /* Core Domain Deep Sleep Status Register */ 292 + u8 res_1e8[8]; 293 + __be32 dslpcntcr[8]; /* Deep Sleep Counter Cfg Register */ 294 + u8 res_300[3568]; 295 + }; 296 + 192 297 #endif