Commit Graph

50 Commits

Author SHA1 Message Date
Pedro F. Giffuni
718cf2ccb9 sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2017-11-27 14:52:40 +00:00
Konstantin Belousov
263f801fef Fix typo, TC0->TCO.
Submitted by:	jhb
MFC after:	1 week
2017-09-10 13:21:54 +00:00
Konstantin Belousov
8bbe154276 Add definitions of (new) bits for TCO registers from the
Lewisburg/Sunrise Point documentation.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-09-10 12:10:27 +00:00
Konstantin Belousov
d703e54899 Style: tab after #define.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-09-10 11:57:02 +00:00
Alexander Motin
40715e9ed7 Add explicit check for PCI bus to r321720.
Reported by:	jhb
MFC after:	6 days
2017-08-01 09:22:10 +00:00
Alexander Motin
26567f6924 Attach ichwd(4) only to ISA bus of the LPC bridge.
Resource allocation for parent device does not look good by itself, but
attempt to allocate them for unrelated device just does not end up good.
On Asus X99-E WS/USB3.1 system reporting ISA bridge via both PCI and ACPI
this reported to cause kernel panic on shutdown due to messed resources:
https://bugs.freenas.org/issues/25237.

MFC after:	1 week
2017-07-30 15:19:07 +00:00
Warner Losh
9417c448f8 Fixed TCO v3 tick convert
TCO v3's internal timer is stored as seconds.

Submitted by:	Denir Li <denir-li@users.noreply.github.com>
Pull Request:	https://github.com/freebsd/freebsd/pull/51
Pull Request:	https://github.com/freebsd/freebsd/pull/52
2017-03-01 05:18:43 +00:00
Alexander Motin
fc6eef7aa8 Unify ichwd(4) attachment messages in dmesg.
MFC after:	2 weeks
2016-03-24 23:24:00 +00:00
Fabien Thomas
078246e50f Add ichwd TCO version 3 support (Bay Trail / Rangeley...)
Reviewed by: jhb
Obtained from: Cas-well
Sponsored by: Stormshield
2015-08-18 14:54:29 +00:00
Christian Brueffer
16858c207b Actually recognize all Intel Lynx Point devices we have device IDs for.
PR:		195851
Submitted by:	ftigeot@wolfpond.org
MFC after:	1 week
2015-07-16 11:14:59 +00:00
Alexander Motin
e67f3bec39 Add bunch of PCI IDs of Intel Wildcat Point (9 Series) chipsets.
MFC after:	1 week
2014-11-26 04:23:21 +00:00
Jack F Vogel
428e286da3 Add new Coleto Creek device support: SATA, SMBus, and Watchdog devices.
MFC after: 1 week
2013-07-19 21:37:40 +00:00
Mark Johnston
784bcaa1dc Don't log a message when the watchdog is reloaded. It's not useful to do so
and these messages flood the log when bootverbose is enabled.

Approved by:	rstone (co-mentor)
2013-03-09 15:04:44 +00:00
Jack F Vogel
5531f5a148 Add support for new Intel Lynx Point PCH - Watchdog Timer Device IDs 2013-01-02 21:45:20 +00:00
John Baldwin
e0636bc0ca Remove use of explicit bus space tags and handles and use methods that
operate on resource objects instead.

MFC after:	1 week
2012-01-05 16:27:32 +00:00
Xin LI
cdd4eea9fc Fix a bug in ichwd(4) which prevents it from beig enabled if the new
timeout is the same timeout.

Submitted by:	Dmitrij Tejblum <tejblum yandex-team.ru>
PR:		kern/139604
MFC after:	2 weeks
Approved by:	re (kib)
2011-09-02 17:06:50 +00:00
Jack F Vogel
73e3bb6563 Chipset support for the new Intel Panther Point PCH, thanks
to Seth Heasley for preparing the changes.
2011-05-11 20:31:27 +00:00
Attilio Rao
f451d23cfc Add missing bit in r221015.
Sponsored by:	Sandvine Incorporated
Reviewed by:	des
MFC after:	1 week
X-MFC:		r221015
2011-04-25 14:12:58 +00:00
Attilio Rao
bb83df766c Don't assume that SMI are enabled when attaching ichwd and then do
correct unwind based on former state.

Sponsored by:	Sandvine Incorporated
Reviewed by:	des
MFC after:	1 week
2011-04-25 14:10:33 +00:00
Dag-Erling Smørgrav
bffd599bc9 Whitespace nit 2011-04-25 09:18:05 +00:00
Attilio Rao
d0827a169b Add some more bit definitions:
- TCO_MESSAGEx: TCO specific regs providing the ability to monitor BIOS
  bootup activity.
