hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/memory/tegra/tegra20.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
74 */
85
96 #include <dt-bindings/memory/tegra20-mc.h>
....@@ -198,7 +195,7 @@
198195 TEGRA20_MC_RESET(VI, 0x100, 0x178, 0x104, 14),
199196 };
200197
201
-static int terga20_mc_hotreset_assert(struct tegra_mc *mc,
198
+static int tegra20_mc_hotreset_assert(struct tegra_mc *mc,
202199 const struct tegra_mc_reset *rst)
203200 {
204201 unsigned long flags;
....@@ -214,7 +211,7 @@
214211 return 0;
215212 }
216213
217
-static int terga20_mc_hotreset_deassert(struct tegra_mc *mc,
214
+static int tegra20_mc_hotreset_deassert(struct tegra_mc *mc,
218215 const struct tegra_mc_reset *rst)
219216 {
220217 unsigned long flags;
....@@ -230,7 +227,7 @@
230227 return 0;
231228 }
232229
233
-static int terga20_mc_block_dma(struct tegra_mc *mc,
230
+static int tegra20_mc_block_dma(struct tegra_mc *mc,
234231 const struct tegra_mc_reset *rst)
235232 {
236233 unsigned long flags;
....@@ -246,19 +243,19 @@
246243 return 0;
247244 }
248245
249
-static bool terga20_mc_dma_idling(struct tegra_mc *mc,
246
+static bool tegra20_mc_dma_idling(struct tegra_mc *mc,
250247 const struct tegra_mc_reset *rst)
251248 {
252249 return mc_readl(mc, rst->status) == 0;
253250 }
254251
255
-static int terga20_mc_reset_status(struct tegra_mc *mc,
252
+static int tegra20_mc_reset_status(struct tegra_mc *mc,
256253 const struct tegra_mc_reset *rst)
257254 {
258255 return (mc_readl(mc, rst->reset) & BIT(rst->bit)) == 0;
259256 }
260257
261
-static int terga20_mc_unblock_dma(struct tegra_mc *mc,
258
+static int tegra20_mc_unblock_dma(struct tegra_mc *mc,
262259 const struct tegra_mc_reset *rst)
263260 {
264261 unsigned long flags;
....@@ -274,13 +271,13 @@
274271 return 0;
275272 }
276273
277
-const struct tegra_mc_reset_ops terga20_mc_reset_ops = {
278
- .hotreset_assert = terga20_mc_hotreset_assert,
279
- .hotreset_deassert = terga20_mc_hotreset_deassert,
280
- .block_dma = terga20_mc_block_dma,
281
- .dma_idling = terga20_mc_dma_idling,
282
- .unblock_dma = terga20_mc_unblock_dma,
283
- .reset_status = terga20_mc_reset_status,
274
+static const struct tegra_mc_reset_ops tegra20_mc_reset_ops = {
275
+ .hotreset_assert = tegra20_mc_hotreset_assert,
276
+ .hotreset_deassert = tegra20_mc_hotreset_deassert,
277
+ .block_dma = tegra20_mc_block_dma,
278
+ .dma_idling = tegra20_mc_dma_idling,
279
+ .unblock_dma = tegra20_mc_unblock_dma,
280
+ .reset_status = tegra20_mc_reset_status,
284281 };
285282
286283 const struct tegra_mc_soc tegra20_mc_soc = {
....@@ -290,7 +287,7 @@
290287 .client_id_mask = 0x3f,
291288 .intmask = MC_INT_SECURITY_VIOLATION | MC_INT_INVALID_GART_PAGE |
292289 MC_INT_DECERR_EMEM,
293
- .reset_ops = &terga20_mc_reset_ops,
290
+ .reset_ops = &tegra20_mc_reset_ops,
294291 .resets = tegra20_mc_resets,
295292 .num_resets = ARRAY_SIZE(tegra20_mc_resets),
296293 };