This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: timer function in ethernet driver
- From: Gary Thomas <gthomas at redhat dot com>
- To: Motoya Kurotsu <kurotsu at allied-telesis dot co dot jp>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 27 Dec 2001 08:16:41 -0700
- Subject: Re: [ECOS] timer function in ethernet driver
- References: <20011227123439.A2519@white.office1>
On Wed, 2001-12-26 at 20:34, Motoya Kurotsu wrote:
> Hi;
>
> I'm looking at the codes of ethernet drivers. I have two points.
> First, I wonder how the delay should be done without losing
> drivers generality, including platform independency.
> In platform independent drivers, such as pcnet, i82559 and dp83902a,
> I see CYGACC_CALL_IF_DELAY_US is used. However, is that missing
> the generality by assuming that the platform provides the virtual
> vectors support? Otherwise, shouldn't we require the virtual vector
> support in those drivers cdl files, strictly speaking?
> Second, I wonder that cyg_drv_cond_timed_wait() may be provided if
> CYGACC_CALL_IF_DELAY_US won't miss generality. I've been supposing
> that this function isn't supported only because the existense of timer
> can't be assumed.
In general, we try to use CYGACC_CALL_IF_DELAY_US() since it is defined
for all environments. There is an implicit requirement on virtual
vectors, but that is pretty much given on all platforms now. Note that
the presence of virtual vectors does _not_ necessarily imply the
existence of a ROM monitor (like RedBoot), but simply a means for
calling support functions in an independent fashion.