All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support
@ 2013-01-31  3:10 Wang Dongsheng
  2013-02-18  2:52 ` Wang Dongsheng-B40534
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Wang Dongsheng @ 2013-01-31  3:10 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Wang Dongsheng

Add irq_set_wake support. Just add IRQF_NO_SUSPEND to desc->action->flag.
So the wake up interrupt will not be disable in suspend_device_irqs.

Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
---
 arch/powerpc/sysdev/mpic.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 9c6e535..2ed0220 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -920,6 +920,18 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int flow_type)
 	return IRQ_SET_MASK_OK_NOCOPY;
 }

+static int mpic_irq_set_wake(struct irq_data *d, unsigned int on)
+{
+	struct irq_desc *desc = container_of(d, struct irq_desc, irq_data);
+
+	if (on)
+		desc->action->flags |= IRQF_NO_SUSPEND;
+	else
+		desc->action->flags &= ~IRQF_NO_SUSPEND;
+
+	return 0;
+}
+
 void mpic_set_vector(unsigned int virq, unsigned int vector)
 {
 	struct mpic *mpic = mpic_from_irq(virq);
@@ -957,6 +969,7 @@ static struct irq_chip mpic_irq_chip = {
 	.irq_unmask	= mpic_unmask_irq,
 	.irq_eoi	= mpic_end_irq,
 	.irq_set_type	= mpic_set_irq_type,
+	.irq_set_wake	= mpic_irq_set_wake,
 };

 #ifdef CONFIG_SMP
@@ -971,6 +984,7 @@ static struct irq_chip mpic_tm_chip = {
 	.irq_mask	= mpic_mask_tm,
 	.irq_unmask	= mpic_unmask_tm,
 	.irq_eoi	= mpic_end_irq,
+	.irq_set_wake	= mpic_irq_set_wake,
 };

 #ifdef CONFIG_MPIC_U3_HT_IRQS
@@ -981,6 +995,7 @@ static struct irq_chip mpic_irq_ht_chip = {
 	.irq_unmask	= mpic_unmask_ht_irq,
 	.irq_eoi	= mpic_end_ht_irq,
 	.irq_set_type	= mpic_set_irq_type,
+	.irq_set_wake	= mpic_irq_set_wake,
 };
 #endif /* CONFIG_MPIC_U3_HT_IRQS */

--
1.7.5.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* RE: [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support
  2013-01-31  3:10 [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support Wang Dongsheng
@ 2013-02-18  2:52 ` Wang Dongsheng-B40534
  2013-02-18 19:43 ` Kumar Gala
  2013-03-18 23:36 ` Scott Wood
  2 siblings, 0 replies; 8+ messages in thread
From: Wang Dongsheng-B40534 @ 2013-02-18  2:52 UTC (permalink / raw)
  To: Kumar Gala, linuxppc-dev

Hi Kumar,
Could you ack this patch?
Thanks.

