linux/drivers/firmware/tegra/bpmp-private.h
Thierry Reding 79d031fcad firmware: tegra: Conditionally support SoC generations
Only include support for Tegra210 and Tegra186 in the BPMP driver if
support for those SoCs was selected. This fixes a build failure seen
on 32-bit ARM allmodconfig builds, but could also happen on 64-bit
ARM builds if either Tegra210 or Tegra186 were not selected.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-02-07 18:52:19 +01:00

34 lines
1.1 KiB
C

/* 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);
};
#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC)
extern const struct tegra_bpmp_ops tegra186_bpmp_ops;
#endif
#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
extern const struct tegra_bpmp_ops tegra210_bpmp_ops;
#endif
#endif