summaryrefstree
path: root/kernel/drivers/vision/dsp/dl/dsp-xml-parser.h
blob: 2fcafe39ceb676222da7d95b44bd0c1355385a3d (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
42
43
44
45
46
47
48
49
50
51
52
53
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Samsung Exynos SoC series dsp driver
 *
 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
 *              http://www.samsung.com/
 */

#ifndef __DL_DSP_XML_PARSER_H__
#define __DL_DSP_XML_PARSER_H__

#include "dl/dsp-sxml.h"
#include "dl/dsp-common.h"
#include "dl/dsp-hash.h"

enum dsp_xml_token {
	LIBS,
	COUNT,
	LIB,
	NAME,
	KERNEL_COUNT,
	KERNEL,
	ID,
	PRE,
	EXE,
	POST,
	TOKEN_NUM,
};

struct dsp_xml_kernel_table {
	char *pre;
	char *exe;
	char *post;
};

struct dsp_xml_lib {
	char *name;
	unsigned int kernel_cnt;
	struct dsp_xml_kernel_table *kernels;
};

struct dsp_xml_lib_table {
	unsigned int lib_cnt;
	struct dsp_hash_tab lib_hash;
};

void dsp_xml_parser_init(void);
void dsp_xml_parser_free(void);
int dsp_xml_parser_parse(struct dsp_dl_lib_file *file);

extern struct dsp_xml_lib_table *xml_libs;

#endif