Path: blob/main/sys/dev/clk/allwinner/aw_clk_nkmp.h
39536 views
/*-1* Copyright (c) 2017 Emmanuel Vadot <[email protected]>2* All rights reserved.3*4* Redistribution and use in source and binary forms, with or without5* modification, are permitted provided that the following conditions6* are met:7* 1. Redistributions of source code must retain the above copyright8* notice, this list of conditions and the following disclaimer.9* 2. Redistributions in binary form must reproduce the above copyright10* notice, this list of conditions and the following disclaimer in the11* documentation and/or other materials provided with the distribution.12*13* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR14* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES15* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.16* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,17* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,18* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;19* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED20* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,21* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY22* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF23* SUCH DAMAGE.24*/2526#ifndef __AW_CLK_NKMP_H__27#define __AW_CLK_NKMP_H__2829#include <dev/clk/allwinner/aw_clk.h>3031struct aw_clk_nkmp_def {32struct clknode_init_def clkdef;3334uint32_t offset;3536struct aw_clk_factor m;37struct aw_clk_factor k;38struct aw_clk_factor n;39struct aw_clk_factor p;4041uint32_t mux_shift;42uint32_t mux_width;43uint32_t gate_shift;44uint32_t lock_shift;45uint32_t lock_retries;46uint32_t update_shift;4748uint32_t flags;49};5051int aw_clk_nkmp_register(struct clkdom *clkdom, struct aw_clk_nkmp_def *clkdef);5253#endif /* __AW_CLK_NKMP_H__ */545556