summaryrefslogtreecommitdiffstats
path: root/sys/isa
Commit message (Collapse)AuthorAgeFilesLines
* o Make pccard work at all by including card.himp1999-12-101-12/+18
| | | | | | | | | | | | | o fix return type of sio_pccard_detach o don't free softc in deatch, since that is done by newbus o disconnect interrupt we used to have. Add cookie to com so that we can tear down the interrupt on unload o Set gone earlier, but likely doesn't matter This makes sio pccards work again. Cards that are active when ejects may not work (but they might, softc goes away quickly). These changes are unreviewed by bde. I'll make any style changes he wants.
* Fix a pair of silly warnings that I introduced (that would have beenpeter1999-12-061-7/+7
| | | | nasty on an Alpha or some other sizeof(int) != sizeof(long) machine).
* Add a truely evil workaround (hack!) for some unfortunate BIOSpeter1999-12-061-6/+23
| | | | | | | | | | | programming practices. It seems that newer fdc chips have an alternative way of setting the transfer speed (including high speed modes for floppy tape) that doesn't use the control register (which we don't support - we use the old way only). So, they (the BIOS programmers) sometimes leave out the 0x3f6 control register from the PnP ports descriptor(!!). "Hey, it works with windows, so what's the problem?" :-( Anyway, this hack tries to compensate for that. This was discussed with dfr (who did the pnp attachment).
* Use bus_get_resource() instead of bus_get_resource_start() as the latterpeter1999-12-061-17/+24
| | | | | | | | | returns "0" on failure, which is indistinguishable from (say) irq 0. This should stop a couple of stray messages that turn up. Also, if a BUS_SETUP_INTR() fails with INTR_TYPE_FAST, try falling back to a normal interrupt. This might help pccard folks with a shared slot interrupt. This whole thing needs to be revisited.
* newbusify and port the joy driver to the Alpha. It now attaches to thepeter1999-12-051-134/+126
| | | | | | | | joystick port on PnP sound cards that have a suitable device ID on them. Doug Rabson added timer code so it didn't have to beat on the isa timer. Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
* Remove the 'ivars' arguement to device_add_child() andmdodd1999-12-034-4/+10
| | | | | | | | | | | | | | | | device_add_child_ordered(). 'ivars' may now be set using the device_set_ivars() function. This makes it easier for us to change how arbitrary data structures are associated with a device_t. Eventually we won't be modifying device_t to add additional pointers for ivars, softc data etc. Despite my best efforts I've probably forgotten something so let me know if this breaks anything. I've been running with this change for months and its been quite involved actually isolating all the changes from the rest of the local changes in my tree. Reviewed by: peter, dfr
* Fix the hang on card eject problem and maybe the hang on suspendimp1999-12-011-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | problem. o Create new timeout routine so we don't detach the card inside a ISR but instead drop back to spl0 via a timeout of 0. o Actually delete the child of the pccard device rather than just faking it badly. o Fix sio, ed and ep to have pccard detach routines that are int rather than void. o Fix ep and ed pccard detach routines to use if_detach rather than just if_down. if_detach destroys the device, while if_down just marks it down. In this incarnation of the pccard things, we map the disable the slot action to detach the driver, which removes the driver from the device tree. When that is done, a panic would soon follow as the ifconfig tried to down the device. Didn't fix: o Should cache the pccard dev child's pointer in struct slot o remove now unused parts of struct slot o Any driver using softc after detach has been called. sio's softc used to be statically allocated, so you could check sc->gone, but that is now gone. o Didn't remove gone from softc of drivers that use the old pccard method. Didn't test: o ed driver changes o sio driver changes on pccards o suspend (no laptop or apm support on my desktop)
* Allow a DMA channel of 0. This gets the on-board mss audio device workinggallatin1999-11-221-1/+1
| | | | | | on Digital AlphaStations 200 and 500 machines (and probably others as well). Submitted by: dfr
* Allow NULL for startp and/or countp in bus_get_resource() so that you canpeter1999-11-201-2/+4
| | | | get one of the two without having to use a dummy variable.
* Argh, don't turn the IIR test on unless it's a pccard. These tests messpeter1999-11-181-24/+20
| | | | up the subsequent probes.
* Merge some typo fixes from dev/sio/sio.c (siostop -> comstop)peter1999-11-181-47/+93
| | | | | | | | | | | | | | | Remove EXTRA_SIO/NSIOTOT and make it fully dynamic (from dev/sio/sio.c) Make sio work for pccard here - pccardd doesn't activate interrupts until after prove has succeeded. Mark the initial reset of likely sio ports as broken as it depended on config supplying a list of locations to probe, devices are now proved standalone. Optimize a bit of COM_NOAST4() logic. Use bus_get_resource_start() etc rather than using isa-centric calls. Reactivate the IIR_TXRDYBUG test, I've got a card here with it. Try to be a bit smarter about activating interrupts (ie: don't panic if polled) Fix some style bugs that have crept in over time (there are still more).
* Tidy up a few loose ends in the fifo setup code.peter1999-11-181-20/+1
| | | | | | Don't use NFDC as an arbitary limit, it is not required and goes against using PnP fdc devices (eg: when PNPBIOS is turned on, the motherboard devices (sio, fdc, etc etc) are detected via PnP, not config(8).)
* Reorganise the code so that I can add custom identify drivers dynamicallydfr1999-11-111-1/+71
| | | | | | | | during autoconfig to support strange hardware (such as the Yamaha DS-1) which implements 'legacy' ISA devices as well as a PCI device. This will allow the PCI driver for the YMF724 to add the legacy devices to the ISA bus and will allow the PnP system to automatically allocate the resources for those devices.
* Add code to support ISA PnP.dfr1999-11-112-46/+128
|
* Use cdevsw_add() (temporarily) to avoid DEV_DRIVER_MODULE(), since thepeter1999-11-081-1/+2
| | | | make_dev()'s that are there are not enough.
* Use DEVICE_MODULE() directly instead of DEV_DRIVER_MODULE. psm.c usespeter1999-11-081-1/+1
| | | | make_dev() already.
* i8254_restore is called from apm_default_resume() to reloadiwasaki1999-10-301-0/+22
| | | | | | | | | | | | the countdown register. this should not be necessary but there are broken laptops that do not restore the countdown register on resume. when it happnes, it messes up the hardclock interval and system clock, which leads to the infamous "calcru: negative time" problem. Submitted by: kjc, iwasaki Reviewed by: Steve O'Hara-Smith <steveo@eircom.net> and committers. Obtained from: PAO3
* Last change to pccard_nbk now obviates the need to check the name ofimp1999-10-281-7/+0
| | | | | the device in question. Also fix warnings on if_ep_pccard.c
* Add newbus pccard attachment for sio. Some of this code was writtenimp1999-10-251-97/+97
| | | | | | | | | | by Peter Wemm, but I've not merged all the changes he sent to me yet. This has not been reviewed by bde, so I'm committing to resolve any issues he has with this when he returns from FreeBSD CON 99. I've had four reports of this working for them. I've been able to communicate to both my built in modem and a pccard modem with these patches.
* * Add some verbose logging to the PnP parser and fix a couple of bugs.dfr1999-10-143-33/+185
| | | | | | | | | | | * Move pnp_eisaformat() to pnp.c, declared in <isa/pnpvar.h>. * Turn the pnpbios code into an enumerator for the isa bus. This allows all devices known to the bios to be probed automatically. Currently the pnpbios code is dependant on the PNPBIOS option. As the code is tested more and when more drivers are converted this will be made the default. I have PnP changes in the wings for fdc, atkbd, psm, pcaudio, and joy. Sio already works with pnpbios.
* * Add struct resource_list* argument to resource_list_alloc anddfr1999-10-125-70/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | resource_list_release. This removes the dependancy on the layout of ivars. * Move set_resource, get_resource and delete_resource from isa_if.m to bus_if.m. * Simplify driver code by providing wrappers to those methods: bus_set_resource(dev, type, rid, start, count); bus_get_resource(dev, type, rid, startp, countp); bus_get_resource_start(dev, type, rid); bus_get_resource_count(dev, type, rid); bus_delete_resource(dev, type, rid); * Delete isa_get_rsrc and use bus_get_resource_start instead. * Fix a stupid typo in isa_alloc_resource reported by Takahashi Yoshihiro <nyan@FreeBSD.org>. * Print a diagnostic message if we can't assign resources to a PnP device. * Change device_print_prettyname() so that it doesn't print "(no driver assigned)-1" for anonymous devices.
* Oh foo. I got carried away. :-( "joy.h" is used to size an array.peter1999-10-111-0/+2
| | | | (Incidently, there is no bounds checking...)
* Add support for the USRobotics Courier V.Everything (USR0101) modem.steve1999-10-111-0/+1
| | | | Submitted by: Robert Blayzor <robert@superior.net>
* Zap unneeded #include (found by phk)peter1999-10-111-6/+0
| | | | | Remove useless #include "joy.h"; #if NJOY > 0 - this is always true if it's being compiled. config arranges this.
* Factor out the PnP resource parser so that it can be re-used by pnpbiosdfr1999-10-093-234/+465
| | | | | | and acpi. Reviewed by: msmith
* Remove old copies. These files now live in src/sys/dev/buslogicmdodd1999-10-091-343/+0
|
* Change pnp ID for the SupraExpress 56i Sp V.90 modem (logical IDdeischen1999-10-031-2/+4
| | | | | | | | | | 0x8024b04e) so that the cards description is used instead of overriding it. While I'm here, add an ID for the SUP2080 and the SUP2030. PR: kern/13983 Submitted by: Kurt D. Zeilenga <Kurt@OpenLDAP.Org> (SUP2030) dfr (rest of change) Reviewed by: dfr
* Add logical device ID for the Diamond SupraExpress 56K PnP modem:deischen1999-10-031-0/+1
| | | | | | | | Vendor ID SUP2480 (0x8024b04e), Serial Number 0x00001334 PnP Version 1.0, Vendor Version 0 Device Description: SupraExpress 56i Sp V.90 Reviewed by: dfr
* Disable pnp devices before running heuristic probes. This allows us todfr1999-10-031-2/+16
| | | | | 'hide' those devices from those probes so that they don't get probed and then re-probed later when the pnp probe is run.
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-255-25/+2
| | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags
* This patch clears the way for removing a number of tty relatedphk1999-09-251-23/+7
| | | | | | | | | | | | | | | | | | | | | fields in struct cdevsw: d_stop moved to struct tty. d_reset already unused. d_devtotty linkage now provided by dev_t->si_tty. These fields will be removed from struct cdevsw together with d_params and d_maxio Real Soon Now. The changes in this patch consist of: initialize dev->si_tty in *_open() initialize tty->t_stop remove devtotty functions rename ttpoll to ttypoll a few adjustments to these changes in the generic code a bump of __FreeBSD_version add a couple of FreeBSD tags
* Two more devstat_end_transaction() -> devstat_end_transaction_buf().phk1999-09-191-7/+1
|
* Use devstat_end_transaction_buf() rather than Use devstat_end_transaction()phk1999-09-181-6/+1
|
* Parse resource descriptions which don't have START_DEPENDANT tagsdfr1999-09-171-0/+6
| | | | | correctly. This fixes resource allocation for various PnP ed cards but there are other problems which prevent that driver from working right.
* Removed diskerr()'s unused d_name arg and updated callers. This fixesbde1999-09-131-1/+1
| | | | | | warnings caused by the arg having the wrong type (not const enough). The arg was also wrong (a full name instead of a short one) for calls from from subr_diskmbr.c and pc98/diskslice_machdep.c.
* Changes to centralise the default blocksize behaviour.julian1999-09-091-3/+0
| | | | | | More likely to follow. Submitted by: phk@freebsd.org
* Make it build, copy from dev/sio/sio.c:peter1999-09-081-4/+4
| | | | | isa_set_flags -> device_set_flags isa_get_flags -> device_get_flags
* Restore the old sio* - bruce can fix it himself.peter1999-09-082-0/+3188
|
* Change isa_get/set_flags() to device_get/set_flags().dfr1999-09-077-21/+9
|
* Repo copy isa/sio* to dev/sio/sio* in preperation for extra bus methodspeter1999-09-062-3188/+0
| | | | | including pci. Also, eliminate NSIOTOT and do it dynamically where it matters.
* Move the #if 0 to catch the card.h include and make sure it's zero.peter1999-09-061-1/+3
|
* Start to disentangle the isa attachments from other buses. Partiallyimp1999-09-061-16/+14
| | | | | | | | | | | | | | rewrite the pccard attachment case. This is a work in progress, but doesn't break the isa case. I left the #if 0...#endif around the pccard stuff, at Peter's request, so that normal users don't shoot themselves in the foot. While I was here: o Indent a comment to the right location o Spell Unknown with a final 'n'. Reviewed by: peter
* Only set the description if there is one in the matching isa_pnp_id.dfr1999-09-041-1/+2
|
* Add USR3031 pnp id.dfr1999-09-041-0/+1
| | | | Submitted by: Steve Price <sprice@hiwaay.net>
* Remove the last vestiges of the old pnp code in favour of the new one.dfr1999-09-031-106/+1
|
* Cosmetic tweak. Collect the fdc methods together and apart from the fdpeter1999-09-031-44/+53
| | | | methods so it's a little easier to seperate the two when reading the code.
* Revert a bunch of contraversial changes by PHK. Afterjulian1999-09-031-0/+1
| | | | | | | | | | a quick think and discussion among various people some form of some of these changes will probably be recommitted. The reversion requested was requested by dg while discussions proceed. PHK has indicated that he can live with this, and it has been agreed that some form of some of these changes may return shortly after further discussion.
* This adds the i386 specific support for systems with a MicroChannelmdodd1999-09-031-0/+10
| | | | | | Architecture bus. Reviewed by: msmith
* s/LOGIGAL/LOGICAL/peter1999-09-022-2/+2
|
* This represents essentially a complete rewrite of the ISA PnP code. Thedfr1999-09-018-146/+1531
| | | | | | | | new system is integrated with the ISA bus code more cleanly and allows the future addition of more enumerators such as PnPBIOS and ACPI. This commit also enables the new pcm driver since it is somewhat tied to the new PnP code.
OpenPOWER on IntegriCloud