linux-mips
[Top] [All Lists]

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

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH V4 04/16] MIPS: Loongson: Make Loongson-3 to use BCD format for RTC.
From: Huacai Chen <chenhuacai@gmail.com>
Date: Fri, 3 Aug 2012 15:05:59 +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=nLVjaGi7krAhCjwopf/hGIFY4fpVZoOYqGymr8WjNYIQOVpr1qKSeeJ7X9tAxQ5apK 9nndyDOjvdB6KK0dzYHqfxA0xzf5k2XZTcaWNJD7iaYJ7j3ph/E5Y0wCeRgVMXZO2MMV oZB/wj647pqWsid0lN+o698Jg9b8Mqs2tf8QC4a206y0si/xw9KoxPjHQXVQ5zU4GjQu sM9W6jYhJnCkQ+TFXm49BUsyvL0ohGp3p5/RS5j5Mw0I/UCoS5hxUP92pjAqO8axbWW4 A+sumqYsAoUD+NcYwTlzLmaGPXtvnEaPln60ySQl+P/TApf8H1KPhGAar9EcfTwzU4wy znag==
In-reply-to: <1343977571-2292-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: <1343977571-2292-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>