erc32/sis console driver

Tiemen Schut T.Schut at
Fri Apr 23 12:29:47 UTC 2010

Dear list,

I've fixed another bug in the console drivers. I'm not sure about the correctness of this fix, but it solves my problems. If anyone has a better suggestion, be my guest.

It turned out that in at least some cases (don't really understand when), console_isr_x would receive no more bytes than CONSOLE_BUF_SIZE, because the interrupt was cleared if the result of termios_dequeue_characters was 0, even if there was more data to receive (but no to transmit). I've fixed this by only clearing the interrupt if termios_dequeue_characters returns 0 AND there is no more data waiting for us in the uart register.

Driver is attached.


Tiemen Schut

P.S. It appears that the same problems I (tried to) solve with this driver for sis/erc32 also hold for leon2/leon3. So if anyone is developing for leon2/leon3 and experiences console problems, I would strongly suggest you look at this driver and change the leon driver accordingly, for as far as the hardware is similar.

>>> On 4/15/2010 at 16:11, in message <4BC73AC7020000520000FA9C at>,
"Tiemen Schut" <T.Schut at> wrote: 
> Hey all, 
> With help from Sebastian and Joell I've redone the erc32/sis console driver.  
> It now uses the shared console framework from rtems. First and foremost I  
> would like to say that it's still far from perfect, but it should be an  
> improvement to the old driver. 
> Note that my main goal was to get ppp working, as output from pppd stopped  
> after the first character. This should be solved with this driver, while  
> "regular" output is pretty much unchanged. 
> As I don't have an erc32 target I only tested with the sis version 2.7.5, so  
> there may be problems with a real target (or tsim, or another version of the  
> sis for that matter). 
> To get this to compile you'll have to change the  
> c/src/lib/libbsp/sparc/erc32/ Change console_SOURCES to be:  
> console_SOURCES = console/erc32_console.c ../../shared/console.c. To be sure  
> that you're compiling the right driver I would advice to remove/rename the  
> "old" console.c. 
> Happy testing! 
> Tiemen 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: erc32_console.c
Type: application/octet-stream
Size: 7892 bytes
Desc: not available
URL: <>

More information about the users mailing list