Path: blob/master/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c
26295 views
// SPDX-License-Identifier: GPL-2.01/*2* OMAP2/3 clockdomain common data3*4* Copyright (C) 2008-2011 Texas Instruments, Inc.5* Copyright (C) 2008-2010 Nokia Corporation6*7* Paul Walmsley, Jouni Högander8*9* This file contains clockdomains and clockdomain wakeup/sleep10* dependencies for the OMAP2/3 chips. Some notes:11*12* A useful validation rule for struct clockdomain: Any clockdomain13* referenced by a wkdep_srcs or sleepdep_srcs array must have a14* dep_bit assigned. So wkdep_srcs/sleepdep_srcs are really just15* software-controllable dependencies. Non-software-controllable16* dependencies do exist, but they are not encoded below (yet).17*18* 24xx does not support programmable sleep dependencies (SLEEPDEP)19*20* The overly-specific dep_bit names are due to a bit name collision21* with CM_FCLKEN_{DSP,IVA2}. The DSP/IVA2 PM_WKDEP and CM_SLEEPDEP shift22* value are the same for all powerdomains: 223*24* XXX should dep_bit be a mask, so we can test to see if it is 0 as a25* sanity check?26* XXX encode hardware fixed wakeup dependencies -- esp. for 3430 CORE27*/2829/*30* To-Do List31* -> Port the Sleep/Wakeup dependencies for the domains32* from the Power domain framework33*/3435#include <linux/kernel.h>36#include <linux/io.h>3738#include "clockdomain.h"39#include "prm2xxx_3xxx.h"40#include "cm2xxx_3xxx.h"41#include "cm-regbits-24xx.h"42#include "cm-regbits-34xx.h"43#include "cm-regbits-44xx.h"44#include "prm-regbits-24xx.h"45#include "prm-regbits-34xx.h"4647/*48* Clockdomain dependencies for wkdeps/sleepdeps49*50* XXX Hardware dependencies (e.g., dependencies that cannot be51* changed in software) are not included here yet, but should be.52*/5354/* Wakeup dependency source arrays */5556/* 2xxx-specific possible dependencies */5758/* 2xxx PM_WKDEP_GFX: CORE, MPU, WKUP */59struct clkdm_dep gfx_24xx_wkdeps[] = {60{ .clkdm_name = "core_l3_clkdm" },61{ .clkdm_name = "core_l4_clkdm" },62{ .clkdm_name = "mpu_clkdm" },63{ .clkdm_name = "wkup_clkdm" },64{ NULL },65};6667/* 2xxx PM_WKDEP_DSP: CORE, MPU, WKUP */68struct clkdm_dep dsp_24xx_wkdeps[] = {69{ .clkdm_name = "core_l3_clkdm" },70{ .clkdm_name = "core_l4_clkdm" },71{ .clkdm_name = "mpu_clkdm" },72{ .clkdm_name = "wkup_clkdm" },73{ NULL },74};757677/*78* OMAP2/3-common clockdomains79*80* Even though the 2420 has a single PRCM module from the81* interconnect's perspective, internally it does appear to have82* separate PRM and CM clockdomains. The usual test case is83* sys_clkout/sys_clkout2.84*/8586/* This is an implicit clockdomain - it is never defined as such in TRM */87struct clockdomain wkup_common_clkdm = {88.name = "wkup_clkdm",89.pwrdm = { .name = "wkup_pwrdm" },90.dep_bit = OMAP_EN_WKUP_SHIFT,91.flags = CLKDM_ACTIVE_WITH_MPU,92};939495