From nobody Thu Oct 2 21:50:26 2025 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92E082EB5B1 for ; Thu, 11 Sep 2025 09:43:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757583822; cv=none; b=bDsq5AyZGlTx5ncgc9RGV6YhT8VUaiLk7W+WOB5u86B5umeuSe8eOWs1tsEzqLiEC6msGBuPRbHjA7KdYrJyhpu4UCSHG/9XWFYoZv9Z6KxKVMiPILzYDO3FICIPfowQxUPSMdXBK++6OlcrI5CkBilVzg7XXxFVKacaVXOajp8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757583822; c=relaxed/simple; bh=NsGEIgGjbOpROhUmLr+vi+i7gGp3+YQdgw+pRaV7CFw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JCkGogzRaG0VSG0mDKHOYIHqthji7xg5/6dlqO0Mtb8bEY11ic2S9IEv3gRNFqGr6/GJYrR9pi/xgFy0ST8KLmNtHJInOV9sQuopBDB1s5cZs5jh1At7b4JdrSrZYJmDIFH8UikX0yfsYQtXIYufONZ79YKmj8RrLl7GjFF4/hE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=E0PGyN7X; arc=none smtp.client-ip=209.85.221.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="E0PGyN7X" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-3e761e9c2ffso42461f8f.3 for ; Thu, 11 Sep 2025 02:43:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1757583819; x=1758188619; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=/EvFDcJgp1O+VKVo0SG7emVdOYaEBH1SQVuBhC1JrkI=; b=E0PGyN7XMv35WszBD3I/ooqbQIQenXIbaEX5m11JFf1ZSuHLDQu4n5RzkmqmqYMV2A ZycXPZk3hW2oR+3/9kuA9CK6p3omzILAzDMjQbFNRW8x2IhYhAbPjbZlE5wa0yQZ2c+a 8ps1vPTHFDqdRh8uzKzZ9ZObYriuFMC29PKyrpHbeYXEyjMoSihl5HsW6cfM/2ePjR1x fJUm4Bbn8xWtu0GJPHZPE0/Ck5dt1MoHW0vWAW9bVdZ5ebahijIMe4SiyOOA17AyOMFm C+50t6f8upxiQvLhMX5/f5xN2F1ZuYrZCKr7KvAPTTfwWUCRA9NtdLvGa8QN/hcdWEos Ddag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757583819; x=1758188619; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/EvFDcJgp1O+VKVo0SG7emVdOYaEBH1SQVuBhC1JrkI=; b=xTHAGoqdI9pE8OkWN9So+QHsHf8k7ZgyoIycuvcTSi4T1FCOQuQwncwmZFCtTctT2J rsI4Ci8hqU/KDMIZlapIu7Wn5a/JJ4hkaUiG4PM6F4NbfipIQsD2ArNqOrCnQknHPBRr hEXIViGBvnlVcXTt7PT1wXe+sAt7nv9JzjyKK1Jx10cu8mtwtjfDw2zibXw2pdXFVhYa KVtKaBA3NhIg3mSp/MGiSAQ56lL5IWVpaZnUANmP/3Jd3TlTVFTvZSXe6VKvmKZJNsw9 JfL98CpFzz0acxXKtZJeu6q5z4b9hFgEvpywfFNiTxu1XGQ0kLkqZGLnx31bfMcXGbnb FtbA== X-Gm-Message-State: AOJu0YwM8n+zgndN8vP1Bn7cPC5ei54BP8aLUBuTiiNEz/LWwTLcYjF5 vpdvv3ygWZds+iVV7j1JkJukPOwOwLZyT2k3LZq9QS4ONR2OkFrLK0ySeE43aNYUKQE= X-Gm-Gg: ASbGncuGerV+VTesKB+OLhCI4WxthcR0ZJX7PcbLJkPZVLJ+DijGoGNQK7EORitoIWk H4XpLKRg3egLagWTWDhUiIZyUDIP0z1HPwzHs07VO7I7grr43CzK9iM3L814ahpCTJsDJ5BD2J9 Zl15aySKwpZKVohG2N3TTMBfXhgpjtcUHdjvtCw4a1nwzi482DbWCKIxJa3Q7eBqvddGD/HfXmJ YyDB3wRbBwUrP1JydIDEl1M+j3qQMl8f4saUSoeg9CYvQ/uMxeWh1XLJfHPEomFRcZO73llhd3A 66uvZBf1J/AtG93nXMkiP+Pi1RFqxnhAxQyXic17H5APLjRd0fjEgTS1vJ1sdaWerPHzclYpyPZ M0Csgk5xKJVv1FIkkeuogrIFfTaMULbGV1eb/Va0= X-Google-Smtp-Source: AGHT+IFQATZ5uV9m+s4qitY14CNE6n5q3MaFIEeJl26/7kZH/FIZPFZHicuPgJZqEB4MJGjuy6zN4g== X-Received: by 2002:a05:6000:40de:b0:3e7:5f26:f1d9 with SMTP id ffacd0b85a97d-3e75f26f67bmr1055051f8f.3.1757583818669; Thu, 11 Sep 2025 02:43:38 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.123]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3e76078fe3bsm1759218f8f.28.2025.09.11.02.43.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Sep 2025 02:43:37 -0700 (PDT) From: Krzysztof Kozlowski Date: Thu, 11 Sep 2025 11:43:21 +0200 Subject: [PATCH v2 10/13] memory: tegra124-emc: Add the SoC model prefix to functions Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250911-memory-tegra-cleanup-v2-10-d08022ff2f85@linaro.org> References: <20250911-memory-tegra-cleanup-v2-0-d08022ff2f85@linaro.org> In-Reply-To: <20250911-memory-tegra-cleanup-v2-0-d08022ff2f85@linaro.org> To: Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, Aaron Kling , Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=10836; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=NsGEIgGjbOpROhUmLr+vi+i7gGp3+YQdgw+pRaV7CFw=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBowpm65lTN/m95NUl69MLbrPKF8ihpruNwpNKz8 fiQ2vCTH0qJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaMKZugAKCRDBN2bmhouD 1z0+D/9escPOZFJ19BWYtWVn3aglhmAMEVdHZT3+zxJ6q3lwjLKIKF7++w7zl9YaukUhXaD2hHa DBJlCK4tXh8V9aMduzuSA303Y1kInERZn00S5idUFyhr7aarF/dSs3RaT0AMOoLIw8GrJw5OXX7 s7A3NSjZNtMJqOXVUTfTVuJPfaSHtrKeoj20XuXPxhttLq9BsM+fn9k2gJ0O06qGh2zzdv6grrM PoSoLndwFmoRtTm/3eoRegAl8Pa4fGuNGJXrVom2OwZ2KciX50+GCAX5/HOmQCbpr9lWSVa1A3U P7PagFutwGLIaiZWQCAIngr7l5293czb3DNhGhom2eBLuC1/mHFMZ6oOwWchYw8l1wr8C7eSZtl EgHpqBG9oh0S2QjXtV5dhf+zlVoWcw2kai8qWKa4E6HetUy1YtZRf7YSCfB54zxcTg96tNMSCjJ ICmQB7OgCrPRhvD+5KmffvFRy1/GGAFi4EUmjWPwtMKNOdJ0OsOBEglaEgn2ZR3HT50e48MSqvm H/8tnh6OAX/AH5hxcOlmKR++OeRTvjfoRztB9/3WaiQSue05YkbsMLOgJGdymrNQYk9klsDnzQL vN/wNSBHisrwtHm3fxYYYlQWTUDUgkPLcUYKEvyUtHf9d5JSm4Xj/nWs8/Cumx8JOE5vMSPZ3f2 O4UWhtluHNCwX3A== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Replace "tegra_emc" with "tegra124_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 --- drivers/memory/tegra/tegra124-emc.c | 98 ++++++++++++++++++---------------= ---- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/teg= ra124-emc.c index f4d703103d9ca155eca92331ee762cecd4e01302..9978ff911c4790b30423064c8fe= 0d3d53e8efcef 100644 --- a/drivers/memory/tegra/tegra124-emc.c +++ b/drivers/memory/tegra/tegra124-emc.c @@ -571,8 +571,8 @@ static void emc_seq_wait_clkchange(struct tegra_emc *em= c) dev_err(emc->dev, "clock change timed out\n"); } =20 -static struct emc_timing *tegra_emc_find_timing(struct tegra_emc *emc, - unsigned long rate) +static struct emc_timing *tegra124_emc_find_timing(struct tegra_emc *emc, + unsigned long rate) { struct emc_timing *timing =3D NULL; unsigned int i; @@ -592,10 +592,10 @@ static struct emc_timing *tegra_emc_find_timing(struc= t tegra_emc *emc, return timing; } =20 -static int tegra_emc_prepare_timing_change(struct tegra_emc *emc, - unsigned long rate) +static int tegra124_emc_prepare_timing_change(struct tegra_emc *emc, + unsigned long rate) { - struct emc_timing *timing =3D tegra_emc_find_timing(emc, rate); + struct emc_timing *timing =3D tegra124_emc_find_timing(emc, rate); struct emc_timing *last =3D &emc->last_timing; enum emc_dll_change dll_change; unsigned int pre_wait =3D 0; @@ -820,10 +820,10 @@ static int tegra_emc_prepare_timing_change(struct teg= ra_emc *emc, return 0; } =20 -static void tegra_emc_complete_timing_change(struct tegra_emc *emc, - unsigned long rate) +static void tegra124_emc_complete_timing_change(struct tegra_emc *emc, + unsigned long rate) { - struct emc_timing *timing =3D tegra_emc_find_timing(emc, rate); + struct emc_timing *timing =3D tegra124_emc_find_timing(emc, rate); struct emc_timing *last =3D &emc->last_timing; u32 val; =20 @@ -986,8 +986,8 @@ static int cmp_timings(const void *_a, const void *_b) return 1; } =20 -static int tegra_emc_load_timings_from_dt(struct tegra_emc *emc, - struct device_node *node) +static int tegra124_emc_load_timings_from_dt(struct tegra_emc *emc, + struct device_node *node) { int child_count =3D of_get_child_count(node); struct emc_timing *timing; @@ -1015,15 +1015,15 @@ static int tegra_emc_load_timings_from_dt(struct te= gra_emc *emc, return 0; } =20 -static const struct of_device_id tegra_emc_of_match[] =3D { +static const struct of_device_id tegra124_emc_of_match[] =3D { { .compatible =3D "nvidia,tegra124-emc" }, { .compatible =3D "nvidia,tegra132-emc" }, {} }; -MODULE_DEVICE_TABLE(of, tegra_emc_of_match); +MODULE_DEVICE_TABLE(of, tegra124_emc_of_match); =20 static struct device_node * -tegra_emc_find_node_by_ram_code(struct device_node *node, u32 ram_code) +tegra124_emc_find_node_by_ram_code(struct device_node *node, u32 ram_code) { struct device_node *np; int err; @@ -1041,7 +1041,7 @@ tegra_emc_find_node_by_ram_code(struct device_node *n= ode, u32 ram_code) return NULL; } =20 -static void tegra_emc_rate_requests_init(struct tegra_emc *emc) +static void tegra124_emc_rate_requests_init(struct tegra_emc *emc) { unsigned int i; =20 @@ -1143,7 +1143,7 @@ static int emc_set_max_rate(struct tegra_emc *emc, un= signed long rate, * valid range. */ =20 -static bool tegra_emc_validate_rate(struct tegra_emc *emc, unsigned long r= ate) +static bool tegra124_emc_validate_rate(struct tegra_emc *emc, unsigned lon= g rate) { unsigned int i; =20 @@ -1154,8 +1154,8 @@ static bool tegra_emc_validate_rate(struct tegra_emc = *emc, unsigned long rate) return false; } =20 -static int tegra_emc_debug_available_rates_show(struct seq_file *s, - void *data) +static int tegra124_emc_debug_available_rates_show(struct seq_file *s, + void *data) { struct tegra_emc *emc =3D s->private; const char *prefix =3D ""; @@ -1171,9 +1171,9 @@ static int tegra_emc_debug_available_rates_show(struc= t seq_file *s, return 0; } =20 -DEFINE_SHOW_ATTRIBUTE(tegra_emc_debug_available_rates); +DEFINE_SHOW_ATTRIBUTE(tegra124_emc_debug_available_rates); =20 -static int tegra_emc_debug_min_rate_get(void *data, u64 *rate) +static int tegra124_emc_debug_min_rate_get(void *data, u64 *rate) { struct tegra_emc *emc =3D data; =20 @@ -1182,12 +1182,12 @@ static int tegra_emc_debug_min_rate_get(void *data,= u64 *rate) return 0; } =20 -static int tegra_emc_debug_min_rate_set(void *data, u64 rate) +static int tegra124_emc_debug_min_rate_set(void *data, u64 rate) { struct tegra_emc *emc =3D data; int err; =20 - if (!tegra_emc_validate_rate(emc, rate)) + if (!tegra124_emc_validate_rate(emc, rate)) return -EINVAL; =20 err =3D emc_set_min_rate(emc, rate, EMC_RATE_DEBUG); @@ -1199,11 +1199,11 @@ static int tegra_emc_debug_min_rate_set(void *data,= u64 rate) return 0; } =20 -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(tegra124_emc_debug_min_rate_fops, + tegra124_emc_debug_min_rate_get, + tegra124_emc_debug_min_rate_set, "%llu\n"); =20 -static int tegra_emc_debug_max_rate_get(void *data, u64 *rate) +static int tegra124_emc_debug_max_rate_get(void *data, u64 *rate) { struct tegra_emc *emc =3D data; =20 @@ -1212,12 +1212,12 @@ static int tegra_emc_debug_max_rate_get(void *data,= u64 *rate) return 0; } =20 -static int tegra_emc_debug_max_rate_set(void *data, u64 rate) +static int tegra124_emc_debug_max_rate_set(void *data, u64 rate) { struct tegra_emc *emc =3D data; int err; =20 - if (!tegra_emc_validate_rate(emc, rate)) + if (!tegra124_emc_validate_rate(emc, rate)) return -EINVAL; =20 err =3D emc_set_max_rate(emc, rate, EMC_RATE_DEBUG); @@ -1229,9 +1229,9 @@ static int tegra_emc_debug_max_rate_set(void *data, u= 64 rate) return 0; } =20 -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(tegra124_emc_debug_max_rate_fops, + tegra124_emc_debug_max_rate_get, + tegra124_emc_debug_max_rate_set, "%llu\n"); =20 static void emc_debugfs_init(struct device *dev, struct tegra_emc *emc) { @@ -1266,11 +1266,11 @@ static void emc_debugfs_init(struct device *dev, st= ruct tegra_emc *emc) emc->debugfs.root =3D debugfs_create_dir("emc", NULL); =20 debugfs_create_file("available_rates", 0444, emc->debugfs.root, emc, - &tegra_emc_debug_available_rates_fops); + &tegra124_emc_debug_available_rates_fops); debugfs_create_file("min_rate", 0644, emc->debugfs.root, - emc, &tegra_emc_debug_min_rate_fops); + emc, &tegra124_emc_debug_min_rate_fops); debugfs_create_file("max_rate", 0644, emc->debugfs.root, - emc, &tegra_emc_debug_max_rate_fops); + emc, &tegra124_emc_debug_max_rate_fops); } =20 static inline struct tegra_emc * @@ -1334,7 +1334,7 @@ static int emc_icc_set(struct icc_node *src, struct i= cc_node *dst) return 0; } =20 -static int tegra_emc_interconnect_init(struct tegra_emc *emc) +static int tegra124_emc_interconnect_init(struct tegra_emc *emc) { const struct tegra_mc_soc *soc =3D emc->mc->soc; struct icc_node *node; @@ -1383,7 +1383,7 @@ static int tegra_emc_interconnect_init(struct tegra_e= mc *emc) return dev_err_probe(emc->dev, err, "failed to initialize ICC\n"); } =20 -static int tegra_emc_opp_table_init(struct tegra_emc *emc) +static int tegra124_emc_opp_table_init(struct tegra_emc *emc) { u32 hw_version =3D BIT(tegra_sku_info.soc_speedo_id); int opp_token, err; @@ -1425,12 +1425,12 @@ static int tegra_emc_opp_table_init(struct tegra_em= c *emc) return err; } =20 -static void devm_tegra_emc_unset_callback(void *data) +static void devm_tegra124_emc_unset_callback(void *data) { tegra124_clk_set_emc_callbacks(NULL, NULL); } =20 -static int tegra_emc_probe(struct platform_device *pdev) +static int tegra124_emc_probe(struct platform_device *pdev) { struct device_node *np; struct tegra_emc *emc; @@ -1454,9 +1454,9 @@ static int tegra_emc_probe(struct platform_device *pd= ev) =20 ram_code =3D tegra_read_ram_code(); =20 - np =3D tegra_emc_find_node_by_ram_code(pdev->dev.of_node, ram_code); + np =3D tegra124_emc_find_node_by_ram_code(pdev->dev.of_node, ram_code); if (np) { - err =3D tegra_emc_load_timings_from_dt(emc, np); + err =3D tegra124_emc_load_timings_from_dt(emc, np); of_node_put(np); if (err) return err; @@ -1470,10 +1470,10 @@ static int tegra_emc_probe(struct platform_device *= pdev) =20 platform_set_drvdata(pdev, emc); =20 - tegra124_clk_set_emc_callbacks(tegra_emc_prepare_timing_change, - tegra_emc_complete_timing_change); + tegra124_clk_set_emc_callbacks(tegra124_emc_prepare_timing_change, + tegra124_emc_complete_timing_change); =20 - err =3D devm_add_action_or_reset(&pdev->dev, devm_tegra_emc_unset_callbac= k, + err =3D devm_add_action_or_reset(&pdev->dev, devm_tegra124_emc_unset_call= back, NULL); if (err) return err; @@ -1483,16 +1483,16 @@ static int tegra_emc_probe(struct platform_device *= pdev) return dev_err_probe(&pdev->dev, PTR_ERR(emc->clk), "failed to get EMC clock\n"); =20 - err =3D tegra_emc_opp_table_init(emc); + err =3D tegra124_emc_opp_table_init(emc); if (err) return err; =20 - tegra_emc_rate_requests_init(emc); + tegra124_emc_rate_requests_init(emc); =20 if (IS_ENABLED(CONFIG_DEBUG_FS)) emc_debugfs_init(&pdev->dev, emc); =20 - tegra_emc_interconnect_init(emc); + tegra124_emc_interconnect_init(emc); =20 /* * Don't allow the kernel module to be unloaded. Unloading adds some @@ -1504,16 +1504,16 @@ static int tegra_emc_probe(struct platform_device *= pdev) return 0; }; =20 -static struct platform_driver tegra_emc_driver =3D { - .probe =3D tegra_emc_probe, +static struct platform_driver tegra124_emc_driver =3D { + .probe =3D tegra124_emc_probe, .driver =3D { .name =3D "tegra-emc", - .of_match_table =3D tegra_emc_of_match, + .of_match_table =3D tegra124_emc_of_match, .suppress_bind_attrs =3D true, .sync_state =3D icc_sync_state, }, }; -module_platform_driver(tegra_emc_driver); +module_platform_driver(tegra124_emc_driver); =20 MODULE_AUTHOR("Mikko Perttunen "); MODULE_DESCRIPTION("NVIDIA Tegra124 EMC driver"); --=20 2.48.1