10050ea24SMichal Meloun /*- 2*4d846d26SWarner 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 #include <sys/cdefs.h> 290050ea24SMichal Meloun struct clock_cell_info { 300050ea24SMichal Meloun cell_t *clock_cells; 310050ea24SMichal Meloun uint8_t *clock_cells_ncells; 320050ea24SMichal Meloun uint32_t num_clock_cells; 330050ea24SMichal Meloun uint8_t num_real_clocks; 340050ea24SMichal Meloun }; 350050ea24SMichal Meloun 360050ea24SMichal Meloun void read_clock_cells(device_t dev, struct clock_cell_info *clk); 370050ea24SMichal Meloun int find_parent_clock_names(device_t dev, struct clock_cell_info *clk, struct clknode_init_def *def); 380050ea24SMichal Meloun void create_clkdef(device_t dev, struct clock_cell_info *clk, struct clknode_init_def *def); 390050ea24SMichal Meloun void free_clkdef(struct clknode_init_def *def); 40