From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3712 invoked by alias); 11 Jul 2006 20:27:14 -0000 Received: (qmail 3703 invoked by uid 22791); 11 Jul 2006 20:27:13 -0000 X-Spam-Check-By: sourceware.org Received: from jive.SoftHome.net (HELO jive.SoftHome.net) (66.54.152.27) by sourceware.org (qpsmtpd/0.31) with SMTP; Tue, 11 Jul 2006 20:27:09 +0000 Received: (qmail 9141 invoked by uid 417); 11 Jul 2006 20:27:08 -0000 Received: from shunt-smtp-out-0 (HELO softhome.net) (172.16.3.12) by shunt-smtp-out-0 with SMTP; 11 Jul 2006 20:27:08 -0000 Received: from no-pswd-dialup.82.209.208.174.telecom.gomel.by ([82.209.208.174]) (AUTH: PLAIN w3sg@softhome.net) by softhome.net with esmtp; Tue, 11 Jul 2006 14:27:05 -0600 Date: Tue, 11 Jul 2006 20:27:00 -0000 From: Sergei Gavrikov To: eCos discuss list Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] CL CS8900a in 8-bit mode X-SW-Source: 2006-07/txt/msg00062.txt.bz2 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