003 File Manager
Current Path:
/usr/src/sys/mips/ingenic
usr
/
src
/
sys
/
mips
/
ingenic
/
📁
..
📄
files.jz4780
(1.22 KB)
📄
files.x1000
(653 B)
📄
jz4780_aic.c
(16.34 KB)
📄
jz4780_aic.h
(3.86 KB)
📄
jz4780_clk.h
(3.39 KB)
📄
jz4780_clk_gen.c
(8.48 KB)
📄
jz4780_clk_otg.c
(4.42 KB)
📄
jz4780_clk_pll.c
(5.84 KB)
📄
jz4780_clock.c
(20.19 KB)
📄
jz4780_clock.h
(1.52 KB)
📄
jz4780_codec.c
(8.15 KB)
📄
jz4780_codec.h
(5.32 KB)
📄
jz4780_common.h
(1.72 KB)
📄
jz4780_cpuregs.h
(3.04 KB)
📄
jz4780_dme.c
(3.28 KB)
📄
jz4780_dwc_fdt.c
(5.13 KB)
📄
jz4780_efuse.c
(5.48 KB)
📄
jz4780_ehci.c
(8.31 KB)
📄
jz4780_gpio.c
(20.2 KB)
📄
jz4780_gpio_if.m
(1.53 KB)
📄
jz4780_intr.c
(8.03 KB)
📄
jz4780_lcd.c
(13.77 KB)
📄
jz4780_lcd.h
(6.31 KB)
📄
jz4780_machdep.c
(6 KB)
📄
jz4780_mmc.c
(25.45 KB)
📄
jz4780_mp.c
(4.21 KB)
📄
jz4780_mpboot.S
(1.62 KB)
📄
jz4780_nand.c
(3.28 KB)
📄
jz4780_nemc.c
(10.2 KB)
📄
jz4780_ohci.c
(8.4 KB)
📄
jz4780_pdma.c
(12.54 KB)
📄
jz4780_pdma.h
(5.12 KB)
📄
jz4780_pinctrl.c
(6.51 KB)
📄
jz4780_pinctrl.h
(1.48 KB)
📄
jz4780_regs.h
(30.75 KB)
📄
jz4780_rtc.c
(5.57 KB)
📄
jz4780_smb.c
(11.34 KB)
📄
jz4780_smb.h
(3.06 KB)
📄
jz4780_timer.c
(8.61 KB)
📄
jz4780_uart.c
(5.83 KB)
Editing: jz4780_clk.h
/*- * Copyright 2015 Alexander Kabaev <kan@FreeBSD.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _MIPS_INGENIC_JZ4780_CLK_H #define _MIPS_INGENIC_JZ4780_CLK_H #include <dev/extres/clk/clk.h> #include <dev/extres/clk/clk_gate.h> /* Convenience bitfiled manipulation macros */ #define REG_MSK(field) (((1u << field ## _WIDTH) - 1) << field ##_SHIFT) #define REG_VAL(field, val) ((val) << field ##_SHIFT) #define REG_CLR(reg, field) ((reg) & ~REG_MSK(field)) #define REG_GET(reg, field) (((reg) & REG_MSK(field)) >> field ##_SHIFT) #define REG_SET(reg, field, val) (REG_CLR(reg, field) | REG_VAL(field, val)) /* Common clock macros */ #define CLK_LOCK(_sc) mtx_lock((_sc)->clk_mtx) #define CLK_UNLOCK(_sc) mtx_unlock((_sc)->clk_mtx) #define CLK_WR_4(_sc, off, val) bus_write_4((_sc)->clk_res, (off), (val)) #define CLK_RD_4(_sc, off) bus_read_4((_sc)->clk_res, (off)) struct jz4780_clk_mux_descr { uint16_t mux_reg; uint16_t mux_shift: 5; uint16_t mux_bits: 5; uint16_t mux_map: 4; /* Map into mux space */ }; struct jz4780_clk_div_descr { uint16_t div_reg; uint16_t div_shift: 5; uint16_t div_bits: 5; uint16_t div_lg: 5; int div_ce_bit: 6; /* -1, if CE bit is not present */ int div_st_bit: 6; /* Can be negative */ int div_busy_bit: 6; /* Can be negative */ }; struct jz4780_clk_descr { uint16_t clk_id: 6; uint16_t clk_type: 3; int clk_gate_bit: 7; /* Can be negative */ struct jz4780_clk_mux_descr clk_mux; struct jz4780_clk_div_descr clk_div; const char *clk_name; const char *clk_pnames[4]; }; /* clk_type bits */ #define CLK_MASK_GATE 0x01 #define CLK_MASK_DIV 0x02 #define CLK_MASK_MUX 0x04 extern int jz4780_clk_gen_register(struct clkdom *clkdom, const struct jz4780_clk_descr *descr, struct mtx *dev_mtx, struct resource *mem_res); extern int jz4780_clk_pll_register(struct clkdom *clkdom, struct clknode_init_def *clkdef, struct mtx *dev_mtx, struct resource *mem_res, uint32_t mem_reg); extern int jz4780_clk_otg_register(struct clkdom *clkdom, struct clknode_init_def *clkdef, struct mtx *dev_mtx, struct resource *mem_res); #endif /* _MIPS_INGENIC_JZ4780_CLK_PLL_H */
Upload File
Create Folder