- TCO_NEWCENTURY: reporting RTC year roll over.
- TCO_NMI2SMI_EN, TCO_NMI_NOW: controlling SMIs conversion to NMIs and
  NMI trigger.
- SMI_GBL_EN: Enabling SMI delivery for all the northbridge controller.

MFC after:	10 days
2011-04-21 14:39:33 +00:00
Jack F Vogel
bf0477b215 Support for the new Patsburg PCH chipset:
- SMBus Controller
     - SATA Controller
     - HD Audio Controller
     - Watchdog Controller

Thanks to Seth Heasley (seth.heasley@intel.com) for providing us code.

MFC after 3 days
2011-02-01 01:05:11 +00:00
Jack F Vogel
d5267ede37 Support for the new DH89xxCC PCH chipset including:
- SATA controller
      - Watchdog timer
      - SMBus controller
2011-01-31 18:41:52 +00:00
Attilio Rao
cb1f5a37e9 Use convenience macro for minimum and maximum value capping when
re-arming the watchdog timeout.

Sponsored by:	Sandvine Incorporated
Submitted by:	Mark Johnston <mjohnston at sandvine dot com>
Reviewed by:	des
MFC after:	10 days
2010-12-08 15:32:54 +00:00
Ed Maste
0c761ee78d Add a comment to clarify that some BIOSes may clear the hw watchdog
indicator bit, preventing us from reporting in that case.

X-MFC-with:	r215868
2010-12-07 19:18:00 +00:00
Ed Maste
84fe19c742 Fix build by correcting function name. Pointed out by dougb. 2010-11-27 00:26:19 +00:00
Attilio Rao
fe4424cbbd - Advertise when the reboot came from a watchdog-induced reset.
- Fix a bug where TCO_BOOT_STS was supposed to be cleared after
  TCO_SECOND_TO_STS and not before.

Sponsored by:	Sandvine Incorporated
Submitted by:	Mark Johnston <mjohnston at sandvine dot com>
Reviewed by:	des
MFC after:	10 days
2010-11-26 15:35:08 +00:00
Jack F Vogel
6d23f8741b Add Intel Cougar Point PCH LPC Controller Device IDs
for watchdog support. Also add additional Intel Ibex
Peak (5 Series/3400 Series) PCH IDs.

MFC after a week
2010-08-28 00:09:46 +00:00
Andriy Gapon
7f5b7f2323 ichwd: correct range check for timeout value
This is similar to a fix in r189305 but for earlier ICH versions (<= 5).

Reported by:	someone via attilio
Discussed with:	des, attilio
MFC after:	1 week
2010-07-24 19:40:16 +00:00
Remko Lodder
b6a18bc939 Add support for the NM10 chipset.
PR:		kern/143118
Submitted by:	Koshin sumitani <ksumitani at mui dot biglobe dot ne dot jp>
Approved by:	imp (mentor, implicit)
MFC after:	3 days
2010-01-24 10:50:20 +00:00
Ed Maste
b8c05be0c1 Add H55 ID from Mike Tancsa, with minor rewording from avg@.
PR:		kern/143068
Submitted by:	Mike Tancsa (Sentex)
MFC after:	1 week
2010-01-22 16:05:10 +00:00
Andriy Gapon
ede807c429 ichwd: don't attach to isa pnp device(s) by accident
Reviewed by:	imp, des
MFC after:	1 week
2009-11-07 11:41:23 +00:00
Nick Hibma
9ee1df0ce5 Don't print out a message on loading a module. 'kldload -v' and 'kldstat
| grep <modname>' can be used instead.

Put a message behind bootverbose as

	ichwd0: <Intel ICH6M watchdog timer> on isa0
	ichwd0: Intel ICH6M watchdog timer (ICH6 or equivalent)

does not make a lot of sense.

MFC after:	1 week
2009-09-10 18:33:08 +00:00
Dag-Erling Smørgrav
5f9672e15d Rename two functions to make their purpose clearer. Add tons of comments.
Generated code is identical after stripping .comment section.

