Date: Sun, 11 Mar 2018 04:01:23 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330756 - head/sys/arm/allwinner/clkng Message-ID: <201803110401.w2B41Neq075865@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: manu Date: Sun Mar 11 04:01:23 2018 New Revision: 330756 URL: https://svnweb.freebsd.org/changeset/base/330756 Log: allwinner: Add IR clock to sun8i Add ir clock definition to sun8i-r-ccu. No idea if it's working but aw_cir seems happy now and the frequency is set to 3Mhz as it should. Modified: head/sys/arm/allwinner/clkng/ccu_sun8i_r.c Modified: head/sys/arm/allwinner/clkng/ccu_sun8i_r.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_sun8i_r.c Sun Mar 11 02:45:52 2018 (r330755) +++ head/sys/arm/allwinner/clkng/ccu_sun8i_r.c Sun Mar 11 04:01:23 2018 (r330756) @@ -108,6 +108,17 @@ DIV_CLK(apb0_clk, 0, 2, /* shift, width */ 0, NULL); /* flags, div table */ +static const char *ir_parents[] = {"osc32k", "osc24M"}; +NM_CLK(ir_clk, + CLK_IR, /* id */ + "ir", ir_parents, /* names, parents */ + 0x54, /* offset */ + 0, 4, 0, 0, /* N factor */ + 16, 2, 0, 0, /* M flags */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_REPARENT); /* flags */ + static struct aw_clk_prediv_mux_def *r_ccu_prediv_mux_clks[] = { &ar100_clk, }; @@ -124,6 +135,10 @@ static struct clk_fixed_def *fixed_factor_clks[] = { &ahb0_clk, }; +static struct aw_clk_nm_def *nm_clks[] = { + &ir_clk, +}; + void ccu_sun8i_r_register_clocks(struct aw_ccung_softc *sc) { @@ -147,4 +162,6 @@ ccu_sun8i_r_register_clocks(struct aw_ccung_softc *sc) clknode_div_register(sc->clkdom, div_clks[i]); for (i = 0; i < nitems(fixed_factor_clks); i++) clknode_fixed_register(sc->clkdom, fixed_factor_clks[i]); + for (i = 0; i < nitems(nm_clks); i++) + aw_clk_nm_register(sc->clkdom, nm_clks[i]); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803110401.w2B41Neq075865>