summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/tegra/bpmp-private.h
diff options
context:
space:
mode:
authorTimo Alho <talho@nvidia.com>2019-01-24 18:03:53 +0100
committerThierry Reding <treding@nvidia.com>2019-01-25 15:58:47 +0100
commitcdfa358b248efd36c6a9cb4d4d0a3ba7509f8387 (patch)
treedb7d882df0d9233280ad0e4e300d3d3794f2b3f2 /drivers/firmware/tegra/bpmp-private.h
parentfirmware: tegra: Reword messaging terminology (diff)
downloadlinux-cdfa358b248efd36c6a9cb4d4d0a3ba7509f8387.tar.xz
linux-cdfa358b248efd36c6a9cb4d4d0a3ba7509f8387.zip
firmware: tegra: Refactor BPMP driver
Split BPMP driver into common and chip specific parts to facilitate adding support for previous and future Tegra chips that are using BPMP as co-processor. Signed-off-by: Timo Alho <talho@nvidia.com> Acked-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/firmware/tegra/bpmp-private.h')
-rw-r--r--drivers/firmware/tegra/bpmp-private.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/firmware/tegra/bpmp-private.h b/drivers/firmware/tegra/bpmp-private.h
new file mode 100644
index 000000000000..6fb10f1cfb8f
--- /dev/null
+++ b/drivers/firmware/tegra/bpmp-private.h
@@ -0,0 +1,28 @@
+/* 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);
+};
+
+extern const struct tegra_bpmp_ops tegra186_bpmp_ops;
+
+#endif