xref: /freebsd/sys/dev/firmware/xilinx/zynqmp_firmware_if.m (revision 22d7dd834bc5cd189810e414701e3ad1e98102e4)
1#-
2# SPDX-License-Identifier: BSD-2-Clause
3#
4# Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
9# 1. Redistributions of source code must retain the above copyright
10#    notice, this list of conditions and the following disclaimer.
11# 2. Redistributions in binary form must reproduce the above copyright
12#    notice, this list of conditions and the following disclaimer in the
13#    documentation and/or other materials provided with the distribution.
14#
15# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD$
28
29INTERFACE zynqmp_firmware;
30
31METHOD int clock_enable {
32	device_t dev;
33	uint32_t clkid;
34};
35
36METHOD int clock_disable {
37	device_t dev;
38	uint32_t clkid;
39};
40
41METHOD int clock_getstate {
42	device_t dev;
43	uint32_t clkid;
44	bool *enabled;
45};
46
47METHOD int clock_setdivider {
48	device_t dev;
49	uint32_t clkid;
50	uint32_t div;
51};
52
53METHOD int clock_getdivider {
54	device_t dev;
55	uint32_t clkid;
56	uint32_t *div;
57};
58
59METHOD int clock_setparent {
60	device_t dev;
61	uint32_t clkid;
62	uint32_t parentid;
63};
64
65METHOD int clock_getparent {
66	device_t dev;
67	uint32_t clkid;
68	uint32_t *parentid;
69};
70
71METHOD int pll_get_mode {
72	device_t dev;
73	uint32_t pllid;
74	uint32_t *mode;
75};
76
77METHOD int pll_get_frac_data {
78	device_t dev;
79	uint32_t pllid;
80	uint32_t *data;
81};
82
83METHOD int clock_get_fixedfactor {
84	device_t dev;
85	uint32_t clkid;
86	uint32_t *mult;
87	uint32_t *div;
88};
89
90METHOD int query_data {
91	device_t dev;
92	uint32_t qid;
93	uint32_t arg1;
94	uint32_t arg2;
95	uint32_t arg3;
96	uint32_t *data;
97};
98
99METHOD int reset_assert {
100	device_t dev;
101	uint32_t resetid;
102	bool enable;
103};
104
105METHOD int reset_get_status {
106	device_t dev;
107	uint32_t resetid;
108	bool *status;
109};
110