Suggested by:	Andriy Gapon <avg@icyb.net.ua>
MFC after:	2 weeks
2009-03-19 12:39:13 +00:00
Andriy Gapon
d38d0090c0 ichwd: correct range check for timeout value
Approved by:	jhb (mentor)
2009-03-03 15:50:24 +00:00
John Baldwin
94bf3b9f69 Add more PCI IDs including those for ICH10.
PR:		kern/126736
Submitted by:	Olivier Smedts  olivier of gid0 org
MFC after:	1 week
2008-08-25 15:23:54 +00:00
Dag-Erling Smørgrav
909a07a8cf Add support for ICH8M.
PR:		kern/119351
Submitted by:	Takeharu KATO <takeharu1219@ybb.ne.jp>
MFC after:	1 week
2008-01-07 09:46:39 +00:00
Dag-Erling Smørgrav
89dbcee8ce Add device IDs for the ICH9 family.
PR:		i386/119126
Submitted by:	Dan Lukes <dan@obluda.cz>
MFC after:	1 week
2007-12-31 11:44:01 +00:00
Dag-Erling Smørgrav
abb75f864a Tabify. 2007-12-31 11:42:31 +00:00
Jack F Vogel
b8b1729d3c Add PCI device support for Intel S7000FC4UR in usb and ichwd, systems
will not install without the usb changes in the install kernel, so I
would like to MFC this in time for 7.0 RC

MFC: 3 days
2007-11-15 23:59:36 +00:00
Dag-Erling Smørgrav
438dafbbcf Update to support ICH[678] chipsets (based on a patch by Takeharu KATO)
Fix a resource allocation bug (explained by jhb on -acpi)
Thanks for Mike Tancsa for testing and helping track down the bug.

Approved by:	re (kensmith)
MFC after:	3 weeks
2007-08-13 18:52:37 +00:00
Nick Hibma
f29fa1dfa4 Revisit the watchdogs: Resetting the error to EINVAL after failing to set the
watchdog might hide the succesful arming of an earlier one. Accept that on
failing to arm any watchdog (because of non-supported timeouts) EOPNOTSUPP is
returned instead of the more appropriate EINVAL.

MFC after:	3 days
2007-03-27 21:03:37 +00:00
Nick Hibma
07cc71882a In one of the previous commits I accidentally removed the enabling of the
watchdog chip.

Noticed by:	Mike Tancsa
Tested by:	Mike Tancsa
MFC after:	1 week
2007-03-13 15:54:26 +00:00
Nick Hibma
9079fff550 Align the interfaces for the various watchdogs and make the interface
behave as expected.

Also:
- Return an error if WD_PASSIVE is passed in to the ioctl as only
  WD_ACTIVE is implemented at the moment. See sys/watchdog.h for an
  explanation of the difference between WD_ACTIVE and WD_PASSIVE.
- Remove the I_HAVE_TOTALLY_LOST_MY_SENSE_OF_HUMOR define. If you've
  lost your sense of humor, than don't add a define.

Specific changes:

i80321_wdog.c
  Don't roll your own passive watchdog tickle as this would defeat the
  purpose of an active (userland) watchdog tickle.

ichwd.c / ipmi.c:
  WD_ACTIVE means active patting of the watchdog by a userland process,
  not whether the watchdog is active. See sys/watchdog.h.

kern_clock.c:
  (software watchdog) Remove a check for WD_ACTIVE as this does not make
  sense here. This reverts r1.181.
2006-12-15 21:44:49 +00:00
Doug Ambrisko
c094bde40d Re-work the bus attachment somewhat. Make the rids unique for
the SMI/TCO address space.  Switch the bus space I/O to the
one specific for either the SMI or TCO space.  Re-calibrate
the tick.  Add some more device id's, 82801FBR submitted by des.
This makes it work on the platforms I've tested with.

Go ahead by:	des
2006-02-17 18:46:18 +00:00
Warner Losh
098ca2bda9 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
John-Mark Gurney
0ddcf11c52 make code less broken, only try to create unit 0 since there can only
be one, this will help prevent multipling devices if this driver is
ever loaded/unloaded multiple times...

Prodded by:	julian
2004-06-13 05:00:19 +00:00
Poul-Henning Kamp
fe12f24bb0 Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
Dag-Erling Smørgrav
0f126ea09f Remove some debugging printf()s and a pointless device_set_desc() call. 2004-05-15 00:07:23 +00:00
Dag-Erling Smørgrav
cae8da6164 Add a driver for the watchdog timer function present on the LPC interface
bridge in Intel ICH-series chipsets.

The original implementation was by W. Daryl Hawkins of Texas A&M, but I
have made substantial modifications.
2004-05-11 18:21:38 +00:00