xref: /freebsd/sys/arm/ti/clk/ti_clk_clkctrl.h (revision be82b3a0bf72ed3b5f01ac9fcd8dcd3802e3c742)
10050ea24SMichal Meloun /*-
24d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
30050ea24SMichal Meloun  *
40050ea24SMichal Meloun  * Copyright (c) 2020 Oskar Holmlund <oskar.holmlund@ohdata.se>
50050ea24SMichal Meloun  *
60050ea24SMichal Meloun  * Redistribution and use in source and binary forms, with or without
70050ea24SMichal Meloun  * modification, are permitted provided that the following conditions
80050ea24SMichal Meloun  * are met:
90050ea24SMichal Meloun  * 1. Redistributions of source code must retain the above copyright
100050ea24SMichal Meloun  *    notice, this list of conditions and the following disclaimer.
110050ea24SMichal Meloun  * 2. Redistributions in binary form must reproduce the above copyright
120050ea24SMichal Meloun  *    notice, this list of conditions and the following disclaimer in the
130050ea24SMichal Meloun  *    documentation and/or other materials provided with the distribution.
140050ea24SMichal Meloun  *
150050ea24SMichal Meloun  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
160050ea24SMichal Meloun  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
170050ea24SMichal Meloun  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
180050ea24SMichal Meloun  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
190050ea24SMichal Meloun  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
200050ea24SMichal Meloun  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
210050ea24SMichal Meloun  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
220050ea24SMichal Meloun  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
230050ea24SMichal Meloun  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
240050ea24SMichal Meloun  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
250050ea24SMichal Meloun  * SUCH DAMAGE.
260050ea24SMichal Meloun  */
270050ea24SMichal Meloun 
280050ea24SMichal Meloun #ifndef _TI_CLK_CLKCTRL_H_
290050ea24SMichal Meloun #define _TI_CLK_CLKCTRL_H_
300050ea24SMichal Meloun 
31*be82b3a0SEmmanuel Vadot #include <dev/clk/clk.h>
320050ea24SMichal Meloun 
330050ea24SMichal Meloun struct ti_clk_clkctrl_def {
340050ea24SMichal Meloun 	struct clknode_init_def 	clkdef;
350050ea24SMichal Meloun 	bool				gdbclk;
360050ea24SMichal Meloun 	uint32_t			register_offset;
370050ea24SMichal Meloun };
380050ea24SMichal Meloun 
390050ea24SMichal Meloun int ti_clknode_clkctrl_register(struct clkdom *clkdom, struct ti_clk_clkctrl_def *clkdef);
400050ea24SMichal Meloun 
410050ea24SMichal Meloun #endif /* _TI_CLK_CLKCTRL_H_ */
42