Re: [PATCH 1/1] nds32: Power management for nds32

2018-10-24 Thread Pavel Machek
Hi! > > Can we get rid of "is_bit_1" array here, and use normal bit operations > > on another variable here? > > > Do you mean like this: > > static int nointc_set_wake(struct irq_data *data, unsigned int on) { > unsigned long int_mask = __nds32__mfsr(NDS32_SR_INT_MASK); >

Re: [PATCH 1/1] nds32: Power management for nds32

2018-10-24 Thread Pavel Machek
Hi! > > Can we get rid of "is_bit_1" array here, and use normal bit operations > > on another variable here? > > > Do you mean like this: > > static int nointc_set_wake(struct irq_data *data, unsigned int on) { > unsigned long int_mask = __nds32__mfsr(NDS32_SR_INT_MASK); >

Re: [PATCH 1/1] nds32: Power management for nds32

2018-10-24 Thread Nick Hu
Hi Pavel, On Wed, Oct 24, 2018 at 02:51:17PM +0800, Pavel Machek wrote: > On Wed 2018-10-24 11:40:07, Nickhu wrote: > > There are three sleep states in nds32: > > suspend to idle, > > suspend to standby, > > suspend to ram > > > > In suspend to ram, we use the 'standby' instruction

Re: [PATCH 1/1] nds32: Power management for nds32

2018-10-24 Thread Nick Hu
Hi Pavel, On Wed, Oct 24, 2018 at 02:51:17PM +0800, Pavel Machek wrote: > On Wed 2018-10-24 11:40:07, Nickhu wrote: > > There are three sleep states in nds32: > > suspend to idle, > > suspend to standby, > > suspend to ram > > > > In suspend to ram, we use the 'standby' instruction

Re: [PATCH 1/1] nds32: Power management for nds32

2018-10-24 Thread Pavel Machek
On Wed 2018-10-24 11:40:07, Nickhu wrote: > There are three sleep states in nds32: > suspend to idle, > suspend to standby, > suspend to ram > > In suspend to ram, we use the 'standby' instruction to emulate > power management device to hang the system util wakeup source > send

Re: [PATCH 1/1] nds32: Power management for nds32

2018-10-24 Thread Pavel Machek
On Wed 2018-10-24 11:40:07, Nickhu wrote: > There are three sleep states in nds32: > suspend to idle, > suspend to standby, > suspend to ram > > In suspend to ram, we use the 'standby' instruction to emulate > power management device to hang the system util wakeup source > send

[PATCH 1/1] nds32: Power management for nds32

2018-10-23 Thread Nickhu
There are three sleep states in nds32: suspend to idle, suspend to standby, suspend to ram In suspend to ram, we use the 'standby' instruction to emulate power management device to hang the system util wakeup source send wakeup events to break the loop. First, we push the

[PATCH 1/1] nds32: Power management for nds32

2018-10-23 Thread Nickhu
There are three sleep states in nds32: suspend to idle, suspend to standby, suspend to ram In suspend to ram, we use the 'standby' instruction to emulate power management device to hang the system util wakeup source send wakeup events to break the loop. First, we push the