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

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

File Facts

System
Linux kernel
Corpus path
arch/mips/include/asm/mach-jazz/mc146818rtc.h
Extension
.h
Size
873 bytes
Lines
37
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_JAZZ_MC146818RTC_H
#define __ASM_MACH_JAZZ_MC146818RTC_H

#include <linux/delay.h>

#include <asm/io.h>
#include <asm/jazz.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 *(volatile char *)JAZZ_RTC_BASE;
}

static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
{
	outb_p(addr, RTC_PORT(0));
	*(volatile char *)JAZZ_RTC_BASE = data;
}

#define RTC_ALWAYS_BCD	0

#endif /* __ASM_MACH_JAZZ_MC146818RTC_H */

Annotation

Implementation Notes