Allow sharing of CMOS clock setup.
PATCH 1/1 Allow sharing of CMOS clock setup.
Quoted 1 line
From
61da8cf1f92043925ea20ffafafaf0874d761b0eMon Sep 17 00:00:00 2001
From: Randy Vinson <[email protected]>
Date: Wed, 24 Oct 2007 17:36:59 -0700
Subject: [PATCH] Allow sharing of CMOS clock setup.
Move the CMOS RTC clock setup code from arch/powerpc/platforms/fsl_uli1575.c to arch/powerpc/sysdev/rtc_cmos_setup.c so it can be used by more platforms.
Signed-off-by Randy Vinson <[email protected]>
--- arch/powerpc/platforms/fsl_uli1575.c | 14 -------------- arch/powerpc/sysdev/rtc_cmos_setup.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 14 deletions(-)
arch/powerpc/platforms/fsl_uli1575.c +0 -14
@@ -13,7 +13,6 @@#include <linux/kernel.h> #include <linux/pci.h> #include <linux/interrupt.h> -#include <linux/mc146818rtc.h> #include <asm/system.h> #include <asm/pci-bridge.h>
@@ -155,19 +154,6 @@ static void __devinit quirk_final_uli1575(struct pci_dev *dev)outb (0xfa ,0x4d0 );outb (0x1e ,0x4d1 ); - -/* setup RTC */ -CMOS_WRITE (RTC_SET ,RTC_CONTROL ); -CMOS_WRITE (RTC_24H ,RTC_CONTROL ); - -/* ensure month, date, and week alarm fields are ignored */ -CMOS_WRITE (0 ,RTC_VALID ); - -outb_p (0x7c ,0x72 ); -outb_p (RTC_ALARM_DONT_CARE ,0x73 ); - -outb_p (0x7d ,0x72 ); -outb_p (RTC_ALARM_DONT_CARE ,0x73 ); }/* SATA */
arch/powerpc/sysdev/rtc_cmos_setup.c +13 -0
@@ -53,6 +53,19 @@ static int __init add_rtc(void)if (IS_ERR (pd))return PTR_ERR (pd); +/* setup RTC */ +CMOS_WRITE (RTC_SET ,RTC_CONTROL ); +CMOS_WRITE (RTC_24H ,RTC_CONTROL ); + +/* ensure month, date, and week alarm fields are ignored */ +CMOS_WRITE (0 ,RTC_VALID ); + +outb_p (0x7c ,0x72 ); +outb_p (RTC_ALARM_DONT_CARE ,0x73 ); + +outb_p (0x7d ,0x72 ); +outb_p (RTC_ALARM_DONT_CARE ,0x73 ); +return 0 ; }fs_initcall (add_rtc);
Signature · 1 line
1.5.3.rc2.22.g69a9b