diff options
author | Bibek Basu <bbasu@nvidia.com> | 2014-07-03 14:02:40 +0530 |
---|---|---|
committer | Mandar Padmawar <mpadmawar@nvidia.com> | 2014-07-04 06:14:07 -0700 |
commit | f97127c812f2ec262497e775d59bc89ea9416141 (patch) | |
tree | 0ed7381f484422ec3626207ff10b15b9ffb31f8a /arch/arm/mach-tegra/board-laguna-power.c | |
parent | 90847b42d8ae22940787debfc4aca786ecffdc52 (diff) |
ARM: tegra13: laguna: move cl-dvfs to dt
Move cl-dvfs to DT for automatic voltage value
detection.
Bug 200017706
Change-Id: I3467c6e34648e6478b4929a47869ba71f0b251a0
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/434018
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-laguna-power.c')
-rw-r--r-- | arch/arm/mach-tegra/board-laguna-power.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-laguna-power.c b/arch/arm/mach-tegra/board-laguna-power.c index e3ba1ea0aee3..c705f346b225 100644 --- a/arch/arm/mach-tegra/board-laguna-power.c +++ b/arch/arm/mach-tegra/board-laguna-power.c @@ -130,8 +130,28 @@ static struct tegra_cl_dvfs_platform_data laguna_cl_dvfs_data = { .cfg_param = &laguna_cl_dvfs_param, }; +static const struct of_device_id dfll_of_match[] = { + { .compatible = "nvidia,tegra124-dfll", }, + { .compatible = "nvidia,tegra132-dfll", }, + { }, +}; + static int __init laguna_cl_dvfs_init(void) { + struct device_node *dn = of_find_matching_node(NULL, dfll_of_match); + + /* + * Laguna platforms maybe used with different DT variants. Some of them + * include DFLL data in DT, some - not. Check DT here, and continue with + * platform device registration only if DT DFLL node is not present. + */ + if (dn) { + bool available = of_device_is_available(dn); + of_node_put(dn); + if (available) + return 0; + } + fill_reg_map(); laguna_cl_dvfs_data.flags = TEGRA_CL_DVFS_DYN_OUTPUT_CFG; tegra_cl_dvfs_device.dev.platform_data = &laguna_cl_dvfs_data; |