This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: i82559 on ebsa patch


On Fri, Oct 18, 2002 at 04:25:41AM +0100, Jonathan Larmour wrote:
> Andrew Lunn wrote:
> >
> >-// Interrupts are wire-or'd together.
> >-#if 1 < CYGNUM_DEVS_ETH_INTEL_I82559_DEV_COUNT
> >-#define CYGHWR_DEVS_ETH_INTEL_I82559_DEMUX_ALL
> >-#endif // multiple devs, so demux_all needed
> >-
> >-// define multiple interrupt handling anyway:
> >-//? #define CYGHWR_DEVS_ETH_INTRS (SA11X0_GPIO_PIN_10)
> >-
> >-// This brings in code to ensure missed interrupts are properly
> >-// acknowledged so that another interrupt can occur in future.
> >-// Only a problem with edge-triggered systems.
> >-
> >-/* #define CYGHWR_DEVS_ETH_INTEL_I82559_MISSED_INTERRUPT(p_i82559) \
> >-     (CYGHWR_DEVS_ETH_INTRS != (CYGHWR_DEVS_ETH_INTRS & 
> >*SA11X0_GPIO_PIN_LEVEL))
> >-*/
> >+// Interrupts are multiplex onto one interrupt pin.
> >+#define CYGNUM_DEVS_ETH_INTEL_I82559_SEPARATE_MUX_INTERRUPT \
> >+          CYGNUM_HAL_INTERRUPT_PCI_IRQ
> 
> Wouldn't it be better to still conditionalise this on 
> CYGNUM_DEVS_ETH_INTEL_I82559_DEV_COUNT ? The board may have just one card 
> in (for whatever reason) and that's the type of thing that option is for 
> (if disabling the individual port drivers in ebsa285_eth_drivers.cdl).
> 
> And since I can't work it out, why is DEMUX_ALL no longer needed?

It gave me a headache trying to work this out and im not sure i can
remember correctly. DEMUX_ALL and MUX_INTERRUPTS are mutually
exclusive. If you have one device, its still on
CYGNUM_HAL_INTERRUPT_PCI_IRQ so you still need MUX_INTERRUPTS. So the
DEMUX_ALL code becomes redundant, so i took it out. The rest of the
deleted code is commented out code from the Assebet SA11X0, not the
SA110 EBSA. It looks to me that when the generic driver was ported to
the EBSA, the SA11X0 was used as a template and the dead code was put
into comments rather than removed.

For testing i actually did disable one of the devices by CDL, since i
only have a DHCP server on one of them and was too impatient for
init_all_network_interfaces() to timeout and fail on the other before
running the net tests.

        Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]