This is the mail archive of the ecos-discuss@sourceware.org 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]

CL CS8900a in 8-bit mode


Hello

I have two questions for Cos experts. I have a board from Olimex.
It's the Olimex LPC-E2294 board.  There is CL cs8900a ethernet chip on
that board. But, that chip was been included by the designers in 8-bit
(non-interrupt driven) mode.  It's so bad. I haven't to use the eCos
CL cs8900a driver as is. But, in any case, I want to get an ethernet
support for the board, and I do not want to do any changes in hardware,
i.e. either to cut the wires or to solder something.  There is a way
to fix a dumb hardware, you know. But, if I do that, the board would be
stop to be the Olimex LPC-E2294 board. It would become an amateur board.
Do you understand me?  And I hadn't planned to do a valueless port for
the LPC-E2294. I had planned to finish the port containing the ethernet
things for the LPC-E2294. But, I am doubtful what I ought to do.

Please, my first question, Anybody had a success with 8-bit cs8900a mode
under eCos?  Just, say either yes, or no, please. Yes, under eCos. I
have know about CL's app notes for cs8900a in 8-bit mode.  I have know
about the `ethernut' project. There is a pseudo code for 8-bit mode in
the app notes. This sounds good.

By saying "success",  I mean a possibility to use cs8900a in 8-bit
mode with RedBoot and with eCos kernel.  I understand, what in theory
it's possible.  I should to poll ethernet events either in the RedBoot
loop or in a eCos thread.  But, what's about poll interval?  Will it be
a hard-time polling?  Should this interval be less than 1 ms? Anybody
has an experience?

And, if it's possible to implement such a driver, it's my second question,
Where is a good location to put the driver's code?

I have know what there are cs8900.h, if_cs8900a.c files in the eCos
repository.  I have seen this code. All control by cs8900a had been
fulfilled with the HAL_READ_UINT16(), HAL_WRITE_UINT16() macros.
And more, there are CL_IN(), CL_OUT() macros in cs8900.h. If authors
would used these macros in a driver's body, it would be much easier to
use that code for 8-bit.

So, should I do any fixes in these original files (i.e to make a patch
for common cs8900a files) to support 8-bit mode, or should I do a copy
of those files to a platform location (plf/src/.) and do the fixes
there?  How is it more correct? In last case, 99% of the code will be an
clone of the if_cs8900a.c. Please, answer me how to do an implementation
with a good sense.

Thanks in advance for your time and any hints.

Sergei Gavrikov

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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