[PATCH] Slight refactor of interrupt mapping for FSL parts (take 3)
afleming at freescale.com
Sat Oct 21 03:36:03 EST 2006
On Oct 20, 2006, at 00:44, Kumar Gala wrote:
> On Oct 19, 2006, at 7:52 PM, Andy Fleming wrote:
>> * Cleaned up interrupt mapping a little by adding a helper
>> function which parses the irq out of the device-tree, and puts
>> it into a resource.
> Split this patch in two. One for the mapping cleanup and one for
> the PHY changes.
I don't want to be a whiner, here, but isn't that more effort than
the benefit it gives? I mean, I'll do it if you really want, but I'm
trying to get to work on the *next* patch.
>> * Changed the arch/ppc platform files to specify PHY_POLL, instead
>> of -1
> This seems like a confusing way to indicate lack of interrupt.
> Can't remember but if in my system all the PHYs are just polled do
> I even have to setup the data structure?
It is precisely the way to indicate lack of interrupt. Here are the
1) PHY is not used.
2) PHY is polled by PHY lib
3) PHY lib handles interrupts, does not poll
4) PHY Lib does not handle reflecting device state changes
#4 Is indicated by setting phydev->irq to PHY_IGNORE_INTERRUPT
#3 Is indicated by phydev->irq containing an actual irq number
#2 is indicated by setting phydev->irq to PHY_POLL
#1 means it doesn't matter what the irq is set to
So yes, you have to set up the data structure. If you set it to -1,
you have only been *coincidentally* getting PHY_POLL (because
PHY_POLL is -1). That's a bad idea, because PHY_POLL might change in
More information about the Linuxppc-dev