treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / mips / include / asm / mach-dec / mc146818rtc.h
blobd4614e2a8748feabf0b802f0e2391aae06d21f10
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * RTC definitions for DECstation style attached Dallas DS1287 chip.
5 * Copyright (C) 1998, 2001 by Ralf Baechle
6 * Copyright (C) 1998 by Harald Koerfgen
7 * Copyright (C) 2002, 2005 Maciej W. Rozycki
8 */
9 #ifndef __ASM_MIPS_DEC_RTC_DEC_H
10 #define __ASM_MIPS_DEC_RTC_DEC_H
12 #include <linux/types.h>
13 #include <asm/addrspace.h>
14 #include <asm/dec/system.h>
16 extern volatile u8 *dec_rtc_base;
18 #define ARCH_RTC_LOCATION
20 #define RTC_PORT(x) CPHYSADDR((long)dec_rtc_base)
21 #define RTC_IO_EXTENT dec_kn_slot_size
22 #define RTC_IOMAPPED 0
23 #undef RTC_IRQ
25 #define RTC_DEC_YEAR 0x3f /* Where we store the real year on DECs. */
27 static inline unsigned char CMOS_READ(unsigned long addr)
29 return dec_rtc_base[addr * 4];
32 static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
34 dec_rtc_base[addr * 4] = data;
37 #define RTC_ALWAYS_BCD 0
39 #endif /* __ASM_MIPS_DEC_RTC_DEC_H */