Commit graph

18 commits

Author SHA1 Message Date
Lionel Sambuc 3af30c2c60 ARM serial driver: Comment termios_baud_rate.
The B0-B115200 defines are flags, and not the actual speed they
represent.

This fixes an incoherency for B0 handling, and documents why it is
required to call the function again after changing the speed flag.

DFL_BAUD is set to one of the flag, so to translate it to an actual
speed, the function calls itself again, which will always be able to
finish without inducing another recursive call.

Change-Id: I04ebfaefee31a88d05f0b726352d1581a966147b
2014-03-01 09:04:52 +01:00
David van Moolenbroek 3d697930dd TTY: use libchardriver; clean up
- writing to a PTY master side blocks if there is not already a
  blocked reader on the slave side, and select now reflects this;
- internally, TTY now uses a test based on "caller != NONE" rather
  than "grant != GRANT_INVALID" to identify whether a call is
  currently ongoing;
- "offset" fields have been removed as they equal the corresponding
  "cum" fields;
- improved variable typing and function naming here and there;
- various other small fixes.

Change-Id: I6b51452888942e864b4e034e8c8490576184a23e
2014-03-01 09:04:52 +01:00
David van Moolenbroek 6331e8f845 Retire the synchronous character driver protocol
- change all sync char drivers into async drivers;
- retire support for the sync protocol in libchardev;
- remove async dev style, as this is now the default;
- remove dev_status from VFS;
- clean up now-unused protocol messages.

Change-Id: I6aacff712292f6b29f2ccd51bc1e7d7003723e87
2014-02-18 11:25:02 +01:00
David van Moolenbroek 97172a1db0 Sync char protocol: add nonblocking transfer flag
The async char protocol already has this, so this patch closes the
gap between the two protocols a bit. Support for this flag has been
added to all sync char drivers that support CANCEL at all.

The LOG driver was already using the asynchronous protocol, but it
did not support the nonblocking transfer flag. This has been fixed
as well.

Change-Id: Ia55432c9f102765b59ad3feb45a8bd47a782c93f
2014-02-18 11:25:02 +01:00
Kees Jongenburger 43581a14ee arm:replace ifdef's by runtime checks.
Change-Id: Iff966f2214e2d8bb6b72dd0a119085709f2d4a9c
2013-12-03 09:19:25 +01:00
Ben Gras c8f3b10909 fix a few more minix specific warnings
. also disable stack protection feature for gcc,
	  causes build errors for pkgsrc gcc on minix

Change-Id: I1c6e2bcb4d948098d642543d7b2711284ee55c72
2013-08-27 16:16:03 +00:00
Ben Gras 71ac8a3a8a some arm uart fixes
. always keep reading data from uart so the interrupt is
	  not continually asserted if data is sent but no process
	  reads it
	. increase tx & rx fifo trigger levels -> reduces the number
	  of interrupts necessary
	. bigger rx/tx buffers

Change-Id: I3cf7c73b22ae2fc091b845d516ba4aa53e892cda
2013-06-14 23:58:44 +02:00
Ben Gras 93d9caa2d6 tty: i386: rs232 fix
. ignore interrupt (stop interrupt check loop) if
	  interrupt bit not set; limit loop too
	. mask off other bits when testing bits in the status register
	. this fixes rs232 output that would otherwise never get re-triggered
	  as too many bits were set in the status byte to match the
	  possibilities.

Change-Id: I311c93377fa8fb477ee9a756455fdeda780e6ba1
2013-06-12 07:04:52 +00:00
Kees Jongenburger b1e0ada171 arm:tty enable FIFO
Change-Id: Iaaa7c0bcb40c2cce2423c1defc14809ed6c70e9c
2013-06-05 19:19:38 +02:00
Kees Jongenburger 742cf53aa9 arm:adapt tty driver for AM335X.
Change-Id: Ic861d68d0576c2abcdcb265a450c013ea2b28499
2013-05-24 14:03:14 +02:00
Michael W. Bombardieri cb51426c6a rs232: remove unneeded lock()/unlock() functions
Change-Id: Ie1d2a7f460132aa59791cd7d16c9068b79675f1b
2013-04-12 21:37:26 +02:00
Kees Jongenburger 1e9492a8b8 arm:cleanup omap serial, remove unused defines. 2013-04-12 20:52:57 +02:00
Kees Jongenburger 037aeb5a13 arm:rs232 fix.
The kernel API for requesting interrupts and the associated callback
have a somewhat strange behaviour. Requesting an interrupts is done
by calling sys_irqsetpolicy using an interrupt and a given id. This
id can be modified by the sys_irqsetpolicy and must be used for
subsequent calls to sys_irqenable/sys_irqdisable. However upon an
incoming call from the kernel NOTIFY_ARG contains the original value
encoded in a set e.g. if  1 << id == true the interrupt was raised.
2013-04-12 20:52:57 +02:00
David van Moolenbroek 50e46307de Move MINIX reboot definitions into minix/reboot.h
Also fix a buffer overflow in commands/reboot/sh_wall.c.

Change-Id: I3a61057c4f0221d1700e14d44520b4ad17f1dbe1
2013-03-20 16:50:01 +00:00
David van Moolenbroek 972156d595 TTY: "nobeep" setting to disable beeps
Disable the speaker by passing in "nobeep=1" as a boot option.
The option is preserved when updating the boot configuration.
Currently i386 only.
2013-02-15 11:06:34 +01:00
Lionel Sambuc b1c4ba4ab6 ARM updates
Due to the ABI we are using we have to use the earm architecture
moniker for the build system to behave correctly. This involves
then some headers to move around.

There is also a few related Makefile updates as well as minor
source code corrections.
2013-01-17 10:03:58 +01:00
Lionel Sambuc f14fb60209 Libraries updates and cleanup
* Updating common/lib
 * Updating lib/csu
 * Updating lib/libc
 * Updating libexec/ld.elf_so
 * Corrected test on __minix in featuretest to actually follow the
   meaning of the comment.
 * Cleaned up _REENTRANT-related defintions.
 * Disabled -D_REENTRANT for libfetch
 * Removing some unneeded __NBSD_LIBC defines and tests

Change-Id: Ic1394baef74d11b9f86b312f5ff4bbc3cbf72ce2
2013-01-14 11:36:26 +01:00
Thomas Veerman b01e9ebfdb TTY: seperate hardware dependent parts + add new serial driver
.Split TTY in order to support both x86 and ARM.
.Add support for the TI 16750 UARTs on OMAP35x.
.Various other improvements:
  .Kernel messages are printed using generic terminal write
   functions. That is, they are no longer directly displayed
   on the console.
  .The console can now be displayed on any terminal. This
   is configured by the "console={tty00,tty01,ttyc2,ttyc3,ttyc4}"
   boot variable -- basically any valid /dev/tty* terminal.
  .Cutify kernel messages with colors. Configured by
   "kernelclr={1,2,3,4,5,6,7}" boot variable.
2012-10-30 11:33:29 +00:00