CVSROOT: /home/cvs
Module name: linux
Changes by: macro@ftp.linux-mips.org 05/01/19 06:05:43
Modified files:
include/asm-mips/mach-atlas: mc146818rtc.h
Log message:
Reflect Atlas mapping its RTC chip in the CBUS iomem space.
diff -urN linux/include/asm-mips/mach-atlas/mc146818rtc.h
linux/include/asm-mips/mach-atlas/mc146818rtc.h
--- linux/include/asm-mips/mach-atlas/mc146818rtc.h 2005/01/15 01:31:03
1.5
+++ linux/include/asm-mips/mach-atlas/mc146818rtc.h 2005/01/19 06:05:43
1.6
@@ -1,6 +1,8 @@
/*
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
+ * Copyright (C) 1999, 2000, 2005 MIPS Technologies, Inc.
+ * All rights reserved.
+ * Authors: Carsten Langgaard <carstenl@mips.com>
+ * Maciej W. Rozycki <macro@mips.com>
* Copyright (C) 2003, 05 Ralf Baechle (ralf@linux-mips.org)
*
* This program is free software; you can distribute it and/or modify it
@@ -19,34 +21,34 @@
#ifndef __ASM_MACH_ATLAS_MC146818RTC_H
#define __ASM_MACH_ATLAS_MC146818RTC_H
-#include <linux/config.h>
-#include <asm/io.h>
+#include <linux/types.h>
+
+#include <asm/addrspace.h>
+
#include <asm/mips-boards/atlas.h>
#include <asm/mips-boards/atlasint.h>
-
-#define RTC_PORT(x) (ATLAS_RTC_ADR_REG + (x)*8)
-#define RTC_IOMAPPED 1
-#define RTC_EXTENT 16
+#define RTC_PORT(x) (ATLAS_RTC_ADR_REG + (x) * 8)
+#define RTC_IO_EXTENT 0x100
+#define RTC_IOMAPPED 0
#define RTC_IRQ ATLASINT_RTC
-#ifdef CONFIG_CPU_LITTLE_ENDIAN
-#define ATLAS_RTC_PORT(x) (RTC_PORT(x) + 0)
-#else
-#define ATLAS_RTC_PORT(x) (RTC_PORT(x) + 3)
-#endif
-
static inline unsigned char CMOS_READ(unsigned long addr)
{
- outb(addr, ATLAS_RTC_PORT(0));
+ volatile u32 *ireg = (void *)CKSEG1ADDR(RTC_PORT(0));
+ volatile u32 *dreg = (void *)CKSEG1ADDR(RTC_PORT(1));
- return inb(ATLAS_RTC_PORT(1));
+ *ireg = addr;
+ return *dreg;
}
static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
{
- outb(addr, ATLAS_RTC_PORT(0));
- outb(data, ATLAS_RTC_PORT(1));
+ volatile u32 *ireg = (void *)CKSEG1ADDR(RTC_PORT(0));
+ volatile u32 *dreg = (void *)CKSEG1ADDR(RTC_PORT(1));
+
+ *ireg = addr;
+ *dreg = data;
}
#define RTC_ALWAYS_BCD 0
|