Hi Scott,

 I try to request an IRQ (IRQ2 and IRQ3 which are ineterrupt no 20 and 21 in 
mpc8247)in my driver . The
Call fails in setup_irq in Manage.c at /kernel/irq.

Setup _irq returns -ENOSYS

if (desc->irq_data.chip == &no_irq_chip)
                 return -ENOSYS;


I found that I need to pass the virtual interrupt number instead of hardware 
interrupt number.
So I added below piece of code

Below is the call to request irq in my driver.

virq = irq_create_mapping(NULL, CPLD1_INTERRUPT);




   if ((ret = request_irq(virq,cpld_irq_handler, 0, GPIO_CHAR_PATH, NULL))!=0)
   {
      printk(KERN_ERR "gpio_init: Could not grab IRQ line for CPLD ret = 
%d\n",ret);
          goto err1;
   }


Now it fails in irq_create_mapping   with NO_IRQ error.

if (controller == NULL)
                host = irq_default_host;
else
                host = irq_find_host(controller);
if (host == NULL) {
                printk(KERN_WARNING "irq: no irq host found for %s !\n",
                       controller->full_name);
                return NO_IRQ;
        }


I just don't know what I should pass for host , also when I pass NULL for host 
. I see the default host is NULL..
Could you please help me. My project delivery is near , I need  help soon.


Regards,
Smitha



Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.com
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to