2019-01-25 01:03:53 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2018, NVIDIA CORPORATION.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __FIRMWARE_TEGRA_BPMP_PRIVATE_H
|
|
|
|
#define __FIRMWARE_TEGRA_BPMP_PRIVATE_H
|
|
|
|
|
|
|
|
#include <soc/tegra/bpmp.h>
|
|
|
|
|
|
|
|
struct tegra_bpmp_ops {
|
|
|
|
int (*init)(struct tegra_bpmp *bpmp);
|
|
|
|
void (*deinit)(struct tegra_bpmp *bpmp);
|
|
|
|
bool (*is_response_ready)(struct tegra_bpmp_channel *channel);
|
|
|
|
bool (*is_request_ready)(struct tegra_bpmp_channel *channel);
|
|
|
|
int (*ack_response)(struct tegra_bpmp_channel *channel);
|
|
|
|
int (*ack_request)(struct tegra_bpmp_channel *channel);
|
|
|
|
bool (*is_response_channel_free)(struct tegra_bpmp_channel *channel);
|
|
|
|
bool (*is_request_channel_free)(struct tegra_bpmp_channel *channel);
|
|
|
|
int (*post_response)(struct tegra_bpmp_channel *channel);
|
|
|
|
int (*post_request)(struct tegra_bpmp_channel *channel);
|
|
|
|
int (*ring_doorbell)(struct tegra_bpmp *bpmp);
|
|
|
|
int (*resume)(struct tegra_bpmp *bpmp);
|
|
|
|
};
|
|
|
|
|
2019-02-07 19:50:06 +08:00
|
|
|
#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
|
|
|
|
IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC)
|
2019-01-25 01:03:53 +08:00
|
|
|
extern const struct tegra_bpmp_ops tegra186_bpmp_ops;
|
2019-02-07 19:50:05 +08:00
|
|
|
#endif
|
|
|
|
#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
|
2019-01-25 01:03:54 +08:00
|
|
|
extern const struct tegra_bpmp_ops tegra210_bpmp_ops;
|
2019-02-07 19:50:05 +08:00
|
|
|
#endif
|
2019-01-25 01:03:53 +08:00
|
|
|
|
|
|
|
#endif
|