From: Stephen Boyd <sboyd@codeaurora.org>
To: Joachim Eastwood <manabian@gmail.com>
Cc: mturquette@baylibre.com, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v5 1/2] clk: add lpc18xx creg clk driver
Date: Fri, 4 Mar 2016 09:42:01 -0800 [thread overview]
Message-ID: <20160304174201.GH24999@codeaurora.org> (raw)
In-Reply-To: <1457041625-21163-2-git-send-email-manabian@gmail.com>
On 03/03, Joachim Eastwood wrote:
> diff --git a/drivers/clk/nxp/clk-lpc18xx-creg.c b/drivers/clk/nxp/clk-lpc18xx-creg.c
> new file mode 100644
> index 000000000000..d44b61afa2dc
> --- /dev/null
> +++ b/drivers/clk/nxp/clk-lpc18xx-creg.c
> @@ -0,0 +1,226 @@
> +
> +static int clk_creg_32k_is_prepared(struct clk_hw *hw)
> +{
> + struct clk_creg_data *creg = to_clk_creg(hw);
> + u32 reg;
> +
> + regmap_read(creg->reg, LPC18XX_CREG_CREG0, ®);
> +
> + return !(reg & LPC18XX_CREG_CREG0_PD32KHZ) &&
> + !(reg & LPC18XX_CREG_CREG0_RESET32KHZ);
> +}
> +
> +static unsigned long clk_creg_1k_recalc_rate(struct clk_hw *hw,
> + unsigned long parent_rate)
> +{
> + return parent_rate / 32;
> +}
> +
> +static int clk_creg_enable(struct clk_hw *hw)
> +{
> + struct clk_creg_data *creg = to_clk_creg(hw);
> +
> + return regmap_update_bits(creg->reg, LPC18XX_CREG_CREG0,
> + creg->en_mask, creg->en_mask);
Have you tested this with CONFIG_DEBUG_ATOMIC_SLEEP=y? I seem to
recall that syscon uses a regmap with regmap_config::fast_io set
to false, so all regmap operations take a mutex lock.
clk_ops::enable is called with a spinlock held, so that isn't
going to work well.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2016-03-04 17:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 21:47 [PATCH v5 0/2] CREG clk driver for NXP LPC18xx family Joachim Eastwood
2016-03-03 21:47 ` [PATCH v5 1/2] clk: add lpc18xx creg clk driver Joachim Eastwood
2016-03-04 17:42 ` Stephen Boyd [this message]
2016-03-04 20:48 ` Joachim Eastwood
2016-03-04 20:51 ` Stephen Boyd
2016-03-04 20:53 ` Stephen Boyd
2016-03-03 21:47 ` [PATCH v5 2/2] doc: dt: add documentation for lpc1850-creg-clk driver Joachim Eastwood
2016-03-04 20:53 ` Stephen Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160304174201.GH24999@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=manabian@gmail.com \
--cc=mturquette@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).