arch/mips/include/asm/mach-generic/mc146818rtc.h

Source file repositories/reference/linux-study-clean/arch/mips/include/asm/mach-generic/mc146818rtc.h

File Facts

System
Linux kernel
Corpus path
arch/mips/include/asm/mach-generic/mc146818rtc.h
Extension
.h
Size
764 bytes
Lines
33
Domain
Architecture Layer
Bucket
arch/mips
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#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 */

Annotation

Implementation Notes