Thread (1 message) 1 message, 1 author, 2014-11-26

Lubbock interrupts fix (was lubbock udc phy)

From: Dmitry Eremin-Solenikov <hidden>
Date: 2014-11-26 22:39:43

2014-11-27 1:38 GMT+03:00 Robert Jarzmik [off-list ref]:
Dmitry Eremin-Solenikov [off-list ref] writes:
quoted
2014-11-27 1:12 GMT+03:00 Robert Jarzmik [off-list ref]:
quoted
OK Dmitry, I pulled through, the interrupts are working back.
What was the problem? Hardware issues? Firmware in CPLD being of old
revision?
There were basically 2 problems :
 - hardware: switch S13 was in a position that disabled interrupts all the time
   One other problem which fooled me was the incorrect gate schematics I had,
   and which make my understanding of linear function foo such as
   GPIO0 = foo(LUB_IRQ_EN, LUB_SET_CLR) false.

 - software: lubbock.c error
   Since gpio-pxa was ported to device/gpio, it is probed *after*
   lubbock_init_irq() is called. As lubbock_init_irq() installs
   lubbock_irq_handler() and sets the irq to falling edge detect before gpio-pxa
   is probed, gpio-pxa probe overwrites this by :
     - clearing any edge detection (probe state reset)
     - installing generic handle_edge_irq() instead of the lubbock irq handler

So the conclusion is that I have to rework lubbock_init_irq(), remove from it
the PXA_GPIO_TO_IRQ(0) stuff, and move it to a code in lubbock.c which will
provide the guarantee of being executed _after_ gpio-pxa is probed. When I'm
happy with my patch I'll submit it.
Thank you for your explanation.

-- 
With best wishes
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help