RE: [PATCH 6/7] fsl_pmc: Add API to enable device as wakeup event source

2011-11-08 Thread Li Yang-R58472
nel.org; linuxppc-dev@lists.ozlabs.org >Subject: Re: [PATCH 6/7] fsl_pmc: Add API to enable device as wakeup event >source > >On 11/04/2011 07:39 AM, Zhao Chenhui wrote: >> @@ -45,6 +46,72 @@ static int has_lossless; >> * code can be compatible with both 32-bit & 36-bi

Re: [PATCH 6/7] fsl_pmc: Add API to enable device as wakeup event source

2011-11-07 Thread Scott Wood
On 11/04/2011 07:08 PM, Tabi Timur-B04825 wrote: > On Fri, Nov 4, 2011 at 7:39 AM, Zhao Chenhui > wrote: >> + /* clear to enable clock in low power mode */ >> + if (enable) >> + clrbits32(&pmc_regs->pmcdr, *pmcdr_mask); >> + else >> + setbits32(&pmc_r

Re: [PATCH 6/7] fsl_pmc: Add API to enable device as wakeup event source

2011-11-07 Thread Scott Wood
On 11/07/2011 05:22 AM, Zhao Chenhui wrote: > On Fri, Nov 04, 2011 at 04:14:25PM -0500, Scott Wood wrote: >> On 11/04/2011 07:39 AM, Zhao Chenhui wrote: >>> + if (enable && !device_may_wakeup(&pdev->dev)) >>> + return -EINVAL; >>> + >>> + clk_np = of_parse_phandle(pdev->dev.of_node, "

Re: [PATCH 6/7] fsl_pmc: Add API to enable device as wakeup event source

2011-11-07 Thread Zhao Chenhui
On Fri, Nov 04, 2011 at 04:14:25PM -0500, Scott Wood wrote: > On 11/04/2011 07:39 AM, Zhao Chenhui wrote: > > @@ -45,6 +46,72 @@ static int has_lossless; > > * code can be compatible with both 32-bit & 36-bit */ > > extern void mpc85xx_enter_deep_sleep(u64 ccsrbar, u32 powmgtreq); > > > > +#if

Re: [PATCH 6/7] fsl_pmc: Add API to enable device as wakeup event source

2011-11-07 Thread Zhao Chenhui
On Fri, Nov 04, 2011 at 07:08:24PM -0500, Tabi Timur-B04825 wrote: > On Fri, Nov 4, 2011 at 7:39 AM, Zhao Chenhui > wrote: > > > +       if (!pmc_regs) { > > +               printk(KERN_WARNING "PMC is unavailable\n"); > > Use pr_warn() and the other pr_xxx functions. > > > +       pmcdr_mask

Re: [PATCH 6/7] fsl_pmc: Add API to enable device as wakeup event source

2011-11-04 Thread Tabi Timur-B04825
On Fri, Nov 4, 2011 at 7:39 AM, Zhao Chenhui 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

Re: [PATCH 6/7] fsl_pmc: Add API to enable device as wakeup event source

2011-11-04 Thread Scott Wood
On 11/04/2011 07:39 AM, Zhao Chenhui wrote: > @@ -45,6 +46,72 @@ static int has_lossless; > * code can be compatible with both 32-bit & 36-bit */ > extern void mpc85xx_enter_deep_sleep(u64 ccsrbar, u32 powmgtreq); > > +#ifdef CONFIG_FSL_PMC > +/** > + * pmc_enable_wake - enable OF device as wa

[PATCH 6/7] fsl_pmc: Add API to enable device as wakeup event source

2011-11-04 Thread Zhao Chenhui
Add APIs for setting wakeup source and lossless Ethernet in low power modes. These APIs can be used by wake-on-packet feature. Signed-off-by: Dave Liu Signed-off-by: Li Yang Signed-off-by: Jin Qing Signed-off-by: Zhao Chenhui --- arch/powerpc/sysdev/fsl_pmc.c | 67 ++