mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-24 10:13:00 +03:00
This patch fixes issues found during testing
and guidance provided by devtools. The following
is changed in this patch:
1. mcf_iobhx and mcf_ocu are merged into a single mcf_soc IP.
2a. c2c is changed from 2 instances to 1.
2b. Remove C2CS0/1 which are the broadcast apertures.
Also remove the allowlist offset specific to broadcast
aperture.
3. mss_hub is changed from 1 instance to 8.
4. mss_channel is changed from 1 instance to 32.
5. mc0 perfmux is added to mcf_clink.
6. mcf_core is changed from 1 instance to 8.
7. License headers updated where necessary.
8. c2c allowlist updated to have just the offsets common
to all links.
9. Added a verbose comment explaining the design of
th500_hwpm_force_enable_ips()
10. Added back validate_current_config module parameter
as many systems still don't support fuses.
11. If all F's are read back for a regop in ip_readl(),
return -ENODEV.
There is a corresponding patch to update the python scripts
that generated many of the C and header files.
Bug 4287384
Change-Id: I8e14b0165dfa1abb9f5e04de577a41f0eb278246
Signed-off-by: Vishal Aslot <vaslot@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/3134365
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: Eric Lu <ericlu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
85 lines
3.8 KiB
C
85 lines
3.8 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/* SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
* to deal in the Software without restriction, including without limitation
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
* DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
|
|
#ifndef TH500_HWPM_INTERNAL_H
|
|
#define TH500_HWPM_INTERNAL_H
|
|
|
|
#include <hal/th500/soc/ip/mss_channel/th500_mss_channel.h>
|
|
#include <hal/th500/soc/ip/rtr/th500_rtr.h>
|
|
#include <hal/th500/soc/ip/pma/th500_pma.h>
|
|
#include <hal/th500/soc/ip/c2c/th500_c2c.h>
|
|
#include <hal/th500/soc/ip/smmu/th500_smmu.h>
|
|
#include <hal/th500/soc/ip/cl2/th500_cl2.h>
|
|
#include <hal/th500/soc/ip/c_nvlink/th500_nvlrx.h>
|
|
#include <hal/th500/soc/ip/c_nvlink/th500_nvltx.h>
|
|
#include <hal/th500/soc/ip/c_nvlink/th500_nvlctrl.h>
|
|
#include <hal/th500/soc/ip/mss_hub/th500_mss_hub.h>
|
|
#include <hal/th500/soc/ip/mcf_soc/th500_mcf_soc.h>
|
|
#include <hal/th500/soc/ip/mcf_c2c/th500_mcf_c2c.h>
|
|
#include <hal/th500/soc/ip/mcf_clink/th500_mcf_clink.h>
|
|
#include <hal/th500/soc/ip/mcf_core/th500_mcf_core.h>
|
|
#include <hal/th500/soc/ip/pcie/th500_pcie_xtlq.h>
|
|
#include <hal/th500/soc/ip/pcie/th500_pcie_xtlrc.h>
|
|
#include <hal/th500/soc/ip/pcie/th500_pcie_xalrc.h>
|
|
|
|
#define TH500_HWPM_ACTIVE_IP_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DEFINE_SOC_HWPM_ACTIVE_IP(TH500_HWPM_ACTIVE_IP_MAX)
|
|
|
|
#undef DEFINE_SOC_HWPM_ACTIVE_IP
|
|
#define DEFINE_SOC_HWPM_ACTIVE_IP(name) name
|
|
enum th500_hwpm_active_ips {
|
|
TH500_ACTIVE_IPS
|
|
};
|
|
#undef DEFINE_SOC_HWPM_ACTIVE_IP
|
|
|
|
struct tegra_soc_hwpm;
|
|
|
|
bool th500_hwpm_validate_secondary_hals(struct tegra_soc_hwpm *hwpm);
|
|
bool th500_hwpm_is_ip_active(struct tegra_soc_hwpm *hwpm,
|
|
u32 ip_index, u32 *config_ip_index);
|
|
bool th500_hwpm_is_resource_active(struct tegra_soc_hwpm *hwpm,
|
|
u32 res_index, u32 *config_ip_index);
|
|
|
|
u32 th500_get_rtr_int_idx(void);
|
|
u32 th500_get_ip_max_idx(void);
|
|
|
|
#endif /* TH500_HWPM_INTERNAL_H */
|