[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140515075659.GP29318@piout.net>
Date: Thu, 15 May 2014 09:56:59 +0200
From: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
Cc: Mike Turquette <mturquette@...aro.org>,
Jisheng Zhang <jszhang@...vell.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 05/10] clk: berlin: add driver for BG2x complex
divider cells
On 14/05/2014 at 22:15:16 +0200, Sebastian Hesselbarth wrote :
> +static u8 berlin2_div_get_parent(struct clk_hw *hw)
> +{
> + struct berlin2_div *div = to_berlin2_div(hw);
> + struct berlin2_div_map *map = &div->map;
> + u32 reg;
> + u8 index = 0;
> +
> + if (div->lock)
> + spin_lock(div->lock);
> +
> + /* PLL_SWITCH == 0 is index 0 */
> + reg = readl_relaxed(div->base + map->pll_switch_offs);
> + reg &= BIT(map->pll_switch_shift);
> + if (reg) {
> + reg = readl_relaxed(div->base + map->pll_select_offs);
> + reg >>= map->pll_select_shift;
> + reg &= PLL_SELECT_MASK;
> + index = 1 + reg;
After getting more insight, I think we don't need to add 1, see my
comment on the next patchs.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists