[PATCH] Slight refactor of interrupt mapping for FSL parts

Kumar Gala galak at kernel.crashing.org
Wed Oct 18 01:50:11 EST 2006


On Oct 17, 2006, at 1:27 AM, 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.
> * Changed the PHY Layer to use NO_IRQ instead of -1 for PHY_POLL.
>   This means that polling will always be used if mapping the
>   interrupt fails for any reason.
> * Changed the arch/ppc platform files to specify PHY_POLL, instead  
> of -1
> * Changed the fixed phy to use PHY_IGNORE_INTERRUPT
> ---
> This is a respin of the patch to reply to comments from the community
>
>  arch/powerpc/sysdev/fsl_soc.c                |   27 +++++++++ 
> +----------------
>  arch/ppc/platforms/85xx/mpc8540_ads.c        |    4 ++--
>  arch/ppc/platforms/85xx/mpc8560_ads.c        |    4 ++--
>  arch/ppc/platforms/85xx/mpc85xx_cds_common.c |    6 +++---
>  arch/ppc/platforms/85xx/sbc8560.c            |    2 +-
>  arch/ppc/platforms/85xx/stx_gp3.c            |    2 +-
>  arch/ppc/platforms/85xx/tqm85xx.c            |    4 ++--
>  drivers/net/phy/fixed.c                      |    2 +-
>  include/asm-powerpc/prom.h                   |    7 +++++++
>  include/linux/phy.h                          |    7 ++++++-
>  10 files changed, 35 insertions(+), 30 deletions(-)

What about arch/ppc/platforms/83xx?  also arch/ppc/platforms/ 
mpc8272ads_setup.c

[snip]

> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 9447a57..4dbffe4 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -20,6 +20,7 @@ #define __PHY_H
>
>  #include <linux/spinlock.h>
>  #include <linux/device.h>
> +#include <asm/irq.h>
>
>  #define PHY_BASIC_FEATURES	(SUPPORTED_10baseT_Half | \
>  				 SUPPORTED_10baseT_Full | \
> @@ -37,7 +38,11 @@ #define PHY_GBIT_FEATURES	(PHY_BASIC_FEA
>   * or not desired for this PHY.  Set to PHY_IGNORE_INTERRUPT if
>   * the attached driver handles the interrupt
>   */
> -#define PHY_POLL		-1
> +#ifndef NO_IRQ
> +#define NO_IRQ 0
> +#endif
> +
> +#define PHY_POLL		NO_IRQ
>  #define PHY_IGNORE_INTERRUPT	-2
>
>  #define PHY_HAS_INTERRUPT	0x00000001

We really should run this by the larger kernel community

- k



More information about the Linuxppc-dev mailing list