From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Krzysztof Kozlowski <krzk@kernel.org>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
Aaron Kling <webgeek1234@gmail.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH v2 13/13] memory: tegra30-emc: Add the SoC model prefix to functions
Date: Thu, 11 Sep 2025 11:43:24 +0200 [thread overview]
Message-ID: <20250911-memory-tegra-cleanup-v2-13-d08022ff2f85@linaro.org> (raw)
In-Reply-To: <20250911-memory-tegra-cleanup-v2-0-d08022ff2f85@linaro.org>
Replace "tegra_emc" with "tegra30_emc" in all functions to:
1. Avoid name clashing with other Tegra EMC drivers which makes it
easier to jump to function definitions,
2. Decode the calltraces a bit easier,
3. Unify with other Tegra MC and EMC drivers, which use the SoC model
prefixes.
No functional impact.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/memory/tegra/tegra30-emc.c | 90 +++++++++++++++++++-------------------
1 file changed, 45 insertions(+), 45 deletions(-)
diff --git a/drivers/memory/tegra/tegra30-emc.c b/drivers/memory/tegra/tegra30-emc.c
index cca386af423e9647266878ce6cd1bcec09c8eba4..914116d8ec16d0d52180c7fadd1843adc139ceaf 100644
--- a/drivers/memory/tegra/tegra30-emc.c
+++ b/drivers/memory/tegra/tegra30-emc.c
@@ -413,7 +413,7 @@ static int emc_seq_update_timing(struct tegra_emc *emc)
return 0;
}
-static irqreturn_t tegra_emc_isr(int irq, void *data)
+static irqreturn_t tegra30_emc_isr(int irq, void *data)
{
struct tegra_emc *emc = data;
u32 intmask = EMC_REFRESH_OVERFLOW_INT;
@@ -1228,7 +1228,7 @@ static long emc_round_rate(unsigned long rate,
return timing->rate;
}
-static void tegra_emc_rate_requests_init(struct tegra_emc *emc)
+static void tegra30_emc_rate_requests_init(struct tegra_emc *emc)
{
unsigned int i;
@@ -1330,7 +1330,7 @@ static int emc_set_max_rate(struct tegra_emc *emc, unsigned long rate,
* valid range.
*/
-static bool tegra_emc_validate_rate(struct tegra_emc *emc, unsigned long rate)
+static bool tegra30_emc_validate_rate(struct tegra_emc *emc, unsigned long rate)
{
unsigned int i;
@@ -1341,7 +1341,7 @@ static bool tegra_emc_validate_rate(struct tegra_emc *emc, unsigned long rate)
return false;
}
-static int tegra_emc_debug_available_rates_show(struct seq_file *s, void *data)
+static int tegra30_emc_debug_available_rates_show(struct seq_file *s, void *data)
{
struct tegra_emc *emc = s->private;
const char *prefix = "";
@@ -1356,9 +1356,9 @@ static int tegra_emc_debug_available_rates_show(struct seq_file *s, void *data)
return 0;
}
-DEFINE_SHOW_ATTRIBUTE(tegra_emc_debug_available_rates);
+DEFINE_SHOW_ATTRIBUTE(tegra30_emc_debug_available_rates);
-static int tegra_emc_debug_min_rate_get(void *data, u64 *rate)
+static int tegra30_emc_debug_min_rate_get(void *data, u64 *rate)
{
struct tegra_emc *emc = data;
@@ -1367,12 +1367,12 @@ static int tegra_emc_debug_min_rate_get(void *data, u64 *rate)
return 0;
}
-static int tegra_emc_debug_min_rate_set(void *data, u64 rate)
+static int tegra30_emc_debug_min_rate_set(void *data, u64 rate)
{
struct tegra_emc *emc = data;
int err;
- if (!tegra_emc_validate_rate(emc, rate))
+ if (!tegra30_emc_validate_rate(emc, rate))
return -EINVAL;
err = emc_set_min_rate(emc, rate, EMC_RATE_DEBUG);
@@ -1384,11 +1384,11 @@ static int tegra_emc_debug_min_rate_set(void *data, u64 rate)
return 0;
}
-DEFINE_DEBUGFS_ATTRIBUTE(tegra_emc_debug_min_rate_fops,
- tegra_emc_debug_min_rate_get,
- tegra_emc_debug_min_rate_set, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(tegra30_emc_debug_min_rate_fops,
+ tegra30_emc_debug_min_rate_get,
+ tegra30_emc_debug_min_rate_set, "%llu\n");
-static int tegra_emc_debug_max_rate_get(void *data, u64 *rate)
+static int tegra30_emc_debug_max_rate_get(void *data, u64 *rate)
{
struct tegra_emc *emc = data;
@@ -1397,12 +1397,12 @@ static int tegra_emc_debug_max_rate_get(void *data, u64 *rate)
return 0;
}
-static int tegra_emc_debug_max_rate_set(void *data, u64 rate)
+static int tegra30_emc_debug_max_rate_set(void *data, u64 rate)
{
struct tegra_emc *emc = data;
int err;
- if (!tegra_emc_validate_rate(emc, rate))
+ if (!tegra30_emc_validate_rate(emc, rate))
return -EINVAL;
err = emc_set_max_rate(emc, rate, EMC_RATE_DEBUG);
@@ -1414,11 +1414,11 @@ static int tegra_emc_debug_max_rate_set(void *data, u64 rate)
return 0;
}
-DEFINE_DEBUGFS_ATTRIBUTE(tegra_emc_debug_max_rate_fops,
- tegra_emc_debug_max_rate_get,
- tegra_emc_debug_max_rate_set, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(tegra30_emc_debug_max_rate_fops,
+ tegra30_emc_debug_max_rate_get,
+ tegra30_emc_debug_max_rate_set, "%llu\n");
-static void tegra_emc_debugfs_init(struct tegra_emc *emc)
+static void tegra30_emc_debugfs_init(struct tegra_emc *emc)
{
struct device *dev = emc->dev;
unsigned int i;
@@ -1451,11 +1451,11 @@ static void tegra_emc_debugfs_init(struct tegra_emc *emc)
emc->debugfs.root = debugfs_create_dir("emc", NULL);
debugfs_create_file("available_rates", 0444, emc->debugfs.root,
- emc, &tegra_emc_debug_available_rates_fops);
+ emc, &tegra30_emc_debug_available_rates_fops);
debugfs_create_file("min_rate", 0644, emc->debugfs.root,
- emc, &tegra_emc_debug_min_rate_fops);
+ emc, &tegra30_emc_debug_min_rate_fops);
debugfs_create_file("max_rate", 0644, emc->debugfs.root,
- emc, &tegra_emc_debug_max_rate_fops);
+ emc, &tegra30_emc_debug_max_rate_fops);
}
static inline struct tegra_emc *
@@ -1518,7 +1518,7 @@ static int emc_icc_set(struct icc_node *src, struct icc_node *dst)
return 0;
}
-static int tegra_emc_interconnect_init(struct tegra_emc *emc)
+static int tegra30_emc_interconnect_init(struct tegra_emc *emc)
{
const struct tegra_mc_soc *soc = emc->mc->soc;
struct icc_node *node;
@@ -1567,25 +1567,25 @@ static int tegra_emc_interconnect_init(struct tegra_emc *emc)
return dev_err_probe(emc->dev, err, "failed to initialize ICC\n");
}
-static void devm_tegra_emc_unset_callback(void *data)
+static void devm_tegra30_emc_unset_callback(void *data)
{
tegra20_clk_set_emc_round_callback(NULL, NULL);
}
-static void devm_tegra_emc_unreg_clk_notifier(void *data)
+static void devm_tegra30_emc_unreg_clk_notifier(void *data)
{
struct tegra_emc *emc = data;
clk_notifier_unregister(emc->clk, &emc->clk_nb);
}
-static int tegra_emc_init_clk(struct tegra_emc *emc)
+static int tegra30_emc_init_clk(struct tegra_emc *emc)
{
int err;
tegra20_clk_set_emc_round_callback(emc_round_rate, emc);
- err = devm_add_action_or_reset(emc->dev, devm_tegra_emc_unset_callback,
+ err = devm_add_action_or_reset(emc->dev, devm_tegra30_emc_unset_callback,
NULL);
if (err)
return err;
@@ -1600,14 +1600,14 @@ static int tegra_emc_init_clk(struct tegra_emc *emc)
return dev_err_probe(emc->dev, err, "failed to register clk notifier\n");
err = devm_add_action_or_reset(emc->dev,
- devm_tegra_emc_unreg_clk_notifier, emc);
+ devm_tegra30_emc_unreg_clk_notifier, emc);
if (err)
return err;
return 0;
}
-static int tegra_emc_probe(struct platform_device *pdev)
+static int tegra30_emc_probe(struct platform_device *pdev)
{
struct tegra_core_opp_params opp_params = {};
struct device_node *np;
@@ -1648,12 +1648,12 @@ static int tegra_emc_probe(struct platform_device *pdev)
emc->irq = err;
- err = devm_request_irq(&pdev->dev, emc->irq, tegra_emc_isr, 0,
+ err = devm_request_irq(&pdev->dev, emc->irq, tegra30_emc_isr, 0,
dev_name(&pdev->dev), emc);
if (err)
return dev_err_probe(&pdev->dev, err, "failed to request irq\n");
- err = tegra_emc_init_clk(emc);
+ err = tegra30_emc_init_clk(emc);
if (err)
return err;
@@ -1664,9 +1664,9 @@ static int tegra_emc_probe(struct platform_device *pdev)
return err;
platform_set_drvdata(pdev, emc);
- tegra_emc_rate_requests_init(emc);
- tegra_emc_debugfs_init(emc);
- tegra_emc_interconnect_init(emc);
+ tegra30_emc_rate_requests_init(emc);
+ tegra30_emc_debugfs_init(emc);
+ tegra30_emc_interconnect_init(emc);
/*
* Don't allow the kernel module to be unloaded. Unloading adds some
@@ -1678,7 +1678,7 @@ static int tegra_emc_probe(struct platform_device *pdev)
return 0;
}
-static int tegra_emc_suspend(struct device *dev)
+static int tegra30_emc_suspend(struct device *dev)
{
struct tegra_emc *emc = dev_get_drvdata(dev);
int err;
@@ -1699,7 +1699,7 @@ static int tegra_emc_suspend(struct device *dev)
return 0;
}
-static int tegra_emc_resume(struct device *dev)
+static int tegra30_emc_resume(struct device *dev)
{
struct tegra_emc *emc = dev_get_drvdata(dev);
@@ -1711,28 +1711,28 @@ static int tegra_emc_resume(struct device *dev)
return 0;
}
-static const struct dev_pm_ops tegra_emc_pm_ops = {
- .suspend = tegra_emc_suspend,
- .resume = tegra_emc_resume,
+static const struct dev_pm_ops tegra30_emc_pm_ops = {
+ .suspend = tegra30_emc_suspend,
+ .resume = tegra30_emc_resume,
};
-static const struct of_device_id tegra_emc_of_match[] = {
+static const struct of_device_id tegra30_emc_of_match[] = {
{ .compatible = "nvidia,tegra30-emc", },
{},
};
-MODULE_DEVICE_TABLE(of, tegra_emc_of_match);
+MODULE_DEVICE_TABLE(of, tegra30_emc_of_match);
-static struct platform_driver tegra_emc_driver = {
- .probe = tegra_emc_probe,
+static struct platform_driver tegra30_emc_driver = {
+ .probe = tegra30_emc_probe,
.driver = {
.name = "tegra30-emc",
- .of_match_table = tegra_emc_of_match,
- .pm = &tegra_emc_pm_ops,
+ .of_match_table = tegra30_emc_of_match,
+ .pm = &tegra30_emc_pm_ops,
.suppress_bind_attrs = true,
.sync_state = icc_sync_state,
},
};
-module_platform_driver(tegra_emc_driver);
+module_platform_driver(tegra30_emc_driver);
MODULE_AUTHOR("Dmitry Osipenko <digetx@gmail.com>");
MODULE_DESCRIPTION("NVIDIA Tegra30 EMC driver");
--
2.48.1
next prev parent reply other threads:[~2025-09-11 9:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 9:43 [PATCH v2 00/13] memory: tegra: Several cleanups Krzysztof Kozlowski
2025-09-11 9:43 ` [PATCH v2 01/13] memory: tegra124-emc: Simplify return of emc_init() Krzysztof Kozlowski
2025-09-17 13:12 ` Jon Hunter
2025-09-11 9:43 ` [PATCH v2 02/13] memory: tegra124-emc: Do not print error on icc_node_create() failure Krzysztof Kozlowski
2025-09-11 9:43 ` [PATCH v2 03/13] memory: tegra186-emc: " Krzysztof Kozlowski
2025-09-11 9:43 ` [PATCH v2 04/13] memory: tegra20-emc: " Krzysztof Kozlowski
2025-09-11 9:43 ` [PATCH v2 05/13] memory: tegra30-emc: " Krzysztof Kozlowski
2025-09-11 9:43 ` [PATCH v2 06/13] memory: tegra30-emc: Simplify and handle deferred probe with dev_err_probe() Krzysztof Kozlowski
2025-09-11 9:43 ` [PATCH v2 07/13] memory: tegra20-emc: " Krzysztof Kozlowski
2025-09-11 9:43 ` [PATCH v2 08/13] memory: tegra186-emc: " Krzysztof Kozlowski
2025-09-11 9:43 ` [PATCH v2 09/13] memory: tegra124-emc: " Krzysztof Kozlowski
2025-09-11 9:43 ` [PATCH v2 10/13] memory: tegra124-emc: Add the SoC model prefix to functions Krzysztof Kozlowski
2025-09-11 9:43 ` [PATCH v2 11/13] memory: tegra186-emc: " Krzysztof Kozlowski
2025-09-11 9:43 ` [PATCH v2 12/13] memory: tegra20-emc: " Krzysztof Kozlowski
2025-09-11 9:43 ` Krzysztof Kozlowski [this message]
2025-09-17 13:13 ` [PATCH v2 00/13] memory: tegra: Several cleanups Jon Hunter
2025-10-13 0:23 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250911-memory-tegra-cleanup-v2-13-d08022ff2f85@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=jonathanh@nvidia.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=webgeek1234@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).