Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
33 lines
764 B
C
33 lines
764 B
C
/*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* Copyright (C) 1998, 2001, 03 by Ralf Baechle
|
|
*
|
|
* RTC routines for PC style attached Dallas chip.
|
|
*/
|
|
#ifndef __ASM_MACH_GENERIC_MC146818RTC_H
|
|
#define __ASM_MACH_GENERIC_MC146818RTC_H
|
|
|
|
#include <asm/io.h>
|
|
|
|
#define RTC_PORT(x) (0x70 + (x))
|
|
#define RTC_IRQ 8
|
|
|
|
static inline unsigned char CMOS_READ(unsigned long addr)
|
|
{
|
|
outb_p(addr, RTC_PORT(0));
|
|
return inb_p(RTC_PORT(1));
|
|
}
|
|
|
|
static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
|
|
{
|
|
outb_p(addr, RTC_PORT(0));
|
|
outb_p(data, RTC_PORT(1));
|
|
}
|
|
|
|
#define RTC_ALWAYS_BCD 0
|
|
|
|
#endif /* __ASM_MACH_GENERIC_MC146818RTC_H */
|