From: Scott Wood <scottwood@freescale.com>
To: Chenhui Zhao <chenhui.zhao@freescale.com>
Cc: <linuxppc-dev@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>,
<Jason.Jin@freescale.com>
Subject: Re: [PATCH] powerpc/85xx: add sleep and deep sleep support
Date: Fri, 31 Jul 2015 21:57:17 -0500 [thread overview]
Message-ID: <1438397837.2097.4.camel@freescale.com> (raw)
In-Reply-To: <1437741961-6663-1-git-send-email-chenhui.zhao@freescale.com>
On Fri, 2015-07-24 at 20:46 +0800, Chenhui Zhao wrote:
> +static void mpc85xx_pmc_set_wake(struct device *dev, void *enable)
> {
> int ret;
> + u32 value[2];
> +
> + if (!device_may_wakeup(dev))
> + return;
> +
> + if (!pmc_regs) {
> + dev_err(dev, "%s: PMC is unavailable\n", __func__);
> + return;
> + }
> +
> + ret = of_property_read_u32_array(dev->of_node, "sleep", value, 2);
This will crash on any device without an of_node.
> + if (ret) {
> + dev_dbg(dev, "%s: Can not find the \"sleep\" property.\n",
> + __func__);
> + return;
> + }
> +
> + if (*(int *)enable)
> + pmc_pmcdr_mask &= ~value[1];
> + else
> + pmc_pmcdr_mask |= value[1];
> +
> + if ((value[1] & 0xe0) && (pmc_flag & PMC_LOSSLESS))
> + pmc_powmgtcsr = POWMGTCSR_LOSSLESS;
> +}
What is 0xe0?
-Scott
next prev parent reply other threads:[~2015-08-01 2:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-24 12:46 [PATCH] powerpc/85xx: add sleep and deep sleep support Chenhui Zhao
2015-08-01 2:57 ` Scott Wood [this message]
2015-08-03 11:10 ` Chenhui Zhao
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=1438397837.2097.4.camel@freescale.com \
--to=scottwood@freescale.com \
--cc=Jason.Jin@freescale.com \
--cc=chenhui.zhao@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/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).