Re: How do we allocate virtual floppy irq on sparc64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 17, 2011 at 01:05:03PM -0800, David Miller wrote:
> From: Sam Ravnborg <sam@xxxxxxxxxxxx>
> Date: Thu, 17 Feb 2011 21:57:48 +0100
> 
> > I'm trying to understand how we deal with floppy irq on sparc64.
> > 
> > In arch/sparc/include/asm/floppy_64.h we have:
> > 
> >                error = request_irq(FLOPPY_IRQ, sparc_floppy_irq,
> >                                     IRQF_DISABLED, "floppy", NULL);
> > 
> > FLOPPY_IRQ is set equal op->archdata.irqs[0] in sun_floppy_init().
> > So FLOPPY_IRQ is the platform irq - and not a virtual irq.
> 
> The archdata IRQ is actually the computed virtual IRQ.
> 
> This is the same as how we fetch the IRQ to use in other "OF" platform
> drivers.
> 
> Look at drivers/net/sunhme.c's OF platform driver probing, it uses
> of->archdata.irqs[0] as the IRQ.

Obvious - now that you spell it out for me.
For sparc32 I already in my tree call build_device_irq in
of_device_32.c:__init scan_one_device().
So I just have to look up the platform_device for floppy
in floppy_32.h and pick irq from that.

If I look for "SUNW,fdtwo" it should work on my box at least.
And I checked a few of the prtconfs you have in your git
repositry - several boxes uses this.

ss2 however name it "fd" - so I need to check for that too.
Same for ipx.

So I will look up "SUNW,fdtwo" + "fd" to find the platform_device
for floppy.
And in that platform_device I can find the already allocated irq.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux