bpmp-private.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (c) 2018, NVIDIA CORPORATION.
  4. */
  5. #ifndef __FIRMWARE_TEGRA_BPMP_PRIVATE_H
  6. #define __FIRMWARE_TEGRA_BPMP_PRIVATE_H
  7. #include <soc/tegra/bpmp.h>
  8. struct tegra_bpmp_ops {
  9. int (*init)(struct tegra_bpmp *bpmp);
  10. void (*deinit)(struct tegra_bpmp *bpmp);
  11. bool (*is_response_ready)(struct tegra_bpmp_channel *channel);
  12. bool (*is_request_ready)(struct tegra_bpmp_channel *channel);
  13. int (*ack_response)(struct tegra_bpmp_channel *channel);
  14. int (*ack_request)(struct tegra_bpmp_channel *channel);
  15. bool (*is_response_channel_free)(struct tegra_bpmp_channel *channel);
  16. bool (*is_request_channel_free)(struct tegra_bpmp_channel *channel);
  17. int (*post_response)(struct tegra_bpmp_channel *channel);
  18. int (*post_request)(struct tegra_bpmp_channel *channel);
  19. int (*ring_doorbell)(struct tegra_bpmp *bpmp);
  20. int (*resume)(struct tegra_bpmp *bpmp);
  21. };
  22. #if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
  23. IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) || \
  24. IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC)
  25. extern const struct tegra_bpmp_ops tegra186_bpmp_ops;
  26. #endif
  27. #if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
  28. extern const struct tegra_bpmp_ops tegra210_bpmp_ops;
  29. #endif
  30. #endif