aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/zs
Commit message (Collapse)AuthorAgeFilesLines
* - Use swi_remove() to teardown swi handlers rather thanJohn Baldwin2005-10-261-1/+1
| | | | | | | | intr_event_remove_handler(). - Remove tty: prefix from a couple of swi handler names. Notes: svn path=/head/; revision=151700
* Catch up with interrupt-thread changes.Peter Grehan2005-10-251-1/+1
| | | | Notes: svn path=/head/; revision=151679
* Make ttyconsolemode() call ttsetwater() so that drivers don't have to.Poul-Henning Kamp2005-10-161-1/+0
| | | | Notes: svn path=/head/; revision=151388
* The zs(4) driver is superseded by uart(4) and broken in -CURRENT. RemoveMarius Strobl2005-02-271-337/+0
| | | | | | | | | | it from the sparc64 kernel config files and delete its fhc(4) and sbus(4) front-end. Agreed with: marcel Notes: svn path=/head/; revision=142656
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139749
* Fix a typo so that this compiles again.John Baldwin2004-10-201-1/+1
| | | | Notes: svn path=/head/; revision=136728
* Add new function ttyinitmode() which sets our systemwide defaultPoul-Henning Kamp2004-10-181-15/+2
| | | | | | | | | | | | | | | | | modes on a tty structure. Both the ".init" and the current settings are initialized allowing the function to be used both at attach and open time. The function takes an argument to decide if echoing should be enabled. Echoing should not be enabled for regular physical serial ports unless they are consoles, in which case they should be configured by ttyconsolemode() instead. Use the new function throughout. Notes: svn path=/head/; revision=136680
* Use tty->t_sc to find out softc.Poul-Henning Kamp2004-09-181-4/+5
| | | | Notes: svn path=/head/; revision=135429
* Use ttyalloc() instead of ttymalloc(NULL)Poul-Henning Kamp2004-09-171-1/+1
| | | | Notes: svn path=/head/; revision=135367
* - Introduce an ofw_bus kobj-interface for retrieving the OFW node and aMarius Strobl2004-08-122-70/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subset ("compatible", "device_type", "model" and "name") of the standard properties in drivers for devices on Open Firmware supported busses. The standard properties "reg", "interrupts" und "address" are not covered by this interface because they are only of interest in the respective bridge code. There's a remaining standard property "status" which is unclear how to support properly but which also isn't used in FreeBSD at present. This ofw_bus kobj-interface allows to replace the various (ebus_get_node(), ofw_pci_get_node(), etc.) and partially inconsistent (central_get_type() vs. sbus_get_device_type(), etc.) existing IVAR ones with a common one. This in turn allows to simplify and remove code-duplication in drivers for devices that can hang off of more than one OFW supported bus. - Convert the sparc64 Central, EBus, FHC, PCI and SBus bus drivers and the drivers for their children to use the ofw_bus kobj-interface. The IVAR- interfaces of the Central, EBus and FHC are entirely replaced by this. The PCI bus driver used its own kobj-interface and now also uses the ofw_bus one. The IVARs special to the SBus, e.g. for retrieving the burst size, remain. Beware: this causes an ABI-breakage for modules of drivers which used the IVAR-interfaces, i.e. esp(4), hme(4), isp(4) and uart(4), which need to be recompiled. The style-inconsistencies introduced in some of the bus drivers will be fixed by tmm@ in a generic clean-up of the respective drivers later (he requested to add the changes in the "new" style). - Convert the powerpc MacIO bus driver and the drivers for its children to use the ofw_bus kobj-interface. This invloves removing the IVARs related to the "reg" property which were unused and a leftover from the NetBSD origini of the code. There's no ABI-breakage caused by this because none of these driver are currently built as modules. There are other powerpc bus drivers which can be converted to the ofw_bus kobj-interface, e.g. the PCI bus driver, which should be done together with converting powerpc to use the OFW PCI code from sparc64. - Make the SBus and FHC front-end of zs(4) and the sparc64 eeprom(4) take advantage of the ofw_bus kobj-interface and simplify them a bit. Reviewed by: grehan, tmm Approved by: re (scottl) Discussed with: tmm Tested with: Sun AX1105, AXe, Ultra 2, Ultra 60; PPC cross-build on i386 Notes: svn path=/head/; revision=133589
* Preparation commit for the tty cleanups that will follow in the nearPoul-Henning Kamp2004-07-151-2/+2
| | | | | | | | | | | | future: rename ttyopen() -> tty_open() and ttyclose() -> tty_close(). We need the ttyopen() and ttyclose() for the new generic cdevsw functions for tty devices in order to have consistent naming. Notes: svn path=/head/; revision=132226
* Update for the KDB framework:Marcel Moolenaar2004-07-101-6/+5
| | | | | | | | o Make debugging code conditional upon KDB instead of DDB. o Call kdb_alt_break() insteadof db_alt_break(). Notes: svn path=/head/; revision=131922
* Fix build: the return type for t_break changed from int to void.Mark Peek2004-07-011-3/+2
| | | | Notes: svn path=/head/; revision=131410
* Use generic routines for BREAK and modem control ioctls.Poul-Henning Kamp2004-06-251-54/+25
| | | | | | | This eliminates the need for a local ioctl method. Notes: svn path=/head/; revision=131111
* Catchup to now-required <sys/module.h> for PowerPCPeter Grehan2004-06-251-0/+1
| | | | Notes: svn path=/head/; revision=131102
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-162-4/+4
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Machine generated patch which changes linedisc calls from accessingPoul-Henning Kamp2004-06-041-4/+4
| | | | | | | | | linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit. Notes: svn path=/head/; revision=130077
* Make the remaining serial drivers call ttyioctl() rather than callingPoul-Henning Kamp2004-06-041-6/+2
| | | | | | | the linedisc directly. Notes: svn path=/head/; revision=130057
* Add missing <sys/module.h> includes currently relying on nested includePoul-Henning Kamp2004-06-031-0/+1
| | | | | | | in <sys/kernel.h> Notes: svn path=/head/; revision=130026
* Remove advertising clause from University of California Regent'sWarner Losh2004-04-072-8/+0
| | | | | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson Notes: svn path=/head/; revision=128019
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-172-14/+14
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* Device megapatch 4/6:Poul-Henning Kamp2004-02-211-1/+2
| | | | | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags. Notes: svn path=/head/; revision=126080
* Device megapatch 3/6:Poul-Henning Kamp2004-02-211-4/+0
| | | | | | | | | | | | | | | Add missing D_TTY flags to various drivers. Complete asserts that dev_t's passed to ttyread(), ttywrite(), ttypoll() and ttykqwrite() have (d_flags & D_TTY) and a struct tty pointer. Make ttyread(), ttywrite(), ttypoll() and ttykqwrite() the default cdevsw methods for D_TTY drivers and remove the explicit initializations in various drivers cdevsw structures. Notes: svn path=/head/; revision=126078
* Fix wrong check.Pawel Jakub Dawidek2004-02-051-1/+1
| | | | | | | Approved by: jake, scottl (mentor) Notes: svn path=/head/; revision=125475
* - Implement selwakeuppri() which allows raising the priority of aSeigo Tanimura2003-11-091-1/+1
| | | | | | | | | | | | | | | | thread being waken up. The thread waken up can run at a priority as high as after tsleep(). - Replace selwakeup()s with selwakeuppri()s and pass appropriate priorities. - Add cv_broadcastpri() which raises the priority of the broadcast threads. Used by selwakeuppri() if collision occurs. Not objected in: -arch, -current Notes: svn path=/head/; revision=122352
* OK, I messed up /dev/console with what I had hoped would be compatPoul-Henning Kamp2003-09-261-1/+1
| | | | | | | code. Convert remaining console drivers and hope for the best. Notes: svn path=/head/; revision=120491
* Use __FBSDID().David E. O'Brien2003-08-243-5/+9
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* s=include <ofw/=include <dev/ofw/= to reflect removal of -I$S/devWarner Losh2003-08-232-2/+2
| | | | Notes: svn path=/head/; revision=119338
* Fix a signedness problem in zstty_cncheckc(): when no character is ready,Thomas Moestl2003-07-051-1/+1
| | | | | | | | | -1 should be returned, but it was assigned to an uint8_t (which is extended to an int to form the return value), causing 255 to be returned instead. Notes: svn path=/head/; revision=117248
* Note that MAJOR_AUTO is now the default if d_maj is not initialized. ThisPoul-Henning Kamp2003-03-091-1/+0
| | | | | | | | | | | is more robust and prevents the hijacking of /dev/console for the typical mistake. Remove unneeded MAJOR_AUTO uses, it is only needed explicitly now if the driver source has cross-branch compatibility to old releases. Notes: svn path=/head/; revision=112037
* Make nokqfilter() return the correct return value.Poul-Henning Kamp2003-03-031-1/+1
| | | | | | | Ditch the D_KQFILTER flag which was used to prevent calling NULL pointers. Notes: svn path=/head/; revision=111821
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-031-14/+10
| | | | | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl) Notes: svn path=/head/; revision=111815
* Use MAJOR_AUTO. GC statically assigned majors.Jake Burkholder2003-02-281-3/+1
| | | | Notes: svn path=/head/; revision=111656
* Change the console interface to pass a "struct consdev *" instead of aPoul-Henning Kamp2003-02-201-4/+4
| | | | | | | | | | | | dev_t to the method functions. The dev_t can still be found at struct consdev *->cn_dev. Add a void *cn_arg element to struct consdev which the drivers can use for retrieving their softc. Notes: svn path=/head/; revision=111194
* Munge the zs sbus attachment to work with fhc. This is a bit of a hack,Jake Burkholder2003-02-191-13/+113
| | | | | | | | but they would otherwise be almost identical so there's not much point in splitting it up further. Notes: svn path=/head/; revision=111124
* MacIO frontend for the zs driver.Benno Rice2003-02-011-0/+296
| | | | | | | | Many thanks to jake for doing the initial driver and for helping me in making this work. Notes: svn path=/head/; revision=110181
* Set the termios speed based on the tty speed. This allows consoles to work atBenno Rice2003-01-291-1/+1
| | | | | | | | | speeds other than TTYDEF_SPEED. Approved by: jake Notes: svn path=/head/; revision=110021
* Allow defaulting the console to ttya when it sets to screen and keyboardJake Burkholder2003-01-261-5/+8
| | | | | | | in the prom but no keyboard is plugged in. Notes: svn path=/head/; revision=109844
* Reset the channel in attach if its not the console.Jake Burkholder2003-01-111-0/+7
| | | | Notes: svn path=/head/; revision=109091
* Split this into bus specific front end(s), so that it can be used by ppc.Jake Burkholder2003-01-084-279/+398
| | | | | | | | | | | | This abstracts out all the differences I could see between the netbsd sparc64 and macppc zs drivers. In particular the offsets of the csr and data registers are different, so we use a separate bus handle for each and use bus_space_subregion to add the bus specific offsets. Requested by: benno Notes: svn path=/head/; revision=108971
* Use bus_space_subregion to add offsets to bus handles instead of doingJake Burkholder2003-01-081-2/+4
| | | | | | | it manually. Notes: svn path=/head/; revision=108918
* - This damnable chip only has 1 status register for both ports, so the bitJake Burkholder2003-01-021-9/+37
| | | | | | | | | | | | | | positions for the status bits of port a and port b are different. To avoid needing to know which channel the interrupt handler is working on, shift the status bits for port a into the port b bit positions, and always check the port b status bits. This fixes using port b, which I neglected to test before. - Remember to update the channel's tty structure from the passed in termios in the param routine. - Minor style. Notes: svn path=/head/; revision=108557
* Add a driver for the Zilog 8530 dual uart found in Ultra 1s and Ultra 2s.Jake Burkholder2003-01-012-0/+1629
With a 1 byte transmit fifo, 3 byte receive fifo, and wierd multiplexed I/O designed for a Z80 cpu, this chip redefines suckage. Based on the openbsd and netbsd drivers. Only really works as a console, modem support is not complete since I can't test it. Notes: svn path=/head/; revision=108535