Date: Wed, 2 Aug 2017 20:17:04 +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: r321941 - head/sys/arm/allwinner/clk Message-ID: <201708022017.v72KH4dH014898@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: manu Date: Wed Aug 2 20:17:04 2017 New Revision: 321941 URL: https://svnweb.freebsd.org/changeset/base/321941 Log: allwiner: modclk: Do not try to enable parent clock if it doesn't exist Modified: head/sys/arm/allwinner/clk/aw_modclk.c Modified: head/sys/arm/allwinner/clk/aw_modclk.c ============================================================================== --- head/sys/arm/allwinner/clk/aw_modclk.c Wed Aug 2 19:53:43 2017 (r321940) +++ head/sys/arm/allwinner/clk/aw_modclk.c Wed Aug 2 20:17:04 2017 (r321941) @@ -89,7 +89,10 @@ aw_modclk_init(struct clknode *clk, device_t dev) index = (val & CLK_SRC_SEL) >> CLK_SRC_SEL_SHIFT; - clknode_init_parent_idx(clk, index); + if (index <= clknode_get_parents_num(clk)) + clknode_init_parent_idx(clk, index); + else + clknode_init_parent_idx(clk, 0); return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708022017.v72KH4dH014898>