> -----Original Message-----
> From: Wang Dongsheng-B40534
> Sent: Thursday, January 31, 2013 11:10 AM
> To: linuxppc-dev@lists.ozlabs.org
> Cc: Wang Dongsheng-B40534
> Subject: [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support
>=20
> Add irq_set_wake support. Just add IRQF_NO_SUSPEND to desc->action->flag.
> So the wake up interrupt will not be disable in suspend_device_irqs.
>=20
> Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
> ---
>  arch/powerpc/sysdev/mpic.c |   15 +++++++++++++++
>  1 files changed, 15 insertions(+), 0 deletions(-)
>=20
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 9c6e535..2ed0220 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -920,6 +920,18 @@ int mpic_set_irq_type(struct irq_data *d, unsigned
> int flow_type)
>  	return IRQ_SET_MASK_OK_NOCOPY;
>  }
>=20
> +static int mpic_irq_set_wake(struct irq_data *d, unsigned int on)
> +{
> +	struct irq_desc *desc =3D container_of(d, struct irq_desc, irq_data);
> +
> +	if (on)
> +		desc->action->flags |=3D IRQF_NO_SUSPEND;
> +	else
> +		desc->action->flags &=3D ~IRQF_NO_SUSPEND;
> +
> +	return 0;
> +}
> +
>  void mpic_set_vector(unsigned int virq, unsigned int vector)
>  {
>  	struct mpic *mpic =3D mpic_from_irq(virq);
> @@ -957,6 +969,7 @@ static struct irq_chip mpic_irq_chip =3D {
>  	.irq_unmask	=3D mpic_unmask_irq,
>  	.irq_eoi	=3D mpic_end_irq,
>  	.irq_set_type	=3D mpic_set_irq_type,
> +	.irq_set_wake	=3D mpic_irq_set_wake,
>  };
>=20
>  #ifdef CONFIG_SMP
> @@ -971,6 +984,7 @@ static struct irq_chip mpic_tm_chip =3D {
>  	.irq_mask	=3D mpic_mask_tm,
>  	.irq_unmask	=3D mpic_unmask_tm,
>  	.irq_eoi	=3D mpic_end_irq,
> +	.irq_set_wake	=3D mpic_irq_set_wake,
>  };
>=20
>  #ifdef CONFIG_MPIC_U3_HT_IRQS
> @@ -981,6 +995,7 @@ static struct irq_chip mpic_irq_ht_chip =3D {
>  	.irq_unmask	=3D mpic_unmask_ht_irq,
>  	.irq_eoi	=3D mpic_end_ht_irq,
>  	.irq_set_type	=3D mpic_set_irq_type,
> +	.irq_set_wake	=3D mpic_irq_set_wake,
>  };
>  #endif /* CONFIG_MPIC_U3_HT_IRQS */
>=20
> --
> 1.7.5.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support
  2013-01-31  3:10 [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support Wang Dongsheng
  2013-02-18  2:52 ` Wang Dongsheng-B40534
@ 2013-02-18 19:43 ` Kumar Gala
  2013-02-20  5:57   ` Wang Dongsheng-B40534
  2013-03-06  9:13   ` Wang Dongsheng-B40534
  2013-03-18 23:36 ` Scott Wood
  2 siblings, 2 replies; 8+ messages in thread
From: Kumar Gala @ 2013-02-18 19:43 UTC (permalink / raw)
  To: Wang Dongsheng; +Cc: linuxppc-dev


On Jan 30, 2013, at 9:10 PM, Wang Dongsheng wrote:

> Add irq_set_wake support. Just add IRQF_NO_SUSPEND to =
desc->action->flag.
> So the wake up interrupt will not be disable in suspend_device_irqs.
>=20
> Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
> ---
> arch/powerpc/sysdev/mpic.c |   15 +++++++++++++++
> 1 files changed, 15 insertions(+), 0 deletions(-)

Why are we doing this globally for all interrupts?  Don't we only have =
some specific interrupts that wake us up?

Also, I'm guessing the wake behavior for interrupts is FSL specific so =
should not apply to ALL users of MPIC.

- k

>=20
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 9c6e535..2ed0220 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -920,6 +920,18 @@ int mpic_set_irq_type(struct irq_data *d, =
unsigned int flow_type)
> 	return IRQ_SET_MASK_OK_NOCOPY;
> }
>=20
> +static int mpic_irq_set_wake(struct irq_data *d, unsigned int on)
> +{
> +	struct irq_desc *desc =3D container_of(d, struct irq_desc, =
irq_data);
> +
> +	if (on)
> +		desc->action->flags |=3D IRQF_NO_SUSPEND;
> +	else
> +		desc->action->flags &=3D ~IRQF_NO_SUSPEND;
> +
> +	return 0;
> +}
> +
> void mpic_set_vector(unsigned int virq, unsigned int vector)
> {
> 	struct mpic *mpic =3D mpic_from_irq(virq);
> @@ -957,6 +969,7 @@ static struct irq_chip mpic_irq_chip =3D {
> 	.irq_unmask	=3D mpic_unmask_irq,
> 	.irq_eoi	=3D mpic_end_irq,
> 	.irq_set_type	=3D mpic_set_irq_type,
> +	.irq_set_wake	=3D mpic_irq_set_wake,
> };
>=20
> #ifdef CONFIG_SMP
> @@ -971,6 +984,7 @@ static struct irq_chip mpic_tm_chip =3D {
> 	.irq_mask	=3D mpic_mask_tm,
> 	.irq_unmask	=3D mpic_unmask_tm,
> 	.irq_eoi	=3D mpic_end_irq,
> +	.irq_set_wake	=3D mpic_irq_set_wake,
> };
>=20
> #ifdef CONFIG_MPIC_U3_HT_IRQS
> @@ -981,6 +995,7 @@ static struct irq_chip mpic_irq_ht_chip =3D {
> 	.irq_unmask	=3D mpic_unmask_ht_irq,
> 	.irq_eoi	=3D mpic_end_ht_irq,
> 	.irq_set_type	=3D mpic_set_irq_type,
> +	.irq_set_wake	=3D mpic_irq_set_wake,
> };
> #endif /* CONFIG_MPIC_U3_HT_IRQS */
>=20
> --
> 1.7.5.1
>=20
>=20
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support
  2013-02-18 19:43 ` Kumar Gala
@ 2013-02-20  5:57   ` Wang Dongsheng-B40534
  2013-03-06  9:13   ` Wang Dongsheng-B40534
  1 sibling, 0 replies; 8+ messages in thread
From: Wang Dongsheng-B40534 @ 2013-02-20  5:57 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev



> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]
> Sent: Tuesday, February 19, 2013 3:43 AM
> To: Wang Dongsheng-B40534
> Cc: linuxppc-dev@lists.ozlabs.org
> Subject: Re: [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support
>=20
>=20
> On Jan 30, 2013, at 9:10 PM, Wang Dongsheng wrote:
>=20
> > Add irq_set_wake support. Just add IRQF_NO_SUSPEND to desc->action-
> >flag.
> > So the wake up interrupt will not be disable in suspend_device_irqs.
> >
> > Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
> > ---
> > arch/powerpc/sysdev/mpic.c |   15 +++++++++++++++
> > 1 files changed, 15 insertions(+), 0 deletions(-)
>=20
> Why are we doing this globally for all interrupts? Don't we only have=20
> some specific interrupts that wake us up?
> Also, I'm guessing the wake behavior for interrupts is FSL specific so
> should not apply to ALL users of MPIC.

That is IRQ wakeup (PM) control. Actually not all interrupts will be set.
We just let mpic have this ability. It's control by driver.
If a device has the ability to wake up system, this device driver can set
irq wake up(through enable/disable_irq_wake()), and the driver do not need
add a flag(IRQF_NO_SUSPEND) to request_irq().

for example,

suspend()
{
	...;
	enable_irq_wake(irq);
	...;
}

resume()
{
	...;
	disable_irq_wake(irq);
	...;
}

>=20
> - k
>=20

> >
> > diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> > index 9c6e535..2ed0220 100644
> > --- a/arch/powerpc/sysdev/mpic.c
> > +++ b/arch/powerpc/sysdev/mpic.c
> > @@ -920,6 +920,18 @@ int mpic_set_irq_type(struct irq_data *d, unsigned
> int flow_type)
> > 	return IRQ_SET_MASK_OK_NOCOPY;
> > }
> >
> > +static int mpic_irq_set_wake(struct irq_data *d, unsigned int on) {
> > +	struct irq_desc *desc =3D container_of(d, struct irq_desc, irq_data);
> > +
> > +	if (on)
> > +		desc->action->flags |=3D IRQF_NO_SUSPEND;
> > +	else
> > +		desc->action->flags &=3D ~IRQF_NO_SUSPEND;
> > +
> > +	return 0;
> > +}
> > +
> > void mpic_set_vector(unsigned int virq, unsigned int vector) {
> > 	struct mpic *mpic =3D mpic_from_irq(virq); @@ -957,6 +969,7 @@ static
> > struct irq_chip mpic_irq_chip =3D {
> > 	.irq_unmask	=3D mpic_unmask_irq,
> > 	.irq_eoi	=3D mpic_end_irq,
> > 	.irq_set_type	=3D mpic_set_irq_type,
> > +	.irq_set_wake	=3D mpic_irq_set_wake,
> > };
> >
> > #ifdef CONFIG_SMP
> > @@ -971,6 +984,7 @@ static struct irq_chip mpic_tm_chip =3D {
> > 	.irq_mask	=3D mpic_mask_tm,
> > 	.irq_unmask	=3D mpic_unmask_tm,
> > 	.irq_eoi	=3D mpic_end_irq,
> > +	.irq_set_wake	=3D mpic_irq_set_wake,
> > };
> >
> > #ifdef CONFIG_MPIC_U3_HT_IRQS
> > @@ -981,6 +995,7 @@ static struct irq_chip mpic_irq_ht_chip =3D {
> > 	.irq_unmask	=3D mpic_unmask_ht_irq,
> > 	.irq_eoi	=3D mpic_end_ht_irq,
> > 	.irq_set_type	=3D mpic_set_irq_type,
> > +	.irq_set_wake	=3D mpic_irq_set_wake,
> > };
> > #endif /* CONFIG_MPIC_U3_HT_IRQS */
> >
> > --
> > 1.7.5.1
> >
> >
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@lists.ozlabs.org
> > https://lists.ozlabs.org/listinfo/linuxppc-dev
>=20

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support
  2013-02-18 19:43 ` Kumar Gala
  2013-02-20  5:57   ` Wang Dongsheng-B40534
@ 2013-03-06  9:13   ` Wang Dongsheng-B40534
  1 sibling, 0 replies; 8+ messages in thread
From: Wang Dongsheng-B40534 @ 2013-03-06  9:13 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev

Hi Benjamin,

Could you please apply this patch?

Regards,
dongsheng

> -----Original Message-----
> From: Wang Dongsheng-B40534
> Sent: Wednesday, February 20, 2013 1:58 PM
> To: 'Kumar Gala'
> Cc: linuxppc-dev@lists.ozlabs.org
> Subject: RE: [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support
>=20
>=20
>=20
> > -----Original Message-----
> > From: Kumar Gala [mailto:galak@kernel.crashing.org]
> > Sent: Tuesday, February 19, 2013 3:43 AM
> > To: Wang Dongsheng-B40534
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Subject: Re: [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support
> >
> >
> > On Jan 30, 2013, at 9:10 PM, Wang Dongsheng wrote:
> >
> > > Add irq_set_wake support. Just add IRQF_NO_SUSPEND to desc->action-
> > >flag.
> > > So the wake up interrupt will not be disable in suspend_device_irqs.
> > >
> > > Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
> > > ---
> > > arch/powerpc/sysdev/mpic.c |   15 +++++++++++++++
> > > 1 files changed, 15 insertions(+), 0 deletions(-)
> >
> > Why are we doing this globally for all interrupts? Don't we only have
> > some specific interrupts that wake us up?
> > Also, I'm guessing the wake behavior for interrupts is FSL specific so
> > should not apply to ALL users of MPIC.
>=20
> That is IRQ wakeup (PM) control. Actually not all interrupts will be set.
> We just let mpic have this ability. It's control by driver.
> If a device has the ability to wake up system, this device driver can set
> irq wake up(through enable/disable_irq_wake()), and the driver do not
> need add a flag(IRQF_NO_SUSPEND) to request_irq().
>=20
> for example,
>=20
> suspend()
> {
> 	...;
> 	enable_irq_wake(irq);
> 	...;
> }
>=20
> resume()
> {
> 	...;
> 	disable_irq_wake(irq);
> 	...;
> }
>=20
> >
> > - k
> >
>=20
> > >
> > > diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> > > index 9c6e535..2ed0220 100644
> > > --- a/arch/powerpc/sysdev/mpic.c
> > > +++ b/arch/powerpc/sysdev/mpic.c
> > > @@ -920,6 +920,18 @@ int mpic_set_irq_type(struct irq_data *d,
> > > unsigned
> > int flow_type)
> > > 	return IRQ_SET_MASK_OK_NOCOPY;
> > > }
> > >
> > > +static int mpic_irq_set_wake(struct irq_data *d, unsigned int on) {
> > > +	struct irq_desc *desc =3D container_of(d, struct irq_desc,
> > > +irq_data);
> > > +
> > > +	if (on)
> > > +		desc->action->flags |=3D IRQF_NO_SUSPEND;
> > > +	else
> > > +		desc->action->flags &=3D ~IRQF_NO_SUSPEND;
> > > +
> > > +	return 0;
> > > +}
> > > +
> > > void mpic_set_vector(unsigned int virq, unsigned int vector) {
> > > 	struct mpic *mpic =3D mpic_from_irq(virq); @@ -957,6 +969,7 @@ stati=
c
> > > struct irq_chip mpic_irq_chip =3D {
> > > 	.irq_unmask	=3D mpic_unmask_irq,
> > > 	.irq_eoi	=3D mpic_end_irq,
> > > 	.irq_set_type	=3D mpic_set_irq_type,
> > > +	.irq_set_wake	=3D mpic_irq_set_wake,
> > > };
> > >
> > > #ifdef CONFIG_SMP
> > > @@ -971,6 +984,7 @@ static struct irq_chip mpic_tm_chip =3D {
> > > 	.irq_mask	=3D mpic_mask_tm,
> > > 	.irq_unmask	=3D mpic_unmask_tm,
> > > 	.irq_eoi	=3D mpic_end_irq,
> > > +	.irq_set_wake	=3D mpic_irq_set_wake,
> > > };
> > >
> > > #ifdef CONFIG_MPIC_U3_HT_IRQS
> > > @@ -981,6 +995,7 @@ static struct irq_chip mpic_irq_ht_chip =3D {
> > > 	.irq_unmask	=3D mpic_unmask_ht_irq,
> > > 	.irq_eoi	=3D mpic_end_ht_irq,
> > > 	.irq_set_type	=3D mpic_set_irq_type,
> > > +	.irq_set_wake	=3D mpic_irq_set_wake,
> > > };
> > > #endif /* CONFIG_MPIC_U3_HT_IRQS */
> > >
> > > --
> > > 1.7.5.1
> > >
> > >
> > > _______________________________________________
> > > Linuxppc-dev mailing list
> > > Linuxppc-dev@lists.ozlabs.org
> > > https://lists.ozlabs.org/listinfo/linuxppc-dev
> >

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support
  2013-01-31  3:10 [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support Wang Dongsheng
  2013-02-18  2:52 ` Wang Dongsheng-B40534
  2013-02-18 19:43 ` Kumar Gala
@ 2013-03-18 23:36 ` Scott Wood
  2013-03-19  7:10   ` Wang Dongsheng-B40534
  2 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2013-03-18 23:36 UTC (permalink / raw)
  To: Wang Dongsheng; +Cc: linuxppc-dev

On 01/30/2013 09:10:23 PM, Wang Dongsheng wrote:
> Add irq_set_wake support. Just add IRQF_NO_SUSPEND to =20
> desc->action->flag.
> So the wake up interrupt will not be disable in suspend_device_irqs.
>=20
> Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
> ---
>  arch/powerpc/sysdev/mpic.c |   15 +++++++++++++++
>  1 files changed, 15 insertions(+), 0 deletions(-)
>=20
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 9c6e535..2ed0220 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -920,6 +920,18 @@ int mpic_set_irq_type(struct irq_data *d, =20
> unsigned int flow_type)
>  	return IRQ_SET_MASK_OK_NOCOPY;
>  }
>=20
> +static int mpic_irq_set_wake(struct irq_data *d, unsigned int on)
> +{
> +	struct irq_desc *desc =3D container_of(d, struct irq_desc, =20
> irq_data);
> +
> +	if (on)
> +		desc->action->flags |=3D IRQF_NO_SUSPEND;
> +	else
> +		desc->action->flags &=3D ~IRQF_NO_SUSPEND;
> +
> +	return 0;
> +}

This should really be something like fsl_mpic_irq_set_wake() and only =20
set when we have an FSL MPIC.

>  void mpic_set_vector(unsigned int virq, unsigned int vector)
>  {
>  	struct mpic *mpic =3D mpic_from_irq(virq);
> @@ -957,6 +969,7 @@ static struct irq_chip mpic_irq_chip =3D {
>  	.irq_unmask	=3D mpic_unmask_irq,
>  	.irq_eoi	=3D mpic_end_irq,
>  	.irq_set_type	=3D mpic_set_irq_type,
> +	.irq_set_wake	=3D mpic_irq_set_wake,
>  };
>=20
>  #ifdef CONFIG_SMP
> @@ -971,6 +984,7 @@ static struct irq_chip mpic_tm_chip =3D {
>  	.irq_mask	=3D mpic_mask_tm,
>  	.irq_unmask	=3D mpic_unmask_tm,
>  	.irq_eoi	=3D mpic_end_irq,
> +	.irq_set_wake	=3D mpic_irq_set_wake,
>  };
>=20
>  #ifdef CONFIG_MPIC_U3_HT_IRQS
> @@ -981,6 +995,7 @@ static struct irq_chip mpic_irq_ht_chip =3D {
>  	.irq_unmask	=3D mpic_unmask_ht_irq,
>  	.irq_eoi	=3D mpic_end_ht_irq,
>  	.irq_set_type	=3D mpic_set_irq_type,
> +	.irq_set_wake	=3D mpic_irq_set_wake,
>  };
>  #endif /* CONFIG_MPIC_U3_HT_IRQS */

Why ht?

-Scott=

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support
  2013-03-18 23:36 ` Scott Wood
@ 2013-03-19  7:10   ` Wang Dongsheng-B40534
  2013-03-19 16:00     ` Scott Wood
  0 siblings, 1 reply; 8+ messages in thread
From: Wang Dongsheng-B40534 @ 2013-03-19  7:10 UTC (permalink / raw)
  To: Wood Scott-B07421; +Cc: linuxppc-dev



> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Tuesday, March 19, 2013 7:36 AM
> To: Wang Dongsheng-B40534
> Cc: linuxppc-dev@lists.ozlabs.org; galak@kernel.crashing.org
> Subject: Re: [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support
>=20
> On 01/30/2013 09:10:23 PM, Wang Dongsheng wrote:
> > Add irq_set_wake support. Just add IRQF_NO_SUSPEND to
> > desc->action->flag.
> > So the wake up interrupt will not be disable in suspend_device_irqs.
> >
> > Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
> > ---
> >  arch/powerpc/sysdev/mpic.c |   15 +++++++++++++++
> >  1 files changed, 15 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> > index 9c6e535..2ed0220 100644
> > --- a/arch/powerpc/sysdev/mpic.c
> > +++ b/arch/powerpc/sysdev/mpic.c
> > @@ -920,6 +920,18 @@ int mpic_set_irq_type(struct irq_data *d,
> > unsigned int flow_type)
> >  	return IRQ_SET_MASK_OK_NOCOPY;
> >  }
> >
> > +static int mpic_irq_set_wake(struct irq_data *d, unsigned int on)
> > +{
> > +	struct irq_desc *desc =3D container_of(d, struct irq_desc,
> > irq_data);
> > +
> > +	if (on)
> > +		desc->action->flags |=3D IRQF_NO_SUSPEND;
> > +	else
> > +		desc->action->flags &=3D ~IRQF_NO_SUSPEND;
> > +
> > +	return 0;
> > +}
>=20
> This should really be something like fsl_mpic_irq_set_wake() and only
> set when we have an FSL MPIC.
>=20
Thanks, Add "#ifdef FSL_SOC" to control.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support
  2013-03-19  7:10   ` Wang Dongsheng-B40534
@ 2013-03-19 16:00     ` Scott Wood
  0 siblings, 0 replies; 8+ messages in thread
From: Scott Wood @ 2013-03-19 16:00 UTC (permalink / raw)
  To: Wang Dongsheng-B40534; +Cc: Wood Scott-B07421, linuxppc-dev

On 03/19/2013 02:10:38 AM, Wang Dongsheng-B40534 wrote:
>=20
>=20
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Tuesday, March 19, 2013 7:36 AM
> > To: Wang Dongsheng-B40534
> > Cc: linuxppc-dev@lists.ozlabs.org; galak@kernel.crashing.org
> > Subject: Re: [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support
> >
> > On 01/30/2013 09:10:23 PM, Wang Dongsheng wrote:
> > > Add irq_set_wake support. Just add IRQF_NO_SUSPEND to
> > > desc->action->flag.
> > > So the wake up interrupt will not be disable in =20
> suspend_device_irqs.
> > >
> > > Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
> > > ---
> > >  arch/powerpc/sysdev/mpic.c |   15 +++++++++++++++
> > >  1 files changed, 15 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/arch/powerpc/sysdev/mpic.c =20
> b/arch/powerpc/sysdev/mpic.c
> > > index 9c6e535..2ed0220 100644
> > > --- a/arch/powerpc/sysdev/mpic.c
> > > +++ b/arch/powerpc/sysdev/mpic.c
> > > @@ -920,6 +920,18 @@ int mpic_set_irq_type(struct irq_data *d,
> > > unsigned int flow_type)
> > >  	return IRQ_SET_MASK_OK_NOCOPY;
> > >  }
> > >
> > > +static int mpic_irq_set_wake(struct irq_data *d, unsigned int on)
> > > +{
> > > +	struct irq_desc *desc =3D container_of(d, struct irq_desc,
> > > irq_data);
> > > +
> > > +	if (on)
> > > +		desc->action->flags |=3D IRQF_NO_SUSPEND;
> > > +	else
> > > +		desc->action->flags &=3D ~IRQF_NO_SUSPEND;
> > > +
> > > +	return 0;
> > > +}
> >
> > This should really be something like fsl_mpic_irq_set_wake() and =20
> only
> > set when we have an FSL MPIC.
> >
> Thanks, Add "#ifdef FSL_SOC" to control.

That's not what I meant.  Check "mpic->flags & MPIC_FSL".

-Scott=

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-03-19 16:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-31  3:10 [PATCH][UPSTEAM] powerpc/mpic: add irq_set_wake support Wang Dongsheng
2013-02-18  2:52 ` Wang Dongsheng-B40534
2013-02-18 19:43 ` Kumar Gala
2013-02-20  5:57   ` Wang Dongsheng-B40534
2013-03-06  9:13   ` Wang Dongsheng-B40534
2013-03-18 23:36 ` Scott Wood
2013-03-19  7:10   ` Wang Dongsheng-B40534
2013-03-19 16:00     ` Scott Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.