* [PATCH 0/3 v2] ibm_newemac: Various fixes and additions for PPC405EZ @ 2008-09-08 12:44 Josh Boyer 2008-09-04 12:57 ` [PATCH 1/3] ibm_newemac: Allow the "no flow control" EMAC feature to work Josh Boyer ` (4 more replies) 0 siblings, 5 replies; 9+ messages in thread From: Josh Boyer @ 2008-09-08 12:44 UTC (permalink / raw) To: benh, netdev; +Cc: linuxppc-dev The following patch series adds things needed to support the PowerPC 405EZ SoC. I've incorporated the suggestions and fixes from the previous round of patches and barring any further comments these should be ready to go. josh Josh Boyer (3): ibm_newemac: Allow the "no flow control" EMAC feature to work ibm_newemac: Introduce mal_has_feature ibm_newemac: MAL support for PowerPC 405EZ arch/powerpc/include/asm/dcr-regs.h | 7 ++++ drivers/net/ibm_newemac/Kconfig | 12 +++++++ drivers/net/ibm_newemac/core.c | 2 + drivers/net/ibm_newemac/core.h | 3 ++ drivers/net/ibm_newemac/mal.c | 60 ++++++++++++++++++++++++++++++++--- drivers/net/ibm_newemac/mal.h | 34 ++++++++++++++++++++ 6 files changed, 113 insertions(+), 5 deletions(-) ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] ibm_newemac: Allow the "no flow control" EMAC feature to work 2008-09-08 12:44 [PATCH 0/3 v2] ibm_newemac: Various fixes and additions for PPC405EZ Josh Boyer @ 2008-09-04 12:57 ` Josh Boyer 2008-09-13 19:40 ` Jeff Garzik 2008-09-04 14:03 ` [PATCH 2/3 v2] ibm_newemac: Introduce mal_has_feature Josh Boyer ` (3 subsequent siblings) 4 siblings, 1 reply; 9+ messages in thread From: Josh Boyer @ 2008-09-04 12:57 UTC (permalink / raw) To: benh, netdev; +Cc: linuxppc-dev Some PowerPC 40x chips have errata that force us not to use the integrated flow control. We have the feature defined, but it currently can't be used because it is never added to EMAC_FTRS_POSSIBLE. This adds a Kconfig option for affected platforms to select and puts the feature in the EMAC_FTRS_POSSIBLE list. This is set for PowerPC 405EZ platforms as well. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> --- drivers/net/ibm_newemac/Kconfig | 4 ++++ drivers/net/ibm_newemac/core.c | 2 ++ drivers/net/ibm_newemac/core.h | 3 +++ 3 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/net/ibm_newemac/Kconfig b/drivers/net/ibm_newemac/Kconfig index 70a3272..dfb6547 100644 --- a/drivers/net/ibm_newemac/Kconfig +++ b/drivers/net/ibm_newemac/Kconfig @@ -62,3 +62,7 @@ config IBM_NEW_EMAC_TAH config IBM_NEW_EMAC_EMAC4 bool default n + +config IBM_NEW_EMAC_NO_FLOW_CTRL + bool + default n diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 2e720f2..2442361 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c @@ -2567,6 +2567,8 @@ static int __devinit emac_init_config(struct emac_instance *dev) if (of_device_is_compatible(np, "ibm,emac-440ep") || of_device_is_compatible(np, "ibm,emac-440gr")) dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX; + if (of_device_is_compatible(np, "ibm,emac-405ez")) + dev->features |= EMAC_FTR_NO_FLOW_CONTROL_40x; } /* Fixup some feature bits based on the device tree */ diff --git a/drivers/net/ibm_newemac/core.h b/drivers/net/ibm_newemac/core.h index 6545e69..59e5a5d 100644 --- a/drivers/net/ibm_newemac/core.h +++ b/drivers/net/ibm_newemac/core.h @@ -341,6 +341,9 @@ enum { #ifdef CONFIG_IBM_NEW_EMAC_RGMII EMAC_FTR_HAS_RGMII | #endif +#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL + EMAC_FTR_NO_FLOW_CONTROL_40x | +#endif EMAC_FTR_440EP_PHY_CLK_FIX, }; -- 1.5.5.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] ibm_newemac: Allow the "no flow control" EMAC feature to work 2008-09-04 12:57 ` [PATCH 1/3] ibm_newemac: Allow the "no flow control" EMAC feature to work Josh Boyer @ 2008-09-13 19:40 ` Jeff Garzik 0 siblings, 0 replies; 9+ messages in thread From: Jeff Garzik @ 2008-09-13 19:40 UTC (permalink / raw) To: Josh Boyer; +Cc: linuxppc-dev, netdev Josh Boyer wrote: > Some PowerPC 40x chips have errata that force us not to use the integrated > flow control. We have the feature defined, but it currently can't be used > because it is never added to EMAC_FTRS_POSSIBLE. > > This adds a Kconfig option for affected platforms to select and puts the > feature in the EMAC_FTRS_POSSIBLE list. This is set for PowerPC 405EZ > platforms as well. > > Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> > --- > drivers/net/ibm_newemac/Kconfig | 4 ++++ > drivers/net/ibm_newemac/core.c | 2 ++ > drivers/net/ibm_newemac/core.h | 3 +++ > 3 files changed, 9 insertions(+), 0 deletions(-) ACK patches 1-3 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/3 v2] ibm_newemac: Introduce mal_has_feature 2008-09-08 12:44 [PATCH 0/3 v2] ibm_newemac: Various fixes and additions for PPC405EZ Josh Boyer 2008-09-04 12:57 ` [PATCH 1/3] ibm_newemac: Allow the "no flow control" EMAC feature to work Josh Boyer @ 2008-09-04 14:03 ` Josh Boyer 2008-09-04 14:08 ` [PATCH 3/3 v2] ibm_newemac: MAL support for PowerPC 405EZ Josh Boyer ` (2 subsequent siblings) 4 siblings, 0 replies; 9+ messages in thread From: Josh Boyer @ 2008-09-04 14:03 UTC (permalink / raw) To: benh, netdev; +Cc: linuxppc-dev There are some PowerPC SoCs that do odd things with the MAL handling. In order to accommodate them, we need to introduce a feature mechanism that is similar to the existing emac_has_feature function. This adds a feature variable to the mal_instance structure, and adds a mal_has_feature function. Two features are defined and are guarded by Kconfig options that are selected by the affected platforms. MAL_FTR_CLEAR_ICINSTAT is used for platforms that need to clear the interrupt bits in the ICINTSTAT SDR for txeob/rxeob. This is common on MAL implementations that have interrupt coalescing. MAL_FTR_COMMON_ERR_INT is used for platforms that have SERR, TXDE, and RXDE OR'd into a single interrupt bit. Signed-of-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> --- drivers/net/ibm_newemac/Kconfig | 8 ++++++++ drivers/net/ibm_newemac/mal.h | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 0 deletions(-) diff --git a/drivers/net/ibm_newemac/Kconfig b/drivers/net/ibm_newemac/Kconfig index dfb6547..44e5a0e 100644 --- a/drivers/net/ibm_newemac/Kconfig +++ b/drivers/net/ibm_newemac/Kconfig @@ -66,3 +66,11 @@ config IBM_NEW_EMAC_EMAC4 config IBM_NEW_EMAC_NO_FLOW_CTRL bool default n + +config IBM_NEW_EMAC_MAL_CLR_ICINTSTAT + bool + default n + +config IBM_NEW_EMAC_MAL_COMMON_ERR + bool + default n diff --git a/drivers/net/ibm_newemac/mal.h b/drivers/net/ibm_newemac/mal.h index eaa7262..0b24138 100644 --- a/drivers/net/ibm_newemac/mal.h +++ b/drivers/net/ibm_newemac/mal.h @@ -213,6 +213,8 @@ struct mal_instance { struct of_device *ofdev; int index; spinlock_t lock; + + unsigned int features; }; static inline u32 get_mal_dcrn(struct mal_instance *mal, int reg) @@ -225,6 +227,38 @@ static inline void set_mal_dcrn(struct mal_instance *mal, int reg, u32 val) dcr_write(mal->dcr_host, reg, val); } +/* Features of various MAL implementations */ + +/* Set if you have interrupt coalescing and you have to clear the SDR + * register for TXEOB and RXEOB interrupts to work + */ +#define MAL_FTR_CLEAR_ICINTSTAT 0x00000001 + +/* Set if your MAL has SERR, TXDE, and RXDE OR'd into a single UIC + * interrupt + */ +#define MAL_FTR_COMMON_ERR_INT 0x00000002 + +enum { + MAL_FTRS_ALWAYS = 0, + + MAL_FTRS_POSSIBLE = +#ifdef CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT + MAL_FTR_CLEAR_ICINTSTAT | +#endif +#ifdef CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR + MAL_FTR_COMMON_ERR_INT | +#endif + 0, +}; + +static inline int mal_has_feature(struct mal_instance *dev, + unsigned long feature) +{ + return (MAL_FTRS_ALWAYS & feature) || + (MAL_FTRS_POSSIBLE & dev->features & feature); +} + /* Register MAL devices */ int mal_init(void); void mal_exit(void); -- 1.5.5.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3 v2] ibm_newemac: MAL support for PowerPC 405EZ 2008-09-08 12:44 [PATCH 0/3 v2] ibm_newemac: Various fixes and additions for PPC405EZ Josh Boyer 2008-09-04 12:57 ` [PATCH 1/3] ibm_newemac: Allow the "no flow control" EMAC feature to work Josh Boyer 2008-09-04 14:03 ` [PATCH 2/3 v2] ibm_newemac: Introduce mal_has_feature Josh Boyer @ 2008-09-04 14:08 ` Josh Boyer 2008-09-09 7:11 ` [PATCH 0/3 v2] ibm_newemac: Various fixes and additions for PPC405EZ Benjamin Herrenschmidt 2008-09-11 3:21 ` Josh Boyer 4 siblings, 0 replies; 9+ messages in thread From: Josh Boyer @ 2008-09-04 14:08 UTC (permalink / raw) To: benh, netdev; +Cc: linuxppc-dev The PowerPC 405EZ SoC has some differences in the interrupt layout and handling for the MAL. The SERR, TXDE, and RXDE interrupts are OR'd into a single interrupt. Also, due to the possibility for interrupt coalescing, the TXEOB and RXEOB interrupts require an interrupt bit to be cleared in the ICINTSTAT SDR. This sets the proper MAL feature bits for 405EZ boards, and adds a common shared handler for SERR, TXDE, and RXDE. The defines for the ICINTSTAT DCR are added to the proper header file as well. This has been adapted from code originally written by Stefan Roese. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> --- arch/powerpc/include/asm/dcr-regs.h | 7 ++++ drivers/net/ibm_newemac/mal.c | 60 ++++++++++++++++++++++++++++++++--- 2 files changed, 62 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/dcr-regs.h b/arch/powerpc/include/asm/dcr-regs.h index 29b0ece..7b833ff 100644 --- a/arch/powerpc/include/asm/dcr-regs.h +++ b/arch/powerpc/include/asm/dcr-regs.h @@ -68,6 +68,13 @@ #define SDR0_UART3 0x0123 #define SDR0_CUST0 0x4000 +/* SDR for 405EZ */ +#define DCRN_SDR_ICINTSTAT 0x4510 +#define ICINTSTAT_ICRX 0x80000000 +#define ICINTSTAT_ICTX0 0x40000000 +#define ICINTSTAT_ICTX1 0x20000000 +#define ICINTSTAT_ICTX 0x60000000 + /* * All those DCR register addresses are offsets from the base address * for the SRAM0 controller (e.g. 0x20 on 440GX). The base address is diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c index 10c267b..1839d3f 100644 --- a/drivers/net/ibm_newemac/mal.c +++ b/drivers/net/ibm_newemac/mal.c @@ -28,6 +28,7 @@ #include <linux/delay.h> #include "core.h" +#include <asm/dcr-regs.h> static int mal_count; @@ -279,6 +280,10 @@ static irqreturn_t mal_txeob(int irq, void *dev_instance) mal_schedule_poll(mal); set_mal_dcrn(mal, MAL_TXEOBISR, r); + if (mal_has_feature(mal, MAL_FTR_CLEAR_ICINTSTAT)) + mtdcri(SDR0, DCRN_SDR_ICINTSTAT, + (mfdcri(SDR0, DCRN_SDR_ICINTSTAT) | ICINTSTAT_ICTX)); + return IRQ_HANDLED; } @@ -293,6 +298,10 @@ static irqreturn_t mal_rxeob(int irq, void *dev_instance) mal_schedule_poll(mal); set_mal_dcrn(mal, MAL_RXEOBISR, r); + if (mal_has_feature(mal, MAL_FTR_CLEAR_ICINTSTAT)) + mtdcri(SDR0, DCRN_SDR_ICINTSTAT, + (mfdcri(SDR0, DCRN_SDR_ICINTSTAT) | ICINTSTAT_ICRX)); + return IRQ_HANDLED; } @@ -336,6 +345,25 @@ static irqreturn_t mal_rxde(int irq, void *dev_instance) return IRQ_HANDLED; } +static irqreturn_t mal_int(int irq, void *dev_instance) +{ + struct mal_instance *mal = dev_instance; + u32 esr = get_mal_dcrn(mal, MAL_ESR); + + if (esr & MAL_ESR_EVB) { + /* descriptor error */ + if (esr & MAL_ESR_DE) { + if (esr & MAL_ESR_CIDT) + return mal_rxde(irq, dev_instance); + else + return mal_txde(irq, dev_instance); + } else { /* SERR */ + return mal_serr(irq, dev_instance); + } + } + return IRQ_HANDLED; +} + void mal_poll_disable(struct mal_instance *mal, struct mal_commac *commac) { /* Spinlock-type semantics: only one caller disable poll at a time */ @@ -493,6 +521,8 @@ static int __devinit mal_probe(struct of_device *ofdev, unsigned int dcr_base; const u32 *prop; u32 cfg; + unsigned long irqflags; + irq_handler_t hdlr_serr, hdlr_txde, hdlr_rxde; mal = kzalloc(sizeof(struct mal_instance), GFP_KERNEL); if (!mal) { @@ -542,11 +572,21 @@ static int __devinit mal_probe(struct of_device *ofdev, goto fail; } + if (of_device_is_compatible(ofdev->node, "ibm,mcmal-405ez")) + mal->features |= (MAL_FTR_CLEAR_ICINTSTAT | + MAL_FTR_COMMON_ERR_INT); + mal->txeob_irq = irq_of_parse_and_map(ofdev->node, 0); mal->rxeob_irq = irq_of_parse_and_map(ofdev->node, 1); mal->serr_irq = irq_of_parse_and_map(ofdev->node, 2); - mal->txde_irq = irq_of_parse_and_map(ofdev->node, 3); - mal->rxde_irq = irq_of_parse_and_map(ofdev->node, 4); + + if (mal_has_feature(mal, MAL_FTR_COMMON_ERR_INT)) { + mal->txde_irq = mal->rxde_irq = mal->serr_irq; + } else { + mal->txde_irq = irq_of_parse_and_map(ofdev->node, 3); + mal->rxde_irq = irq_of_parse_and_map(ofdev->node, 4); + } + if (mal->txeob_irq == NO_IRQ || mal->rxeob_irq == NO_IRQ || mal->serr_irq == NO_IRQ || mal->txde_irq == NO_IRQ || mal->rxde_irq == NO_IRQ) { @@ -608,16 +648,26 @@ static int __devinit mal_probe(struct of_device *ofdev, sizeof(struct mal_descriptor) * mal_rx_bd_offset(mal, i)); - err = request_irq(mal->serr_irq, mal_serr, 0, "MAL SERR", mal); + if (mal_has_feature(mal, MAL_FTR_COMMON_ERR_INT)) { + irqflags = IRQF_SHARED; + hdlr_serr = hdlr_txde = hdlr_rxde = mal_int; + } else { + irqflags = 0; + hdlr_serr = mal_serr; + hdlr_txde = mal_txde; + hdlr_rxde = mal_rxde; + } + + err = request_irq(mal->serr_irq, hdlr_serr, irqflags, "MAL SERR", mal); if (err) goto fail2; - err = request_irq(mal->txde_irq, mal_txde, 0, "MAL TX DE", mal); + err = request_irq(mal->txde_irq, hdlr_txde, irqflags, "MAL TX DE", mal); if (err) goto fail3; err = request_irq(mal->txeob_irq, mal_txeob, 0, "MAL TX EOB", mal); if (err) goto fail4; - err = request_irq(mal->rxde_irq, mal_rxde, 0, "MAL RX DE", mal); + err = request_irq(mal->rxde_irq, hdlr_rxde, irqflags, "MAL RX DE", mal); if (err) goto fail5; err = request_irq(mal->rxeob_irq, mal_rxeob, 0, "MAL RX EOB", mal); -- 1.5.5.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3 v2] ibm_newemac: Various fixes and additions for PPC405EZ 2008-09-08 12:44 [PATCH 0/3 v2] ibm_newemac: Various fixes and additions for PPC405EZ Josh Boyer ` (2 preceding siblings ...) 2008-09-04 14:08 ` [PATCH 3/3 v2] ibm_newemac: MAL support for PowerPC 405EZ Josh Boyer @ 2008-09-09 7:11 ` Benjamin Herrenschmidt 2008-09-09 10:30 ` Josh Boyer 2008-09-11 3:21 ` Josh Boyer 4 siblings, 1 reply; 9+ messages in thread From: Benjamin Herrenschmidt @ 2008-09-09 7:11 UTC (permalink / raw) To: Josh Boyer; +Cc: netdev, linuxppc-dev On Mon, 2008-09-08 at 08:44 -0400, Josh Boyer wrote: > The following patch series adds things needed to support the PowerPC 405EZ > SoC. I've incorporated the suggestions and fixes from the previous round > of patches and barring any further comments these should be ready to go. For some reason, I got this email but not the 3 following patch ones... Cheers, Ben. > josh > > Josh Boyer (3): > ibm_newemac: Allow the "no flow control" EMAC feature to work > ibm_newemac: Introduce mal_has_feature > ibm_newemac: MAL support for PowerPC 405EZ > > arch/powerpc/include/asm/dcr-regs.h | 7 ++++ > drivers/net/ibm_newemac/Kconfig | 12 +++++++ > drivers/net/ibm_newemac/core.c | 2 + > drivers/net/ibm_newemac/core.h | 3 ++ > drivers/net/ibm_newemac/mal.c | 60 ++++++++++++++++++++++++++++++++--- > drivers/net/ibm_newemac/mal.h | 34 ++++++++++++++++++++ > 6 files changed, 113 insertions(+), 5 deletions(-) ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3 v2] ibm_newemac: Various fixes and additions for PPC405EZ 2008-09-09 7:11 ` [PATCH 0/3 v2] ibm_newemac: Various fixes and additions for PPC405EZ Benjamin Herrenschmidt @ 2008-09-09 10:30 ` Josh Boyer 0 siblings, 0 replies; 9+ messages in thread From: Josh Boyer @ 2008-09-09 10:30 UTC (permalink / raw) To: benh; +Cc: netdev, linuxppc-dev On Tue, 09 Sep 2008 17:11:23 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote: > On Mon, 2008-09-08 at 08:44 -0400, Josh Boyer wrote: > > The following patch series adds things needed to support the PowerPC 405EZ > > SoC. I've incorporated the suggestions and fixes from the previous round > > of patches and barring any further comments these should be ready to go. > > For some reason, I got this email but not the 3 following patch ones... Erm.. odd. http://patchwork.ozlabs.org/patch/208/ http://patchwork.ozlabs.org/patch/209/ http://patchwork.ozlabs.org/patch/210/ All of them were addressed to you and netdev, with linuxppc-dev on CC. You should have gotten them.. josh ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3 v2] ibm_newemac: Various fixes and additions for PPC405EZ 2008-09-08 12:44 [PATCH 0/3 v2] ibm_newemac: Various fixes and additions for PPC405EZ Josh Boyer ` (3 preceding siblings ...) 2008-09-09 7:11 ` [PATCH 0/3 v2] ibm_newemac: Various fixes and additions for PPC405EZ Benjamin Herrenschmidt @ 2008-09-11 3:21 ` Josh Boyer 4 siblings, 0 replies; 9+ messages in thread From: Josh Boyer @ 2008-09-11 3:21 UTC (permalink / raw) To: benh; +Cc: netdev, jeff, linuxppc-dev On Mon, 8 Sep 2008 08:44:59 -0400 Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote: > The following patch series adds things needed to support the PowerPC 405EZ > SoC. I've incorporated the suggestions and fixes from the previous round > of patches and barring any further comments these should be ready to go. > > josh > > Josh Boyer (3): > ibm_newemac: Allow the "no flow control" EMAC feature to work > ibm_newemac: Introduce mal_has_feature > ibm_newemac: MAL support for PowerPC 405EZ I should mention that I have a platform support patch series that depends on these for working ethernet. I can bring this set in through my tree at the same time if the patches look fine and Jeff acks that. josh ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <cover.1220540078.git.jwboyer@linux.vnet.ibm.com>]
* [PATCH 1/3] ibm_newemac: Allow the "no flow control" EMAC feature to work [not found] <cover.1220540078.git.jwboyer@linux.vnet.ibm.com> @ 2008-09-04 15:01 ` Josh Boyer 0 siblings, 0 replies; 9+ messages in thread From: Josh Boyer @ 2008-09-04 15:01 UTC (permalink / raw) To: benh, netdev; +Cc: linuxppc-dev Some PowerPC 40x chips have errata that force us not to use the integrated flow control. We have the feature defined, but it currently can't be used because it is never added to EMAC_FTRS_POSSIBLE. This adds a Kconfig option for affected platforms to select and puts the feature in the EMAC_FTRS_POSSIBLE list. This is set for PowerPC 405EZ platforms as well. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> --- drivers/net/ibm_newemac/Kconfig | 4 ++++ drivers/net/ibm_newemac/core.c | 2 ++ drivers/net/ibm_newemac/core.h | 3 +++ 3 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/net/ibm_newemac/Kconfig b/drivers/net/ibm_newemac/Kconfig index 70a3272..dfb6547 100644 --- a/drivers/net/ibm_newemac/Kconfig +++ b/drivers/net/ibm_newemac/Kconfig @@ -62,3 +62,7 @@ config IBM_NEW_EMAC_TAH config IBM_NEW_EMAC_EMAC4 bool default n + +config IBM_NEW_EMAC_NO_FLOW_CTRL + bool + default n diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 2e720f2..2442361 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c @@ -2567,6 +2567,8 @@ static int __devinit emac_init_config(struct emac_instance *dev) if (of_device_is_compatible(np, "ibm,emac-440ep") || of_device_is_compatible(np, "ibm,emac-440gr")) dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX; + if (of_device_is_compatible(np, "ibm,emac-405ez")) + dev->features |= EMAC_FTR_NO_FLOW_CONTROL_40x; } /* Fixup some feature bits based on the device tree */ diff --git a/drivers/net/ibm_newemac/core.h b/drivers/net/ibm_newemac/core.h index 6545e69..59e5a5d 100644 --- a/drivers/net/ibm_newemac/core.h +++ b/drivers/net/ibm_newemac/core.h @@ -341,6 +341,9 @@ enum { #ifdef CONFIG_IBM_NEW_EMAC_RGMII EMAC_FTR_HAS_RGMII | #endif +#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL + EMAC_FTR_NO_FLOW_CONTROL_40x | +#endif EMAC_FTR_440EP_PHY_CLK_FIX, }; -- 1.5.5.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-09-13 19:41 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-09-08 12:44 [PATCH 0/3 v2] ibm_newemac: Various fixes and additions for PPC405EZ Josh Boyer 2008-09-04 12:57 ` [PATCH 1/3] ibm_newemac: Allow the "no flow control" EMAC feature to work Josh Boyer 2008-09-13 19:40 ` Jeff Garzik 2008-09-04 14:03 ` [PATCH 2/3 v2] ibm_newemac: Introduce mal_has_feature Josh Boyer 2008-09-04 14:08 ` [PATCH 3/3 v2] ibm_newemac: MAL support for PowerPC 405EZ Josh Boyer 2008-09-09 7:11 ` [PATCH 0/3 v2] ibm_newemac: Various fixes and additions for PPC405EZ Benjamin Herrenschmidt 2008-09-09 10:30 ` Josh Boyer 2008-09-11 3:21 ` Josh Boyer [not found] <cover.1220540078.git.jwboyer@linux.vnet.ibm.com> 2008-09-04 15:01 ` [PATCH 1/3] ibm_newemac: Allow the "no flow control" EMAC feature to work Josh Boyer
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).