/* SPDX-License-Identifier: GPL-2.0-only */
/*
* include / linux / rtc / m48t59 . h
*
* Definitions for the platform data of m48t59 RTC chip driver .
*
* Copyright ( c ) 2007 Wind River Systems , Inc .
*
* Mark Zhan < rongkai . zhan @ windriver . com >
*/
#ifndef _LINUX_RTC_M48T59_H_
#define _LINUX_RTC_M48T59_H_
/*
* M48T59 Register Offset
*/
#define M48T59_YEAR 0 xf
#define M48T59_MONTH 0 xe
#define M48T59_MDAY 0 xd /* Day of Month */
#define M48T59_WDAY 0 xc /* Day of Week */
#define M48T59_WDAY_CB 0 x20 /* Century Bit */
#define M48T59_WDAY_CEB 0 x10 /* Century Enable Bit */
#define M48T59_HOUR 0 xb
#define M48T59_MIN 0 xa
#define M48T59_SEC 0 x9
#define M48T59_CNTL 0 x8
#define M48T59_CNTL_READ 0 x40
#define M48T59_CNTL_WRITE 0 x80
#define M48T59_WATCHDOG 0 x7
#define M48T59_INTR 0 x6
#define M48T59_INTR_AFE 0 x80 /* Alarm Interrupt Enable */
#define M48T59_INTR_ABE 0 x20
#define M48T59_ALARM_DATE 0 x5
#define M48T59_ALARM_HOUR 0 x4
#define M48T59_ALARM_MIN 0 x3
#define M48T59_ALARM_SEC 0 x2
#define M48T59_UNUSED 0 x1
#define M48T59_FLAGS 0 x0
#define M48T59_FLAGS_WDT 0 x80 /* watchdog timer expired */
#define M48T59_FLAGS_AF 0 x40 /* alarm */
#define M48T59_FLAGS_BF 0 x10 /* low battery */
#define M48T59RTC_TYPE_M48T59 0 /* to keep compatibility */
#define M48T59RTC_TYPE_M48T02 1
#define M48T59RTC_TYPE_M48T08 2
struct m48t59_plat_data {
/* The method to access M48T59 registers */
void (*write_byte)(struct device *dev, u32 ofs, u8 val);
unsigned char (*read_byte)(struct device *dev, u32 ofs);
int type; /* RTC model */
/* ioaddr mapped externally */
void __iomem *ioaddr;
/* offset to RTC registers, automatically set according to the type */
unsigned int offset;
/* YY digits (in RTC) are offset, i.e. year is 1900 + yy_offset + YY */
int yy_offset;
};
#endif /* _LINUX_RTC_M48T59_H_ */
Messung V0.5 in Prozent C=82 H=97 G=89
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-09-29)
¤
*© Formatika GbR, Deutschland