| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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. |
|---|
| 7 | 4 | */ |
|---|
| 8 | 5 | |
|---|
| 9 | 6 | #include <dt-bindings/memory/tegra20-mc.h> |
|---|
| .. | .. |
|---|
| 198 | 195 | TEGRA20_MC_RESET(VI, 0x100, 0x178, 0x104, 14), |
|---|
| 199 | 196 | }; |
|---|
| 200 | 197 | |
|---|
| 201 | | -static int terga20_mc_hotreset_assert(struct tegra_mc *mc, |
|---|
| 198 | +static int tegra20_mc_hotreset_assert(struct tegra_mc *mc, |
|---|
| 202 | 199 | const struct tegra_mc_reset *rst) |
|---|
| 203 | 200 | { |
|---|
| 204 | 201 | unsigned long flags; |
|---|
| .. | .. |
|---|
| 214 | 211 | return 0; |
|---|
| 215 | 212 | } |
|---|
| 216 | 213 | |
|---|
| 217 | | -static int terga20_mc_hotreset_deassert(struct tegra_mc *mc, |
|---|
| 214 | +static int tegra20_mc_hotreset_deassert(struct tegra_mc *mc, |
|---|
| 218 | 215 | const struct tegra_mc_reset *rst) |
|---|
| 219 | 216 | { |
|---|
| 220 | 217 | unsigned long flags; |
|---|
| .. | .. |
|---|
| 230 | 227 | return 0; |
|---|
| 231 | 228 | } |
|---|
| 232 | 229 | |
|---|
| 233 | | -static int terga20_mc_block_dma(struct tegra_mc *mc, |
|---|
| 230 | +static int tegra20_mc_block_dma(struct tegra_mc *mc, |
|---|
| 234 | 231 | const struct tegra_mc_reset *rst) |
|---|
| 235 | 232 | { |
|---|
| 236 | 233 | unsigned long flags; |
|---|
| .. | .. |
|---|
| 246 | 243 | return 0; |
|---|
| 247 | 244 | } |
|---|
| 248 | 245 | |
|---|
| 249 | | -static bool terga20_mc_dma_idling(struct tegra_mc *mc, |
|---|
| 246 | +static bool tegra20_mc_dma_idling(struct tegra_mc *mc, |
|---|
| 250 | 247 | const struct tegra_mc_reset *rst) |
|---|
| 251 | 248 | { |
|---|
| 252 | 249 | return mc_readl(mc, rst->status) == 0; |
|---|
| 253 | 250 | } |
|---|
| 254 | 251 | |
|---|
| 255 | | -static int terga20_mc_reset_status(struct tegra_mc *mc, |
|---|
| 252 | +static int tegra20_mc_reset_status(struct tegra_mc *mc, |
|---|
| 256 | 253 | const struct tegra_mc_reset *rst) |
|---|
| 257 | 254 | { |
|---|
| 258 | 255 | return (mc_readl(mc, rst->reset) & BIT(rst->bit)) == 0; |
|---|
| 259 | 256 | } |
|---|
| 260 | 257 | |
|---|
| 261 | | -static int terga20_mc_unblock_dma(struct tegra_mc *mc, |
|---|
| 258 | +static int tegra20_mc_unblock_dma(struct tegra_mc *mc, |
|---|
| 262 | 259 | const struct tegra_mc_reset *rst) |
|---|
| 263 | 260 | { |
|---|
| 264 | 261 | unsigned long flags; |
|---|
| .. | .. |
|---|
| 274 | 271 | return 0; |
|---|
| 275 | 272 | } |
|---|
| 276 | 273 | |
|---|
| 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, |
|---|
| 284 | 281 | }; |
|---|
| 285 | 282 | |
|---|
| 286 | 283 | const struct tegra_mc_soc tegra20_mc_soc = { |
|---|
| .. | .. |
|---|
| 290 | 287 | .client_id_mask = 0x3f, |
|---|
| 291 | 288 | .intmask = MC_INT_SECURITY_VIOLATION | MC_INT_INVALID_GART_PAGE | |
|---|
| 292 | 289 | MC_INT_DECERR_EMEM, |
|---|
| 293 | | - .reset_ops = &terga20_mc_reset_ops, |
|---|
| 290 | + .reset_ops = &tegra20_mc_reset_ops, |
|---|
| 294 | 291 | .resets = tegra20_mc_resets, |
|---|
| 295 | 292 | .num_resets = ARRAY_SIZE(tegra20_mc_resets), |
|---|
| 296 | 293 | }; |
|---|