Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1197921

Re: [PATCH] powerpc/85xx: add sleep and deep sleep support

From Scott Wood <scottwood@freescale.com>
Newsgroups linux.kernel
Subject Re: [PATCH] powerpc/85xx: add sleep and deep sleep support
Date 2015-08-01 05:00 +0200
Message-ID <pSvbI-8vD-3@gated-at.bofh.it> (permalink)
References <pPKTF-6EB-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] powerpc/85xx: add sleep and deep sleep support Chenhui Zhao <chenhui.zhao@freescale.com> - 2015-07-24 15:10 +0200
  Re: [PATCH] powerpc/85xx: add sleep and deep sleep support Scott Wood <scottwood@freescale.com> - 2015-08-01 05:00 +0200

csiph-web