[PATCH 6/7] fsl_pmc: Add API to enable device as wakeup event source
Tabi Timur-B04825
B04825 at freescale.com
Sat Nov 5 11:08:24 EST 2011
On Fri, Nov 4, 2011 at 7:39 AM, Zhao Chenhui <chenhui.zhao at freescale.com> wrote:
> + if (!pmc_regs) {
> + printk(KERN_WARNING "PMC is unavailable\n");
Use pr_warn() and the other pr_xxx functions.
> + pmcdr_mask = (u32 *)of_get_property(clk_np, "fsl,pmcdr-mask", NULL);
The typecast is unnecessary here.
> + /* clear to enable clock in low power mode */
> + if (enable)
> + clrbits32(&pmc_regs->pmcdr, *pmcdr_mask);
> + else
> + setbits32(&pmc_regs->pmcdr, *pmcdr_mask);
You need to use be32_to_cpup() when dereferencing a pointer to a
device tree property.
--
Timur Tabi
Linux kernel developer at Freescale
More information about the Linuxppc-dev
mailing list