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

2012-08-14 Thread Tabi Timur-B04825
Zhao Chenhui wrote: >>> > >+#ifdef CONFIG_FSL_PMC >>> > >+extern int mpc85xx_pmc_set_wake(struct device *dev, bool enable); >>> > >+extern void mpc85xx_pmc_set_lossless_ethernet(int enable); >> > >> >Don't use 'extern' for functions. >> > > Why? I think there is no difference. It's unnecessary, an

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

2012-08-14 Thread Zhao Chenhui
On Sat, Aug 11, 2012 at 08:19:43AM -0500, Tabi Timur-B04825 wrote: > On Tue, Aug 7, 2012 at 3:43 AM, Zhao Chenhui > wrote: > > > +int mpc85xx_pmc_set_wake(struct device *dev, bool enable) > > +{ > > + int ret = 0; > > + struct device_node *clk_np; > > + const u32 *prop; > > +

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

2012-08-14 Thread Zhao Chenhui
On Sat, Aug 11, 2012 at 08:19:43AM -0500, Tabi Timur-B04825 wrote: > On Tue, Aug 7, 2012 at 3:43 AM, Zhao Chenhui > wrote: > > > + return -EINVAL; > > + > > + prop = of_get_property(clk_np, "fsl,pmcdr-mask", NULL); > > + if (!prop) { > > + ret = -EINVAL; >

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

2012-08-11 Thread Tabi Timur-B04825
On Tue, Aug 7, 2012 at 3:43 AM, Zhao Chenhui wrote: > +int mpc85xx_pmc_set_wake(struct device *dev, bool enable) > +{ > + int ret = 0; > + struct device_node *clk_np; > + const u32 *prop; > + u32 pmcdr_mask; > + > + if (!pmc_regs) { > + pr_err("%s: PMC

[PATCH 2/4] fsl_pmc: Add API to enable device as wakeup event source

2012-08-07 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 | 77 ++