From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dr. Philipp Tomsich Date: Thu, 14 Sep 2017 16:55:25 +0200 Subject: [U-Boot] [U-Boot, 6/8] clk: rockchip: Add rk3368 Saradc clock support In-Reply-To: <5cb33a24-5e59-ec30-90fa-0a30f7de4b2b@rock-chips.com> References: <1505302336-74720-1-git-send-email-david.wu@rock-chips.com> <5cb33a24-5e59-ec30-90fa-0a30f7de4b2b@rock-chips.com> Message-ID: <2494C065-F364-422F-8E4B-AC4FBCC6E8ED@theobroma-systems.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de > On 14 Sep 2017, at 13:17, David.Wu wrote: > > Hi Philipp, > > 在 2017/9/14 4:41, Philipp Tomsich 写道: >>> +static ulong rk3368_saradc_get_clk(struct rk3368_cru *cru) >>> +{ >>> + u32 div, val; >>> + >>> + val = readl(&cru->clksel_con[25]); >>> + div = bitfield_extract(val, CLK_SARADC_DIV_CON_SHIFT, >>> + CLK_SARADC_DIV_CON_WIDTH); >> Please reuse the functions from bitfield.h. > > Ah, the bitfield_extract function is from bitfield.h here. > I was suffering from a lack of sleep yesterday, so just ignore this comment of mine. —Phil.