|
1 | 1 | // SPDX-License-Identifier: GPL-2.0-only
|
| 2 | +// SPDX-FileCopyrightText: Copyright (c) 2022-2025 NVIDIA CORPORATION. All rights reserved. |
2 | 3 | //
|
3 | 4 | // tegra186_asrc.c - Tegra186 ASRC driver
|
4 |
| -// |
5 |
| -// Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. |
6 | 5 |
|
7 | 6 | #include <linux/clk.h>
|
8 | 7 | #include <linux/delay.h>
|
@@ -99,7 +98,7 @@ static int tegra186_asrc_runtime_resume(struct device *dev)
|
99 | 98 | * sync is done after this to restore other settings.
|
100 | 99 | */
|
101 | 100 | regmap_write(asrc->regmap, TEGRA186_ASRC_GLOBAL_SCRATCH_ADDR,
|
102 |
| - TEGRA186_ASRC_ARAM_START_ADDR); |
| 101 | + asrc->soc_data->aram_start_addr); |
103 | 102 | regmap_write(asrc->regmap, TEGRA186_ASRC_GLOBAL_ENB,
|
104 | 103 | TEGRA186_ASRC_GLOBAL_EN);
|
105 | 104 |
|
@@ -954,8 +953,17 @@ static const struct regmap_config tegra186_asrc_regmap_config = {
|
954 | 953 | .cache_type = REGCACHE_FLAT,
|
955 | 954 | };
|
956 | 955 |
|
| 956 | +static const struct tegra_asrc_soc_data soc_data_tegra186 = { |
| 957 | + .aram_start_addr = TEGRA186_ASRC_ARAM_START_ADDR, |
| 958 | +}; |
| 959 | + |
| 960 | +static const struct tegra_asrc_soc_data soc_data_tegra264 = { |
| 961 | + .aram_start_addr = TEGRA264_ASRC_ARAM_START_ADDR, |
| 962 | +}; |
| 963 | + |
957 | 964 | static const struct of_device_id tegra186_asrc_of_match[] = {
|
958 |
| - { .compatible = "nvidia,tegra186-asrc" }, |
| 965 | + { .compatible = "nvidia,tegra186-asrc", .data = &soc_data_tegra186 }, |
| 966 | + { .compatible = "nvidia,tegra264-asrc", .data = &soc_data_tegra264 }, |
959 | 967 | {},
|
960 | 968 | };
|
961 | 969 | MODULE_DEVICE_TABLE(of, tegra186_asrc_of_match);
|
@@ -985,6 +993,8 @@ static int tegra186_asrc_platform_probe(struct platform_device *pdev)
|
985 | 993 | return PTR_ERR(asrc->regmap);
|
986 | 994 | }
|
987 | 995 |
|
| 996 | + asrc->soc_data = of_device_get_match_data(&pdev->dev); |
| 997 | + |
988 | 998 | regcache_cache_only(asrc->regmap, true);
|
989 | 999 |
|
990 | 1000 | regmap_write(asrc->regmap, TEGRA186_ASRC_GLOBAL_CFG,
|
|
0 commit comments