Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Copyright (c) 2018, NVIDIA CORPORATION.
0004  */
0005 
0006 #ifndef __FIRMWARE_TEGRA_BPMP_PRIVATE_H
0007 #define __FIRMWARE_TEGRA_BPMP_PRIVATE_H
0008 
0009 #include <soc/tegra/bpmp.h>
0010 
0011 struct tegra_bpmp_ops {
0012     int (*init)(struct tegra_bpmp *bpmp);
0013     void (*deinit)(struct tegra_bpmp *bpmp);
0014     bool (*is_response_ready)(struct tegra_bpmp_channel *channel);
0015     bool (*is_request_ready)(struct tegra_bpmp_channel *channel);
0016     int (*ack_response)(struct tegra_bpmp_channel *channel);
0017     int (*ack_request)(struct tegra_bpmp_channel *channel);
0018     bool (*is_response_channel_free)(struct tegra_bpmp_channel *channel);
0019     bool (*is_request_channel_free)(struct tegra_bpmp_channel *channel);
0020     int (*post_response)(struct tegra_bpmp_channel *channel);
0021     int (*post_request)(struct tegra_bpmp_channel *channel);
0022     int (*ring_doorbell)(struct tegra_bpmp *bpmp);
0023     int (*resume)(struct tegra_bpmp *bpmp);
0024 };
0025 
0026 #if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
0027     IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) || \
0028     IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC)
0029 extern const struct tegra_bpmp_ops tegra186_bpmp_ops;
0030 #endif
0031 #if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
0032 extern const struct tegra_bpmp_ops tegra210_bpmp_ops;
0033 #endif
0034 
0035 #endif