mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-22 17:30:40 +03:00
tegra: hwpm: add support for next2 chip
- add next2 init chip info logic - add next2 device id - Update logic of chip info functions to support next2 chip. Modify the functions to use formal "if defined()" macro instead of "ifdef". - Execute support-soc-tools property only on silicon platform - Separate OOT module_init symbol from postcore_init call on previos kernel. Jira THWPM-64 Change-Id: I408c99ff84507a685db6195cb71364d939931d53 Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2757457 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Seema Khowala <seemaj@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
170c9552c8
commit
5e116ff176
@@ -35,6 +35,9 @@ static const struct of_device_id tegra_soc_hwpm_of_match[] = {
|
||||
},
|
||||
#ifdef CONFIG_TEGRA_NEXT1_HWPM
|
||||
#include <os/linux/next1_driver.h>
|
||||
#endif
|
||||
#ifdef CONFIG_TEGRA_NEXT2_HWPM
|
||||
#include <os/linux/next2_driver.h>
|
||||
#endif
|
||||
{ },
|
||||
};
|
||||
@@ -57,6 +60,10 @@ static bool tegra_hwpm_read_support_soc_tools_prop(struct platform_device *pdev)
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
bool allow_node = of_property_read_bool(np, "support-soc-tools");
|
||||
|
||||
if (!tegra_hwpm_is_platform_silicon()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!allow_node) {
|
||||
tegra_hwpm_err(NULL, "support-soc-tools is absent");
|
||||
}
|
||||
@@ -263,7 +270,11 @@ static void __exit tegra_hwpm_exit(void)
|
||||
platform_driver_unregister(&tegra_soc_hwpm_pdrv);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_TEGRA_HWPM_OOT)
|
||||
module_init(tegra_hwpm_init);
|
||||
#else
|
||||
postcore_initcall(tegra_hwpm_init);
|
||||
#endif
|
||||
module_exit(tegra_hwpm_exit);
|
||||
|
||||
MODULE_ALIAS(TEGRA_SOC_HWPM_MODULE_NAME);
|
||||
|
||||
Reference in New Issue
Block a user