Message ID | 1370406751-3852-2-git-send-email-horms+renesas@verge.net.au (mailing list archive) |
---|---|
State | Accepted |
Commit | ded1230a0497a2a65cdc1fa2ac7fcf8ec5d41641 |
Headers | show |
Hi Simon and Morimoto-san, On Wed, Jun 5, 2013 at 1:32 PM, Simon Horman <horms+renesas@verge.net.au> wrote: > This was tested using the SMSC LAN on the APE6EVM board. > > Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au> > --- > drivers/irqchip/irq-renesas-irqc.c | 8 ++++++++ > 1 file changed, 8 insertions(+) Thanks for your patch. I am trying to understand how this controls the actual hardware. Which clock and/or power domain is being controlled using this patch? Cheers, / magnus -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Jun 05, 2013 at 04:03:26PM +0900, Magnus Damm wrote: > Hi Simon and Morimoto-san, > > On Wed, Jun 5, 2013 at 1:32 PM, Simon Horman <horms+renesas@verge.net.au> wrote: > > This was tested using the SMSC LAN on the APE6EVM board. > > > > Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au> > > --- > > drivers/irqchip/irq-renesas-irqc.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > Thanks for your patch. I am trying to understand how this controls the > actual hardware. Which clock and/or power domain is being controlled > using this patch? This patch appears to resolve a problem which I discussed with Morimoto-san on the linux-sh ML and for which he proposed this solution. However, I never fully analysed its effect. I think that the best thing would be for me to drop this patch from the renesas tree for now it and come back to this problem later. -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c index 927bff3..649cd69 100644 --- a/drivers/irqchip/irq-renesas-irqc.c +++ b/drivers/irqchip/irq-renesas-irqc.c @@ -19,6 +19,7 @@ #include <linux/init.h> #include <linux/platform_device.h> +#include <linux/pm_runtime.h> #include <linux/spinlock.h> #include <linux/interrupt.h> #include <linux/ioport.h> @@ -181,6 +182,9 @@ static int irqc_probe(struct platform_device *pdev) goto err1; } + pm_runtime_enable(&pdev->dev); + pm_runtime_get_sync(&pdev->dev); + /* allow any number of IRQs between 1 and IRQC_IRQ_MAX */ for (k = 0; k < IRQC_IRQ_MAX; k++) { irq = platform_get_resource(pdev, IORESOURCE_IRQ, k); @@ -255,6 +259,8 @@ err3: err2: iounmap(p->iomem); err1: + pm_runtime_put_sync(&pdev->dev); + pm_runtime_disable(&pdev->dev); kfree(p); err0: return ret; @@ -270,6 +276,8 @@ static int irqc_remove(struct platform_device *pdev) irq_domain_remove(p->irq_domain); iounmap(p->iomem); + pm_runtime_put_sync(&pdev->dev); + pm_runtime_disable(&pdev->dev); kfree(p); return 0; }