linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* RE: Request_irq fails for IRQ2
@ 2011-10-03 14:27 smitha.vanga
  2011-10-03 17:24 ` Scott Wood
  2011-10-04  9:25 ` Vijay Nikam
  0 siblings, 2 replies; 10+ messages in thread
From: smitha.vanga @ 2011-10-03 14:27 UTC (permalink / raw)
  To: scottwood; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 2060 bytes --]


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

[-- Attachment #2: Type: text/html, Size: 5718 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Kernel boot up
@ 2011-08-26 20:08 Scott Wood
  2011-10-03 12:31 ` Request_irq fails for IRQ2 smitha.vanga
  0 siblings, 1 reply; 10+ messages in thread
From: Scott Wood @ 2011-08-26 20:08 UTC (permalink / raw)
  To: smitha.vanga; +Cc: linuxppc-dev

On 08/26/2011 01:00 AM, smitha.vanga@wipro.com wrote:
>  
> Thanks scott.
> 
> There was an issue with the file system. Now my board is up with the
> linux boot prompt .
> But ping is not working. 

You still haven't set your MAC address.  U-Boot should be fixing this up
in the device tree.

> The local loopback ping works. My phy chip
> BCM5221 is connected on port A

Your device tree describes a connection on port C.  You need to update
the mdio node's reg to point to port A's registers (0x10d00), and
fsl,mdio-pin and fsl,mdc-pin need to be set to the particular pins your
board uses.

-Scott

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-10-09  7:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-03 14:27 Request_irq fails for IRQ2 smitha.vanga
2011-10-03 17:24 ` Scott Wood
2011-10-04  6:15   ` smitha.vanga
2011-10-04 11:21   ` smitha.vanga
2011-10-04 15:30     ` Scott Wood
2011-10-09  7:07     ` Benjamin Herrenschmidt
2011-10-04 13:55   ` smitha.vanga
2011-10-09  7:11     ` Benjamin Herrenschmidt
2011-10-04  9:25 ` Vijay Nikam
  -- strict thread matches above, loose matches on Subject: below --
2011-08-26 20:08 Kernel boot up Scott Wood
2011-10-03 12:31 ` Request_irq fails for IRQ2 smitha.vanga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).