[U-Boot] Interrupt handlers in u-boot

Hi, I am working on u-boot 1.1.6 version for PowerPC 440.I am using the hello world application from the examples folder. I had no issues in loading and executing it. Now I have enabled SPI interrupt in the application. I have written for SPI loopback. My issue is, as there is no interrupt handler defined for the SPI in uboot, whenever i execute my application, it says "Masking bogus interrupt for Vector 0x08". I am calling "install_irq_handler" function for assigning my own interrupt handler for SPI as part of my application itself. I can understand that, there is no exclusive handler for SPI in uboot, so it is disabling the SPI interrupt and printing the BOGUS INTERRUPT message. Now how do I get rid of this and have my own interrupt handler?? Some one please help. Thanks all in advance.
Thanks & Regards, Prathika R

On Wednesday 08 April 2009, prathika wrote:
I am working on u-boot 1.1.6 version for PowerPC 440.
First of all. v1.1.6 is really old. I suggest that you use the current (latest) version instead.
I am using the hello world application from the examples folder. I had no issues in loading and executing it. Now I have enabled SPI interrupt in the application. I have written for SPI loopback. My issue is, as there is no interrupt handler defined for the SPI in uboot, whenever i execute my application, it says "Masking bogus interrupt for Vector 0x08". I am calling "install_irq_handler" function for assigning my own interrupt handler for SPI as part of my application itself. I can understand that, there is no exclusive handler for SPI in uboot, so it is disabling the SPI interrupt and printing the BOGUS INTERRUPT message. Now how do I get rid of this and have my own interrupt handler??
You just need to install you "own" interrupt handler. This is done via install_hdlr(). See examples/interrupt.c.
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================

hi, Thanks for that reply.........I am right away checking those functions install_hdlr() and free_hdlr()..will get back about the results in few minutes..
Thanks & Regards, Prathika R
Stefan Roese wrote:
On Wednesday 08 April 2009, prathika wrote:
I am working on u-boot 1.1.6 version for PowerPC 440.
First of all. v1.1.6 is really old. I suggest that you use the current (latest) version instead.
I am using the hello world application from the examples folder. I had no issues in loading and executing it. Now I have enabled SPI interrupt in the application. I have written for SPI loopback. My issue is, as there is no interrupt handler defined for the SPI in uboot, whenever i execute my application, it says "Masking bogus interrupt for Vector 0x08". I am calling "install_irq_handler" function for assigning my own interrupt handler for SPI as part of my application itself. I can understand that, there is no exclusive handler for SPI in uboot, so it is disabling the SPI interrupt and printing the BOGUS INTERRUPT message. Now how do I get rid of this and have my own interrupt handler??
You just need to install you "own" interrupt handler. This is done via install_hdlr(). See examples/interrupt.c.
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================

hi all, i got the interrupt handler working for SPI Receive in PPC 440 using install_hdlr(). Now i am trying to enable the External IRQ0 in my stand alone application. I am trying to detect the positive of the interrupt pulse, so i wrote corresponding bit to the UIC0_PR and UIC0_EN register and also calling the install_hdlr(). but still it detects the zero state at the IRQ0 pin and always executes the interrupt handler. when i read back the DCRs UIC0 enable and polarity registers using my application, the control word is fine. but when i read using uboot commands getdcr in command window, the status of both enable and polarity registers are not enabled for IRQ0. when i try to set the corresponding bit for IRQ0 using setdcr, it gives me message, "Masking bogus interrupt for 0x17" where am i going wrong.Some one please help. Thanks in advance.
Thanks & Regards, Prathika R.
Stefan Roese wrote:
On Wednesday 08 April 2009, prathika wrote:
I am working on u-boot 1.1.6 version for PowerPC 440.
First of all. v1.1.6 is really old. I suggest that you use the current (latest) version instead.
I am using the hello world application from the examples folder. I had no issues in loading and executing it. Now I have enabled SPI interrupt in the application. I have written for SPI loopback. My issue is, as there is no interrupt handler defined for the SPI in uboot, whenever i execute my application, it says "Masking bogus interrupt for Vector 0x08". I am calling "install_irq_handler" function for assigning my own interrupt handler for SPI as part of my application itself. I can understand that, there is no exclusive handler for SPI in uboot, so it is disabling the SPI interrupt and printing the BOGUS INTERRUPT message. Now how do I get rid of this and have my own interrupt handler??
You just need to install you "own" interrupt handler. This is done via install_hdlr(). See examples/interrupt.c.
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================

On Thursday 09 April 2009, prathika wrote:
i got the interrupt handler working for SPI Receive in PPC 440 using install_hdlr(). Now i am trying to enable the External IRQ0 in my stand alone application. I am trying to detect the positive of the interrupt pulse, so i wrote corresponding bit to the UIC0_PR and UIC0_EN register and also calling the install_hdlr(). but still it detects the zero state at the IRQ0 pin and always executes the interrupt handler. when i read back the DCRs UIC0 enable and polarity registers using my application, the control word is fine. but when i read using uboot commands getdcr in command window, the status of both enable and polarity registers are not enabled for IRQ0. when i try to set the corresponding bit for IRQ0 using setdcr, it gives me message, "Masking bogus interrupt for 0x17" where am i going wrong.Some one please help. Thanks in advance.
So which PPC440 variant are you using? And how did you configure the UIC registers exactly? And is IRQ0 perhaps multiplexed with another multifunction pin (see GPIO chapter)?
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================

i am using PPC 440 EP. i used mtdcr definitions available in uboot. i understand the UIC dcr registers are directly accessable. I have configured IRQ0 as interrupt by writing to the following registers=> GPIO1_TCR[8]=0 GPIO1_TSRL[16:17]=00 GPIO1_ISR1L[16:17]=01
And when thought it could a hardware issue on my board as the IRQ0 is connected to the CPLD, i tried configuring IRQ1. the state of IRQ1 is low. when i enable UIC0_ER register for IRQ1, there is no interrupt generated.but when i enable UIC0_PR for IRQ1 to be detected in positive polarity, an interrupt is generated with a bogus interrupt message. Did i understand the UIC0_PR register functionality wrong?
Thank & Regards, Prathika R
Stefan Roese wrote:
On Thursday 09 April 2009, prathika wrote:
i got the interrupt handler working for SPI Receive in PPC 440 using install_hdlr(). Now i am trying to enable the External IRQ0 in my stand alone application. I am trying to detect the positive of the interrupt pulse, so i wrote corresponding bit to the UIC0_PR and UIC0_EN register and also calling the install_hdlr(). but still it detects the zero state at the IRQ0 pin and always executes the interrupt handler. when i read back the DCRs UIC0 enable and polarity registers using my application, the control word is fine. but when i read using uboot commands getdcr in command window, the status of both enable and polarity registers are not enabled for IRQ0. when i try to set the corresponding bit for IRQ0 using setdcr, it gives me message, "Masking bogus interrupt for 0x17" where am i going wrong.Some one please help. Thanks in advance.
So which PPC440 variant are you using? And how did you configure the UIC registers exactly? And is IRQ0 perhaps multiplexed with another multifunction pin (see GPIO chapter)?
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================
participants (2)
-
prathika
-
Stefan Roese