ARM: S5P: Can handle edge interrupt handler
Subsystems (3)
PATCH 1/1 ARM: S5P: Can handle edge interrupt handler
From: KeyYoung Park <[email protected]>
While wake up, if external interrupt uses handle_level_irq
as handle_irq (it actually uses edge type irq), That interrupt is missed. So, if external uses edge type irq, it should use handle_edge_irq.
--- arch/arm/plat-s5p/irq-eint.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/plat-s5p/irq-eint.c +6 -0
@@ -65,6 +65,7 @@ static int s5p_irq_eint_set_type(struct irq_data *data, unsigned int type)int shift;u32 ctrl, mask;u32 newvalue =0 ; +struct irq_desc *desc =irq_to_desc (data->irq);switch (type) {case IRQ_TYPE_EDGE_RISING :
@@ -115,6 +116,11 @@ static int s5p_irq_eint_set_type(struct irq_data *data, unsigned int type)else printk (KERN_ERR "No such irq number %d" , offs); +if (type &IRQ_TYPE_EDGE_BOTH ) + desc->handle_irq = handle_edge_irq; +else + desc->handle_irq = handle_level_irq; +return 0 ; }
Signature · 1 line
1.7.1
PATCH 1/1 ARM: S5P: Can handle edge interrupt handler
I wonder if same thing wouldn't be also needed for s3c64xx.
Also please see my comments inline.
Quoted 25 lines · On Friday 10 of February 2012 22:02:42 Huisung Kang wrote:
From: KeyYoung Park <[email protected]>
While wake up, if external interrupt uses
handle_level_irq
ashandle_irq(it actually uses edge type irq), That interrupt is missed. So, if external uses edge type irq, it should usehandle_edge_irq.Signed-off-by KeyYoung Park <[email protected]>Signed-off-by Huisung Kang <[email protected]>--- arch/arm/plat-s5p/irq-eint.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)arch/arm/plat-s5p/irq-eint.c +1
-0@@ -65,6 +65,7 @@ static int s5p_irq_eint_set_type(struct irq_data *data, unsigned int type) int shift;u32 ctrl, mask;u32 newvalue =0 ; +struct irq_desc *desc =irq_to_desc (data->irq);switch (type) {case IRQ_TYPE_EDGE_RISING :
arch/arm/plat-s5p/irq-eint.c static int s5p_irq_eint_set_type(struct irq_data · line 122
Quoted 7 lines
arch/arm/plat-s5p/irq-eint.c +4
-0@@ -115,6 +116,11 @@ static int s5p_irq_eint_set_type(struct irq_data *data, unsigned int type) else printk(KERN_ERR "No such irq number %d", offs); +if (type &IRQ_TYPE_EDGE_BOTH ) + desc->handle_irq = handle_edge_irq; +else + desc->handle_irq = handle_level_irq;
Maybe it would be better to use __irq_set_handler_locked here instead of touching irq_desc directly?
arch/arm/plat-s5p/irq-eint.c static int s5p_irq_eint_set_type(struct irq_data *data, unsigned int type) · line 125
Quoted 3 lines
arch/arm/plat-s5p/irq-eint.c +1
-0+return 0 ; }
Regards,
Tom
PATCH 1/1 ARM: S5P: Can handle edge interrupt handler
Quoted 41 lines
From: linux-samsung-soc-owner at vger.kernel.org [mailto:linux-samsung-soc-owner at vger.kernel.org] On Behalf Of Tomasz Figa
Sent: Saturday, February 11, 2012 5:02 AM
To: Huisung Kang
Cc: linux-arm-kernel at lists.infradead.org; linux-samsung-soc at vger.kernel.org; kgene.kim at samsung.com; keyyoung.park at samsung.com
Subject: Re: [PATCH] ARM: S5P: Can handle edge interrupt handlerI wonder if same thing wouldn't be also needed for s3c64xx.
Also please see my comments inline.
Quoted 28 lines · On Friday 10 of February 2012 22:02:42 Huisung Kang wrote:
From: KeyYoung Park <[email protected]>
While wake up, if external interrupt uses
handle_level_irqashandle_irq(it actually uses edge type irq), That interrupt is missed. So, if external uses edge type irq, it should usehandle_edge_irq.Signed-off-by KeyYoung Park <[email protected]>Signed-off-by Huisung Kang <[email protected]>--- arch/arm/plat-s5p/irq-eint.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/arch/arm/plat-s5p/irq-eint.cindex c496b35..6ed395e 100644arch/arm/plat-s5p/irq-eint.c +1
-0@@ -65,6 +65,7 @@ static int s5p_irq_eint_set_type(struct irq_data *data, unsigned int type) int shift;u32 ctrl, mask;u32 newvalue =0 ; +struct irq_desc *desc =irq_to_desc (data->irq);switch (type) {case IRQ_TYPE_EDGE_RISING :@@ -115,6 +116,11 @@ static int s5p_irq_eint_set_type(struct irq_data *data, unsigned int type) else printk(KERN_ERR "No such irq number %d", offs);
Quoted 6 lines
arch/arm/plat-s5p/irq-eint.c static int s5p_irq_eint_set_type(struct irq_data *data, unsigned int type) · line 122
Quoted 4 lines
arch/arm/plat-s5p/irq-eint.c +4
-0+if (type &IRQ_TYPE_EDGE_BOTH ) + desc->handle_irq = handle_edge_irq; +else + desc->handle_irq = handle_level_irq;Maybe it would be better to use
__irq_set_handler_lockedhere instead of touchingirq_descdirectly?
Thanks for your review. I will send new patch.
Quoted 11 lines
arch/arm/plat-s5p/irq-eint.c static int s5p_irq_eint_set_type(struct irq_data *data, unsigned int type) · line 125
Quoted 4 lines
arch/arm/plat-s5p/irq-eint.c +1
-0+return 0 ; }Regards,
Tom--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html