linux-mips
[Top] [All Lists]

[PATCH V3 04/16] MIPS: Loongson: Make Loongson-3 to use BCD format for R

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH V3 04/16] MIPS: Loongson: Make Loongson-3 to use BCD format for RTC.
From: Huacai Chen <chenhuacai@gmail.com>
Date: Fri, 22 Jun 2012 11:01:01 +0800
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Fuxin Zhang <zhangfx@lemote.com>, Zhangjin Wu <wuzhangjin@gmail.com>, Huacai Chen <chenhc@lemote.com>, Hongliang Tao <taohl@lemote.com>, Hua Yan <yanh@lemote.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=gq/HNgkjD5zgiDgKl7jxsfw2+xEw/5VYH6PnxXrZ72c=; b=SN+fHs8JEe9Sg2QOzm4i0a31ZF9P5tVIcEyPw0BX9ZnnYHb12bge5InowtDbZBDeRh 5nh27M+d/jpsqc7v4lz5Y6kjwYit4LEQleuxpo0Y2jp5S2/qR0xdCBq7gIWBa64seVP1 T5oHCjadMHp2epaCE7GSYHVMIRA2T5jjZyCl0YWkI8peZsTbvsaLrQ9quTfPv9EMcUFD zTu3eX8fzyK3xdYcIiPvf79wUt6RD0FcBZMyh/zW8mzgHfgDwwT7LYDyuAyBm/JTG9p2 SWlyH91iWmGLyGOHGxjYNzFlkiDYpQ0WfL2MOIS+kUfTc/UfiHPiu47xdYtoRhGCrCZm f6lw==
In-reply-to: <1340334073-17804-1-git-send-email-chenhc@lemote.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1340334073-17804-1-git-send-email-chenhc@lemote.com>
Sender: linux-mips-bounce@linux-mips.org
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Hongliang Tao <taohl@lemote.com>
Signed-off-by: Hua Yan <yanh@lemote.com>
---
 arch/mips/include/asm/mach-loongson/mc146818rtc.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/mips/include/asm/mach-loongson/mc146818rtc.h 
b/arch/mips/include/asm/mach-loongson/mc146818rtc.h
index ed7fe97..6b10159 100644
--- a/arch/mips/include/asm/mach-loongson/mc146818rtc.h
+++ b/arch/mips/include/asm/mach-loongson/mc146818rtc.h
@@ -27,7 +27,11 @@ static inline void CMOS_WRITE(unsigned char data, unsigned 
long addr)
        outb_p(data, RTC_PORT(1));
 }
 
+#ifdef CONFIG_CPU_LOONGSON3
+#define RTC_ALWAYS_BCD 1
+#else
 #define RTC_ALWAYS_BCD 0
+#endif
 
 #ifndef mc146818_decode_year
 #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 
1970)
-- 
1.7.7.3


<Prev in Thread] Current Thread [Next in Thread>