summaryrefslogtreecommitdiffstats
path: root/sys/dev/atkbdc/atkbdc_isa.c
Commit message (Collapse)AuthorAgeFilesLines
* Make sure command/data port (0x60) and status port (0x64) are in correctjkim2006-07-031-4/+10
| | | | order. Some brain-damaged ACPI BIOS has reversed resources.
* MFp4: need machine/bus.h here since we use bus space macros. It used toimp2006-06-121-0/+1
| | | | | | be brought in by name-space polluted sys/rman.h. Pointy hat to: imp
* Use the same method for detecting actual presence of AT-style keyboardsobomax2006-04-261-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | controller as we use in boot blocks (querying status register until bit 1 goes off). If that doesn't happed during reasonable period assume that the hardware doesn't have AT-style keyboard controller. This makes FreeBSD working almost OOB on MacBook Pro (still there are issues with putting second CPU core on-line, but since installation CD comes with UP kernel with this change one should be able to install FreeBSD without playing tricks with hints). Other legacy-free hardware (e.g. IBM NetVista S40) should benefit from this as well, but since I don't have any I can't verify. It should make no difference on the ordinary i386 hardware (since in that case that hardware already would be having an issues with A20 routines in boot blocks). I don't know much about AT-style keyboard controller on other platforms (and don't have dedicated access to one), therefore, the code is restricted to i386 for now. I suspect that amd64 may need this as well, but I would rather leave this decision to someone who knows better about the platform(s) in question. I have tested this change on as many "ordinary i386 boxes" as I can get my hands on, and it doesn't create any false negatives on hardware with AT-style keyboard present. MFC after: 1 month
* - Hook up the new locations of the atkbdc(4), atkbd(4) and psm(4) sourcemarius2005-06-101-150/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | files after they were repo-copied to sys/dev/atkbdc. The sources of atkbdc(4) and its children were moved to the new location in preparation for adding an EBus front-end to atkbdc(4) for use on sparc64; i.e. in order to not further scatter them over the whole tree which would have been the result of adding atkbdc_ebus.c in e.g. sys/sparc64/ebus. Another reason for the repo-copies was that some of the sources were misfiled, e.g. sys/isa/atkbd_isa.c wasn't ISA-specific at all but for hanging atkbd(4) off of atkbdc(4) and was renamed to atkbd_atkbdc.c accordingly. Most of sys/isa/psm.c, i.e. expect for its PSMC PNP part, also isn't ISA-specific. - Separate the parts of atkbdc_isa.c which aren't actually ISA-specific but are shareable between different atkbdc(4) bus front-ends into atkbdc_subr.c (repo-copied from atkbdc_isa.c). While here use bus_generic_rl_alloc_resource() and bus_generic_rl_release_resource() respectively in atkbdc_isa.c instead of rolling own versions. - Add sparc64 MD bits to atkbdc(4) and atkbd(4) and an EBus front-end for atkbdc(4). PS/2 controllers and input devices are used on a couple of Sun OEM boards and occur on either the EBus or the ISA bus. Depending on the board it's either the only on-board mean to connect a keyboard and mouse or an alternative to either RS232 or USB devices. - Wrap the PSMC PNP part of psm.c in #ifdef DEV_ISA so it can be compiled without isa(4) (e.g. for EBus-only machines). This ISA-specific part isn't separated into its own source file, yet, as it requires more work than was feasible for 6.0 in order to do it in a clean way. Actually philip@ is working on a rewrite of psm(4) so a more comprehensive clean-up and separation of hardware dependent and independent parts is expected to happen after 6.0. Tested on: i386, sparc64 (AX1105, AXe and AXi boards) Reviewed by: philip
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-291-2/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Remove local hacks to set flags now that the device probe does this for us.njl2004-10-141-2/+0
| | | | | | | Tested on every device except sio_pci and the pc98 fd.c. Perhaps something similar should be done for the "disabled" hints also. MFC after: 2 weeks
* add missing #include <sys/module.h>phk2004-05-301-0/+1
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-8/+6
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* - Use the new resource_disabled() helper function to see if devices arejhb2003-07-021-1/+1
| | | | | | | | | | | | disabled. - Change the apm driver to match the acpi driver's behavior by checking to see if the device is disabled in the identify routine instead of in the probe routine. This way if the device is disabled it is never created. Note that a few places (ips(4), Alpha SMP) used "disable" instead of "disabled" for their hint names, and these hints must be changed to "disabled". If this is a big problem, resource_disabled() can always be changed to honor both names.
* Use __FBSDID().obrien2003-06-111-2/+3
|
* Fix some easy, global, lint warnings. In most cases, this meansmarkm2003-04-301-1/+1
| | | | | making some local variables static. In a couple of cases, this means removing an unused variable.
* Yet another turn of workaround for psm/ACPI/PnP BIOSyokota2001-09-251-1/+1
| | | | | | | problems currently experienced in -CURRENT. This should fix the problem that the PS/2 mouse is detected twice if the acpi module is not loaded on some systems.
* Update the atkbdc, atkbd, and psm drivers to probe/attachyokota2001-09-061-71/+124
| | | | | | | | more cleanly and consistently in all APCI, PnP BIOS, and "hint" cases. NOTE: this doesn't necessarily solve the problem that the PS/2 mouse is not detected after the recent ACPI update.
* Add ACPI attachments.msmith2001-08-301-0/+1
|
* Hints overhaul:peter2001-06-121-10/+8
| | | | | | | | | - Replace some very poorly thought out API hacks that should have been fixed a long while ago. - Provide some much more flexible search functions (resource_find_*()) - Use strings for storage instead of an outgrowth of the rather inconvenient temporary ioconf table from config(). We already had a fallback to using strings before malloc/vm was running anyway.
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-081-2/+2
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* Staticize some malloc M_ instances.phk2000-12-081-1/+1
|
* Untangle some resource matching loops that were getting on my nervespeter2000-10-151-8/+7
| | | | and seemed to be getting cut/pasted to places they shouldn't be.
* Fixed the type of some ivar access functions. Ivars have type uintptr_t,bde2000-04-301-4/+4
| | | | | | | not u_long. On i386's with 64-bit longs, returning u_longs indirectly in (more than) the space reserved for uintptr_t's tended to corrupt the previous frame pointer in the stack frame, so it was not easy to debug. The type mismatches are hidden by the bogus cast in DEVMETHOD().
* Missing pieces of the last commit ;-(yokota2000-03-191-11/+32
|
* - Properly keep track of I/O port resources.yokota2000-03-191-22/+52
| | | | - Use bus_space_read/write() to access the ports.
* Do not add children (atkbd and psm) if they are disabled.yokota2000-02-251-0/+3
| | | | Approved by: jkh
* Use config's conditional compilation rather than using #ifdefs that makepeter2000-01-291-5/+0
| | | | | modular compilation harder. I'm doing this because people seem to like cut/pasting examples of bad practices in existing code.
* Remove the 'ivars' arguement to device_add_child() andmdodd1999-12-031-1/+2
| | | | | | | | | | | | | | | | 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
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Alter the behavior of sys/kern/subr_bus.c:device_print_child()mdodd1999-07-291-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - device_print_child() either lets the BUS_PRINT_CHILD method produce the entire device announcement message or it prints "foo0: not found\n" Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on the previous behavior of device_print_child() (printing the "foo0: <FooDevice 1.1>" bit of the announce message.) Provide bus_print_child_header() and bus_print_child_footer() to actually print the output for bus_generic_print_child(). These functions should be used whenever possible (unless you can just use bus_generic_print_child()) The BUS_PRINT_CHILD method now returns int instead of void. Modify everything else that defines or uses a BUS_PRINT_CHILD method to comply with the above changes. - Devices are 'on' a bus, not 'at' it. - If a custom BUS_PRINT_CHILD method does the same thing as bus_generic_print_child(), use bus_generic_print_child() - Use device_get_nameunit() instead of both device_get_name() and device_get_unit() - All BUS_PRINT_CHILD methods return the number of characters output. Reviewed by: dfr, peter
* Allocate the port resource when attaching the keyboard controller,yokota1999-06-291-7/+10
| | | | rather than when the individual child device is attached.
* No support for pnp yet.dfr1999-05-301-1/+5
|
* Use the resource apis to manipulate resources.dfr1999-05-221-4/+18
|
* Slight reorganization of internal interface in the keyboard controlleryokota1999-05-181-24/+25
| | | | driver.
* Remove hackish foot protection.. If you ask for an atkbd on an isa buspeter1999-05-091-17/+1
| | | | | rather than on the keyboard controller, you will get it.. (and shoot your feet)
* Move the declaration of the interrupt type from the driver structuredfr1999-05-081-2/+1
| | | | to the BUS_SETUP_INTR call.
* Print the child IRQ on it's identification line.peter1999-05-081-1/+3
|
* As a temporary anti-foot-shooting measure, don't let the user attachpeter1999-04-161-1/+17
| | | | the atkbd device to isa, as was in the old (and 3.x) GENERIC config.
* Update the alpha port to use the new syscons.dfr1999-01-231-0/+242
Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> (partly)
OpenPOWER on IntegriCloud