linux/drivers/media/pci/intel/ipu6/ipu6-buttress.h

/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (C) 2013--2024 Intel Corporation */

#ifndef IPU6_BUTTRESS_H
#define IPU6_BUTTRESS_H

#include <linux/completion.h>
#include <linux/irqreturn.h>
#include <linux/list.h>
#include <linux/mutex.h>

struct device;
struct firmware;
struct ipu6_device;
struct ipu6_bus_device;

#define BUTTRESS_PS_FREQ_STEP
#define BUTTRESS_MIN_FORCE_PS_FREQ
#define BUTTRESS_MAX_FORCE_PS_FREQ

#define BUTTRESS_IS_FREQ_STEP
#define BUTTRESS_MIN_FORCE_IS_FREQ
#define BUTTRESS_MAX_FORCE_IS_FREQ

struct ipu6_buttress_ctrl {};

struct ipu6_buttress_ipc {};

struct ipu6_buttress {};

enum ipu6_buttress_ipc_domain {};

struct ipu6_ipc_buttress_bulk_msg {};

int ipu6_buttress_ipc_reset(struct ipu6_device *isp,
			    struct ipu6_buttress_ipc *ipc);
int ipu6_buttress_map_fw_image(struct ipu6_bus_device *sys,
			       const struct firmware *fw,
			       struct sg_table *sgt);
void ipu6_buttress_unmap_fw_image(struct ipu6_bus_device *sys,
				  struct sg_table *sgt);
int ipu6_buttress_power(struct device *dev, struct ipu6_buttress_ctrl *ctrl,
			bool on);
bool ipu6_buttress_get_secure_mode(struct ipu6_device *isp);
int ipu6_buttress_authenticate(struct ipu6_device *isp);
int ipu6_buttress_reset_authentication(struct ipu6_device *isp);
bool ipu6_buttress_auth_done(struct ipu6_device *isp);
int ipu6_buttress_start_tsc_sync(struct ipu6_device *isp);
void ipu6_buttress_tsc_read(struct ipu6_device *isp, u64 *val);
u64 ipu6_buttress_tsc_ticks_to_ns(u64 ticks, const struct ipu6_device *isp);

irqreturn_t ipu6_buttress_isr(int irq, void *isp_ptr);
irqreturn_t ipu6_buttress_isr_threaded(int irq, void *isp_ptr);
int ipu6_buttress_init(struct ipu6_device *isp);
void ipu6_buttress_exit(struct ipu6_device *isp);
void ipu6_buttress_csi_port_config(struct ipu6_device *isp,
				   u32 legacy, u32 combo);
void ipu6_buttress_restore(struct ipu6_device *isp);
#endif /* IPU6_BUTTRESS_H */