mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 23:47:39 +07:00
b24413180f
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
527 lines
13 KiB
C
527 lines
13 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* OMAP3xxx clockdomains
|
|
*
|
|
* Copyright (C) 2008-2011 Texas Instruments, Inc.
|
|
* Copyright (C) 2008-2010 Nokia Corporation
|
|
*
|
|
* Paul Walmsley, Jouni Högander
|
|
*
|
|
* This file contains clockdomains and clockdomain wakeup/sleep
|
|
* dependencies for the OMAP3xxx chips. Some notes:
|
|
*
|
|
* A useful validation rule for struct clockdomain: Any clockdomain
|
|
* referenced by a wkdep_srcs or sleepdep_srcs array must have a
|
|
* dep_bit assigned. So wkdep_srcs/sleepdep_srcs are really just
|
|
* software-controllable dependencies. Non-software-controllable
|
|
* dependencies do exist, but they are not encoded below (yet).
|
|
*
|
|
* The overly-specific dep_bit names are due to a bit name collision
|
|
* with CM_FCLKEN_{DSP,IVA2}. The DSP/IVA2 PM_WKDEP and CM_SLEEPDEP shift
|
|
* value are the same for all powerdomains: 2
|
|
*
|
|
* XXX should dep_bit be a mask, so we can test to see if it is 0 as a
|
|
* sanity check?
|
|
* XXX encode hardware fixed wakeup dependencies -- esp. for 3430 CORE
|
|
*/
|
|
|
|
/*
|
|
* To-Do List
|
|
* -> Port the Sleep/Wakeup dependencies for the domains
|
|
* from the Power domain framework
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/io.h>
|
|
|
|
#include "soc.h"
|
|
#include "clockdomain.h"
|
|
#include "prm2xxx_3xxx.h"
|
|
#include "cm2xxx_3xxx.h"
|
|
#include "cm-regbits-34xx.h"
|
|
#include "prm-regbits-34xx.h"
|
|
|
|
/*
|
|
* Clockdomain dependencies for wkdeps/sleepdeps
|
|
*
|
|
* XXX Hardware dependencies (e.g., dependencies that cannot be
|
|
* changed in software) are not included here yet, but should be.
|
|
*/
|
|
|
|
/* OMAP3-specific possible dependencies */
|
|
|
|
/*
|
|
* 3430ES1 PM_WKDEP_GFX: adds IVA2, removes CORE
|
|
* 3430ES2 PM_WKDEP_SGX: adds IVA2, removes CORE
|
|
*/
|
|
static struct clkdm_dep gfx_sgx_3xxx_wkdeps[] = {
|
|
{ .clkdm_name = "iva2_clkdm" },
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ .clkdm_name = "wkup_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
static struct clkdm_dep gfx_sgx_am35x_wkdeps[] = {
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ .clkdm_name = "wkup_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
/* 3430: PM_WKDEP_PER: CORE, IVA2, MPU, WKUP */
|
|
static struct clkdm_dep per_wkdeps[] = {
|
|
{ .clkdm_name = "core_l3_clkdm" },
|
|
{ .clkdm_name = "core_l4_clkdm" },
|
|
{ .clkdm_name = "iva2_clkdm" },
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ .clkdm_name = "wkup_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
static struct clkdm_dep per_am35x_wkdeps[] = {
|
|
{ .clkdm_name = "core_l3_clkdm" },
|
|
{ .clkdm_name = "core_l4_clkdm" },
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ .clkdm_name = "wkup_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
/* 3430ES2: PM_WKDEP_USBHOST: CORE, IVA2, MPU, WKUP */
|
|
static struct clkdm_dep usbhost_wkdeps[] = {
|
|
{ .clkdm_name = "core_l3_clkdm" },
|
|
{ .clkdm_name = "core_l4_clkdm" },
|
|
{ .clkdm_name = "iva2_clkdm" },
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ .clkdm_name = "wkup_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
static struct clkdm_dep usbhost_am35x_wkdeps[] = {
|
|
{ .clkdm_name = "core_l3_clkdm" },
|
|
{ .clkdm_name = "core_l4_clkdm" },
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ .clkdm_name = "wkup_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
/* 3430 PM_WKDEP_MPU: CORE, IVA2, DSS, PER */
|
|
static struct clkdm_dep mpu_3xxx_wkdeps[] = {
|
|
{ .clkdm_name = "core_l3_clkdm" },
|
|
{ .clkdm_name = "core_l4_clkdm" },
|
|
{ .clkdm_name = "iva2_clkdm" },
|
|
{ .clkdm_name = "dss_clkdm" },
|
|
{ .clkdm_name = "per_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
static struct clkdm_dep mpu_am35x_wkdeps[] = {
|
|
{ .clkdm_name = "core_l3_clkdm" },
|
|
{ .clkdm_name = "core_l4_clkdm" },
|
|
{ .clkdm_name = "dss_clkdm" },
|
|
{ .clkdm_name = "per_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
/* 3430 PM_WKDEP_IVA2: CORE, MPU, WKUP, DSS, PER */
|
|
static struct clkdm_dep iva2_wkdeps[] = {
|
|
{ .clkdm_name = "core_l3_clkdm" },
|
|
{ .clkdm_name = "core_l4_clkdm" },
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ .clkdm_name = "wkup_clkdm" },
|
|
{ .clkdm_name = "dss_clkdm" },
|
|
{ .clkdm_name = "per_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
/* 3430 PM_WKDEP_CAM: IVA2, MPU, WKUP */
|
|
static struct clkdm_dep cam_wkdeps[] = {
|
|
{ .clkdm_name = "iva2_clkdm" },
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ .clkdm_name = "wkup_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
/* 3430 PM_WKDEP_DSS: IVA2, MPU, WKUP */
|
|
static struct clkdm_dep dss_wkdeps[] = {
|
|
{ .clkdm_name = "iva2_clkdm" },
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ .clkdm_name = "wkup_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
static struct clkdm_dep dss_am35x_wkdeps[] = {
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ .clkdm_name = "wkup_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
/* 3430: PM_WKDEP_NEON: MPU */
|
|
static struct clkdm_dep neon_wkdeps[] = {
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
/* Sleep dependency source arrays for OMAP3-specific clkdms */
|
|
|
|
/* 3430: CM_SLEEPDEP_DSS: MPU, IVA */
|
|
static struct clkdm_dep dss_sleepdeps[] = {
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ .clkdm_name = "iva2_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
static struct clkdm_dep dss_am35x_sleepdeps[] = {
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
/* 3430: CM_SLEEPDEP_PER: MPU, IVA */
|
|
static struct clkdm_dep per_sleepdeps[] = {
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ .clkdm_name = "iva2_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
static struct clkdm_dep per_am35x_sleepdeps[] = {
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
/* 3430ES2: CM_SLEEPDEP_USBHOST: MPU, IVA */
|
|
static struct clkdm_dep usbhost_sleepdeps[] = {
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ .clkdm_name = "iva2_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
static struct clkdm_dep usbhost_am35x_sleepdeps[] = {
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
/* 3430: CM_SLEEPDEP_CAM: MPU */
|
|
static struct clkdm_dep cam_sleepdeps[] = {
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
/*
|
|
* 3430ES1: CM_SLEEPDEP_GFX: MPU
|
|
* 3430ES2: CM_SLEEPDEP_SGX: MPU
|
|
* These can share data since they will never be present simultaneously
|
|
* on the same device.
|
|
*/
|
|
static struct clkdm_dep gfx_sgx_sleepdeps[] = {
|
|
{ .clkdm_name = "mpu_clkdm" },
|
|
{ NULL },
|
|
};
|
|
|
|
/*
|
|
* OMAP3 clockdomains
|
|
*/
|
|
|
|
static struct clockdomain mpu_3xxx_clkdm = {
|
|
.name = "mpu_clkdm",
|
|
.pwrdm = { .name = "mpu_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP | CLKDM_CAN_FORCE_WAKEUP,
|
|
.dep_bit = OMAP3430_EN_MPU_SHIFT,
|
|
.wkdep_srcs = mpu_3xxx_wkdeps,
|
|
.clktrctrl_mask = OMAP3430_CLKTRCTRL_MPU_MASK,
|
|
};
|
|
|
|
static struct clockdomain mpu_am35x_clkdm = {
|
|
.name = "mpu_clkdm",
|
|
.pwrdm = { .name = "mpu_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP | CLKDM_CAN_FORCE_WAKEUP,
|
|
.dep_bit = OMAP3430_EN_MPU_SHIFT,
|
|
.wkdep_srcs = mpu_am35x_wkdeps,
|
|
.clktrctrl_mask = OMAP3430_CLKTRCTRL_MPU_MASK,
|
|
};
|
|
|
|
static struct clockdomain neon_clkdm = {
|
|
.name = "neon_clkdm",
|
|
.pwrdm = { .name = "neon_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP_SWSUP,
|
|
.wkdep_srcs = neon_wkdeps,
|
|
.clktrctrl_mask = OMAP3430_CLKTRCTRL_NEON_MASK,
|
|
};
|
|
|
|
static struct clockdomain iva2_clkdm = {
|
|
.name = "iva2_clkdm",
|
|
.pwrdm = { .name = "iva2_pwrdm" },
|
|
.flags = CLKDM_CAN_SWSUP,
|
|
.dep_bit = OMAP3430_PM_WKDEP_MPU_EN_IVA2_SHIFT,
|
|
.wkdep_srcs = iva2_wkdeps,
|
|
.clktrctrl_mask = OMAP3430_CLKTRCTRL_IVA2_MASK,
|
|
};
|
|
|
|
static struct clockdomain gfx_3430es1_clkdm = {
|
|
.name = "gfx_clkdm",
|
|
.pwrdm = { .name = "gfx_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP_SWSUP,
|
|
.wkdep_srcs = gfx_sgx_3xxx_wkdeps,
|
|
.sleepdep_srcs = gfx_sgx_sleepdeps,
|
|
.clktrctrl_mask = OMAP3430ES1_CLKTRCTRL_GFX_MASK,
|
|
};
|
|
|
|
static struct clockdomain sgx_clkdm = {
|
|
.name = "sgx_clkdm",
|
|
.pwrdm = { .name = "sgx_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP_SWSUP,
|
|
.wkdep_srcs = gfx_sgx_3xxx_wkdeps,
|
|
.sleepdep_srcs = gfx_sgx_sleepdeps,
|
|
.clktrctrl_mask = OMAP3430ES2_CLKTRCTRL_SGX_MASK,
|
|
};
|
|
|
|
static struct clockdomain sgx_am35x_clkdm = {
|
|
.name = "sgx_clkdm",
|
|
.pwrdm = { .name = "sgx_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP_SWSUP,
|
|
.wkdep_srcs = gfx_sgx_am35x_wkdeps,
|
|
.sleepdep_srcs = gfx_sgx_sleepdeps,
|
|
.clktrctrl_mask = OMAP3430ES2_CLKTRCTRL_SGX_MASK,
|
|
};
|
|
|
|
/*
|
|
* The die-to-die clockdomain was documented in the 34xx ES1 TRM, but
|
|
* then that information was removed from the 34xx ES2+ TRM. It is
|
|
* unclear whether the core is still there, but the clockdomain logic
|
|
* is there, and must be programmed to an appropriate state if the
|
|
* CORE clockdomain is to become inactive.
|
|
*/
|
|
static struct clockdomain d2d_clkdm = {
|
|
.name = "d2d_clkdm",
|
|
.pwrdm = { .name = "core_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP_SWSUP,
|
|
.clktrctrl_mask = OMAP3430ES1_CLKTRCTRL_D2D_MASK,
|
|
};
|
|
|
|
/*
|
|
* XXX add usecounting for clkdm dependencies, otherwise the presence
|
|
* of a single dep bit for core_l3_3xxx_clkdm and core_l4_3xxx_clkdm
|
|
* could cause trouble
|
|
*/
|
|
static struct clockdomain core_l3_3xxx_clkdm = {
|
|
.name = "core_l3_clkdm",
|
|
.pwrdm = { .name = "core_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP,
|
|
.dep_bit = OMAP3430_EN_CORE_SHIFT,
|
|
.clktrctrl_mask = OMAP3430_CLKTRCTRL_L3_MASK,
|
|
};
|
|
|
|
/*
|
|
* XXX add usecounting for clkdm dependencies, otherwise the presence
|
|
* of a single dep bit for core_l3_3xxx_clkdm and core_l4_3xxx_clkdm
|
|
* could cause trouble
|
|
*/
|
|
static struct clockdomain core_l4_3xxx_clkdm = {
|
|
.name = "core_l4_clkdm",
|
|
.pwrdm = { .name = "core_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP,
|
|
.dep_bit = OMAP3430_EN_CORE_SHIFT,
|
|
.clktrctrl_mask = OMAP3430_CLKTRCTRL_L4_MASK,
|
|
};
|
|
|
|
/* Another case of bit name collisions between several registers: EN_DSS */
|
|
static struct clockdomain dss_3xxx_clkdm = {
|
|
.name = "dss_clkdm",
|
|
.pwrdm = { .name = "dss_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP_SWSUP,
|
|
.dep_bit = OMAP3430_PM_WKDEP_MPU_EN_DSS_SHIFT,
|
|
.wkdep_srcs = dss_wkdeps,
|
|
.sleepdep_srcs = dss_sleepdeps,
|
|
.clktrctrl_mask = OMAP3430_CLKTRCTRL_DSS_MASK,
|
|
};
|
|
|
|
static struct clockdomain dss_am35x_clkdm = {
|
|
.name = "dss_clkdm",
|
|
.pwrdm = { .name = "dss_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP_SWSUP,
|
|
.dep_bit = OMAP3430_PM_WKDEP_MPU_EN_DSS_SHIFT,
|
|
.wkdep_srcs = dss_am35x_wkdeps,
|
|
.sleepdep_srcs = dss_am35x_sleepdeps,
|
|
.clktrctrl_mask = OMAP3430_CLKTRCTRL_DSS_MASK,
|
|
};
|
|
|
|
static struct clockdomain cam_clkdm = {
|
|
.name = "cam_clkdm",
|
|
.pwrdm = { .name = "cam_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP_SWSUP,
|
|
.wkdep_srcs = cam_wkdeps,
|
|
.sleepdep_srcs = cam_sleepdeps,
|
|
.clktrctrl_mask = OMAP3430_CLKTRCTRL_CAM_MASK,
|
|
};
|
|
|
|
static struct clockdomain usbhost_clkdm = {
|
|
.name = "usbhost_clkdm",
|
|
.pwrdm = { .name = "usbhost_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP_SWSUP,
|
|
.wkdep_srcs = usbhost_wkdeps,
|
|
.sleepdep_srcs = usbhost_sleepdeps,
|
|
.clktrctrl_mask = OMAP3430ES2_CLKTRCTRL_USBHOST_MASK,
|
|
};
|
|
|
|
static struct clockdomain usbhost_am35x_clkdm = {
|
|
.name = "usbhost_clkdm",
|
|
.pwrdm = { .name = "core_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP_SWSUP,
|
|
.wkdep_srcs = usbhost_am35x_wkdeps,
|
|
.sleepdep_srcs = usbhost_am35x_sleepdeps,
|
|
.clktrctrl_mask = OMAP3430ES2_CLKTRCTRL_USBHOST_MASK,
|
|
};
|
|
|
|
static struct clockdomain per_clkdm = {
|
|
.name = "per_clkdm",
|
|
.pwrdm = { .name = "per_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP_SWSUP,
|
|
.dep_bit = OMAP3430_EN_PER_SHIFT,
|
|
.wkdep_srcs = per_wkdeps,
|
|
.sleepdep_srcs = per_sleepdeps,
|
|
.clktrctrl_mask = OMAP3430_CLKTRCTRL_PER_MASK,
|
|
};
|
|
|
|
static struct clockdomain per_am35x_clkdm = {
|
|
.name = "per_clkdm",
|
|
.pwrdm = { .name = "per_pwrdm" },
|
|
.flags = CLKDM_CAN_HWSUP_SWSUP,
|
|
.dep_bit = OMAP3430_EN_PER_SHIFT,
|
|
.wkdep_srcs = per_am35x_wkdeps,
|
|
.sleepdep_srcs = per_am35x_sleepdeps,
|
|
.clktrctrl_mask = OMAP3430_CLKTRCTRL_PER_MASK,
|
|
};
|
|
|
|
static struct clockdomain emu_clkdm = {
|
|
.name = "emu_clkdm",
|
|
.pwrdm = { .name = "emu_pwrdm" },
|
|
.flags = (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_SWSUP |
|
|
CLKDM_MISSING_IDLE_REPORTING),
|
|
.clktrctrl_mask = OMAP3430_CLKTRCTRL_EMU_MASK,
|
|
};
|
|
|
|
static struct clockdomain dpll1_clkdm = {
|
|
.name = "dpll1_clkdm",
|
|
.pwrdm = { .name = "dpll1_pwrdm" },
|
|
};
|
|
|
|
static struct clockdomain dpll2_clkdm = {
|
|
.name = "dpll2_clkdm",
|
|
.pwrdm = { .name = "dpll2_pwrdm" },
|
|
};
|
|
|
|
static struct clockdomain dpll3_clkdm = {
|
|
.name = "dpll3_clkdm",
|
|
.pwrdm = { .name = "dpll3_pwrdm" },
|
|
};
|
|
|
|
static struct clockdomain dpll4_clkdm = {
|
|
.name = "dpll4_clkdm",
|
|
.pwrdm = { .name = "dpll4_pwrdm" },
|
|
};
|
|
|
|
static struct clockdomain dpll5_clkdm = {
|
|
.name = "dpll5_clkdm",
|
|
.pwrdm = { .name = "dpll5_pwrdm" },
|
|
};
|
|
|
|
/*
|
|
* Clockdomain hwsup dependencies
|
|
*/
|
|
|
|
static struct clkdm_autodep clkdm_autodeps[] = {
|
|
{
|
|
.clkdm = { .name = "mpu_clkdm" },
|
|
},
|
|
{
|
|
.clkdm = { .name = "iva2_clkdm" },
|
|
},
|
|
{
|
|
.clkdm = { .name = NULL },
|
|
}
|
|
};
|
|
|
|
static struct clkdm_autodep clkdm_am35x_autodeps[] = {
|
|
{
|
|
.clkdm = { .name = "mpu_clkdm" },
|
|
},
|
|
{
|
|
.clkdm = { .name = NULL },
|
|
}
|
|
};
|
|
|
|
/*
|
|
*
|
|
*/
|
|
|
|
static struct clockdomain *clockdomains_common[] __initdata = {
|
|
&wkup_common_clkdm,
|
|
&neon_clkdm,
|
|
&core_l3_3xxx_clkdm,
|
|
&core_l4_3xxx_clkdm,
|
|
&emu_clkdm,
|
|
&dpll1_clkdm,
|
|
&dpll3_clkdm,
|
|
&dpll4_clkdm,
|
|
NULL
|
|
};
|
|
|
|
static struct clockdomain *clockdomains_omap3430[] __initdata = {
|
|
&mpu_3xxx_clkdm,
|
|
&iva2_clkdm,
|
|
&d2d_clkdm,
|
|
&dss_3xxx_clkdm,
|
|
&cam_clkdm,
|
|
&per_clkdm,
|
|
&dpll2_clkdm,
|
|
NULL
|
|
};
|
|
|
|
static struct clockdomain *clockdomains_omap3430es1[] __initdata = {
|
|
&gfx_3430es1_clkdm,
|
|
NULL,
|
|
};
|
|
|
|
static struct clockdomain *clockdomains_omap3430es2plus[] __initdata = {
|
|
&sgx_clkdm,
|
|
&dpll5_clkdm,
|
|
&usbhost_clkdm,
|
|
NULL,
|
|
};
|
|
|
|
static struct clockdomain *clockdomains_am35x[] __initdata = {
|
|
&mpu_am35x_clkdm,
|
|
&sgx_am35x_clkdm,
|
|
&dss_am35x_clkdm,
|
|
&per_am35x_clkdm,
|
|
&usbhost_am35x_clkdm,
|
|
&dpll5_clkdm,
|
|
NULL
|
|
};
|
|
|
|
void __init omap3xxx_clockdomains_init(void)
|
|
{
|
|
struct clockdomain **sc;
|
|
unsigned int rev;
|
|
|
|
if (!cpu_is_omap34xx())
|
|
return;
|
|
|
|
clkdm_register_platform_funcs(&omap3_clkdm_operations);
|
|
clkdm_register_clkdms(clockdomains_common);
|
|
|
|
rev = omap_rev();
|
|
|
|
if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
|
|
clkdm_register_clkdms(clockdomains_am35x);
|
|
clkdm_register_autodeps(clkdm_am35x_autodeps);
|
|
} else {
|
|
clkdm_register_clkdms(clockdomains_omap3430);
|
|
|
|
sc = (rev == OMAP3430_REV_ES1_0) ?
|
|
clockdomains_omap3430es1 : clockdomains_omap3430es2plus;
|
|
|
|
clkdm_register_clkdms(sc);
|
|
clkdm_register_autodeps(clkdm_autodeps);
|
|
}
|
|
|
|
clkdm_complete_init();
|
|
}
|