aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mc146818
Commit message (Collapse)AuthorAgeFilesLines
* mc146818(4): remove obsolete driverMarius Strobl2020-12-253-507/+0
| | | | | It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5 and r357455 respectively.
* SPDX: Consider code from Carnegie-Mellon University.Pedro F. Giffuni2017-11-301-0/+2
| | | | | | | Interesting cases, most likely from CMU Mach sources. Notes: svn path=/head/; revision=326403
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-272-0/+4
| | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326255
* Use FreeBSD-bit-checking-styleBaptiste Daroussin2014-10-101-3/+3
| | | | | | | | | | This appease gcc 4.9 issuing warnings about parentheses Differential Revision: https://reviews.freebsd.org/D933 Reviewed by: marius Notes: svn path=/head/; revision=272894
* Remove clause 3 from Izumi Tsutsui's licenses.Marius Strobl2009-12-252-6/+2
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=201009
* Style changesMarius Strobl2009-12-253-25/+31
| | | | | | | Obtained from: NetBSD (mc146818reg.h) Notes: svn path=/head/; revision=201008
* Export mc146818_def_{read,write}() so the front-end can make useMarius Strobl2007-06-162-4/+6
| | | | | | | of them if needed. Notes: svn path=/head/; revision=170844
* Add macros for the individual divisor bits as some MC146818A-compatibleMarius Strobl2007-01-201-4/+7
| | | | | | | chips also use them for different purposes. Notes: svn path=/head/; revision=166149
* After some input from bde@ and rereading the datasheet use a MTX_SPINMarius Strobl2005-06-041-11/+11
| | | | | | | | | | | mutex instead of a MTX_DEF one in order to defer preemption while reading the date and time registers. If we don't manage to read them within the time slot where we are guaranteed that no updates occur we might actually read them during an update in which case the output is undefined. Notes: svn path=/head/; revision=146982
* o mc146818(4):Marius Strobl2005-05-192-17/+31
| | | | | | | | | | | | | | | | | | | - Add locking. - Account for if the MC146818_NO_CENT_ADJUST flag is set we don't need to check wheter year < POSIX_BASE_YEAR. - Add some comments about mapping the day of week from the range the generic clock code uses to the range the chip uses and which I meant to add in the initial version. - Minor clean-up, use __func__ instead of hardcoded function names in error strings. o in the rtc(4) front-end additionally: - Don't leak resources in case mc146818_attach() fails. - Account for ebus(4) defaulting to SYS_RES_MEMORY for the memory resources since ebus.c rev. 1.22. Notes: svn path=/head/; revision=146417
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-063-3/+3
| | | | Notes: svn path=/head/; revision=139749
* Add a driver back end for MC146818 and compatible clocks based on theMarius Strobl2004-11-173-47/+340
| | | | | | | | | | | | | | respective NetBSD driver for use with the genclock interface. It's first use will be on sparc64 but it was also tested on alpha with a preliminary patch to switch alpha to use the genclock code together with this driver instead of the respective code in alpha/alpha/clock.c and the rather MD mcclock(4). Using it on i386 and amd64 won't be that hard but some changes/extensions to improve the genclock code in general should be done first, e.g. add locking and make it easier to access the NVRAM usually coupled with RTCs. Notes: svn path=/head/; revision=137821
* Add missing $FreeBSD$Peter Wemm2000-05-011-0/+1
| | | | Notes: svn path=/head/; revision=59868
* Major changes to the generic device framework for FreeBSD/alpha:Doug Rabson1998-06-141-17/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Eliminate bus_t and make it possible for all devices to have attached children. * Support dynamically extendable interfaces for drivers to replace both the function pointers in driver_t and bus_ops_t (which has been removed entirely. Two system defined interfaces have been defined, 'device' which is mandatory for all devices and 'bus' which is recommended for all devices which support attached children. * In addition, the alpha port defines two simple interfaces 'clock' for attaching various real time clocks to the system and 'mcclock' for the many different variations of mc146818 clocks which can be attached to different alpha platforms. This eliminates two more function pointer tables in favour of the generic method dispatch system provided by the device framework. Future device interfaces may include: * cdev and bdev interfaces for devfs to use in replacement for specfs and the fixed interfaces bdevsw and cdevsw. * scsi interface to replace struct scsi_adapter (not sure how this works in CAM but I imagine there is something similar there). * various tailored interfaces for different bus types such as pci, isa, pccard etc. Notes: svn path=/head/; revision=36972
* Add initial support for the FreeBSD/alpha kernel. This is very much aDoug Rabson1998-06-101-0/+194
work in progress and has never booted a real machine. Initial development and testing was done using SimOS (see http://simos.stanford.edu for details). On the SimOS simulator, this port successfully reaches single-user mode and has been tested with loads as high as one copy of /bin/ls :-). Obtained from: partly from NetBSD/alpha Notes: svn path=/head/; revision=36849