summaryrefstree
path: root/kernel/drivers/vision/dsp/dsp-device.h
blob: f1f7b3fd8726252fec8bd01b2460b647d7ef0340 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Samsung Exynos SoC series dsp driver
 *
 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
 *              http://www.samsung.com/
 */

#ifndef __DSP_DEVICE_H__
#define __DSP_DEVICE_H__

#include <linux/device.h>
#include <linux/platform_device.h>

#include "dsp-debug.h"
#include "hardware/dsp-system.h"
#include "dsp-core.h"

struct dsp_device {
	struct device			*dev;
	struct mutex			lock;
	unsigned int			open_count;
	unsigned int			start_count;
	unsigned int			power_count;

	struct dsp_system		system;
	struct dsp_core			core;
	struct dsp_debug		debug;
};

int dsp_device_npu_start(bool boot, dma_addr_t fw_iova);
int dsp_device_power_active(struct dsp_device *dspdev);
int dsp_device_power_on(struct dsp_device *dspdev, unsigned int pm_level);
void dsp_device_power_off(struct dsp_device *dspdev);

int dsp_device_start(struct dsp_device *dspdev, unsigned int pm_level);
int dsp_device_stop(struct dsp_device *dspdev, unsigned int count);
int dsp_device_open(struct dsp_device *dspdev);
int dsp_device_close(struct dsp_device *dspdev);

#endif