Timo Alho | cdfa358 | 2019-01-24 19:03:53 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * Copyright (c) 2018, NVIDIA CORPORATION. |
| 4 | */ |
| 5 | |
| 6 | #ifndef __FIRMWARE_TEGRA_BPMP_PRIVATE_H |
| 7 | #define __FIRMWARE_TEGRA_BPMP_PRIVATE_H |
| 8 | |
| 9 | #include <soc/tegra/bpmp.h> |
| 10 | |
| 11 | struct tegra_bpmp_ops { |
| 12 | int (*init)(struct tegra_bpmp *bpmp); |
| 13 | void (*deinit)(struct tegra_bpmp *bpmp); |
| 14 | bool (*is_response_ready)(struct tegra_bpmp_channel *channel); |
| 15 | bool (*is_request_ready)(struct tegra_bpmp_channel *channel); |
| 16 | int (*ack_response)(struct tegra_bpmp_channel *channel); |
| 17 | int (*ack_request)(struct tegra_bpmp_channel *channel); |
| 18 | bool (*is_response_channel_free)(struct tegra_bpmp_channel *channel); |
| 19 | bool (*is_request_channel_free)(struct tegra_bpmp_channel *channel); |
| 20 | int (*post_response)(struct tegra_bpmp_channel *channel); |
| 21 | int (*post_request)(struct tegra_bpmp_channel *channel); |
| 22 | int (*ring_doorbell)(struct tegra_bpmp *bpmp); |
| 23 | int (*resume)(struct tegra_bpmp *bpmp); |
| 24 | }; |
| 25 | |
Thierry Reding | fe45ab5 | 2019-02-07 12:50:06 +0100 | [diff] [blame] | 26 | #if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \ |
| 27 | IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) |
Timo Alho | cdfa358 | 2019-01-24 19:03:53 +0200 | [diff] [blame] | 28 | extern const struct tegra_bpmp_ops tegra186_bpmp_ops; |
Thierry Reding | 79d031f | 2019-02-07 12:50:05 +0100 | [diff] [blame] | 29 | #endif |
| 30 | #if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC) |
Timo Alho | 139251f | 2019-01-24 19:03:54 +0200 | [diff] [blame] | 31 | extern const struct tegra_bpmp_ops tegra210_bpmp_ops; |
Thierry Reding | 79d031f | 2019-02-07 12:50:05 +0100 | [diff] [blame] | 32 | #endif |
Timo Alho | cdfa358 | 2019-01-24 19:03:53 +0200 | [diff] [blame] | 33 | |
| 34 | #endif |