IP22/28: Switch over to RTC class driver
Thomas Bogendoerfer
maintainerPATCH v3 1/1 IP22/28: Switch over to RTC class driver
This patchset removes some dead code and creates a platform device for the RTC class driver.
Signed-off-by Thomas Bogendoerfer <[email protected]>
---
Please apply for 2.6.28
arch/mips/include/asm/mach-ip22/ds1286.h | 18 -------- arch/mips/include/asm/mach-ip28/ds1286.h | 4 -- arch/mips/sgi-ip22/ip22-platform.c | 15 +++++++ arch/mips/sgi-ip22/ip22-setup.c | 1 - arch/mips/sgi-ip22/ip22-time.c | 64 ------------------------------ include/linux/ds1286.h | 2 - 6 files changed, 15 insertions(+), 89 deletions(-)
arch/mips/include/asm/mach-ip22/ds1286.h deleted +0 -18
@@ -1,18 +0,0 @@ -/* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -* -* Copyright (C) 1998, 2001, 03 by Ralf Baechle -* -* RTC routines for PC style attached Dallas chip. -*/ -#ifndef __ASM_MACH_IP22_DS1286_H -#define __ASM_MACH_IP22_DS1286_H - -#include <asm/sgi/hpc3.h> - -#define rtc_read (reg) (hpc3c0->rtcregs[(reg)] & 0xff) -#define rtc_write (data, reg) do { hpc3c0->rtcregs[(reg)] = (data); } while(0) - -#endif /* __ASM_MACH_IP22_DS1286_H */
arch/mips/include/asm/mach-ip28/ds1286.h deleted +0 -4
@@ -1,4 +0,0 @@ -#ifndef __ASM_MACH_IP28_DS1286_H -#define __ASM_MACH_IP28_DS1286_H -#include <asm/mach-ip22/ds1286.h> -#endif /* __ASM_MACH_IP28_DS1286_H */
arch/mips/sgi-ip22/ip22-platform.c +15 -0
@@ -192,3 +192,18 @@ static int __init sgi_button_devinit(void) }device_initcall (sgi_button_devinit); + +static int __init sgi_ds1286_devinit (void ) +{ +struct resource res; + +memset (&res,0 ,sizeof (res)); + res.start =HPC3_CHIP0_BASE + offsetof(struct hpc3_regs , rtcregs); + res.end = res.start +sizeof (hpc3c0->rtcregs) -1 ; + res.flags =IORESOURCE_MEM ; + +return IS_ERR (platform_device_register_simple ("rtc-ds1286" ,-1 , + &res,1 )); +} + +device_initcall (sgi_ds1286_devinit);
arch/mips/sgi-ip22/ip22-setup.c +0 -1
@@ -4,7 +4,6 @@* Copyright (C) 1996 David S. Miller ([email protected]) * Copyright (C) 1997, 1998 Ralf Baechle ([email protected]) */ -#include <linux/ds1286.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/kdev_t.h>
arch/mips/sgi-ip22/ip22-time.c +0 -64
76 lines not on this page · raw message
include/linux/ds1286.h +0 -2
@@ -8,8 +8,6 @@#ifndef __LINUX_DS1286_H#define __LINUX_DS1286_H -#include <asm/ds1286.h> -/********************************************************************** * register summary **********************************************************************/
Ralf Baechle
AppliedQuoted 7 lines · Thomas Bogendoerfer
This patchset removes some dead code and creates a platform device for the RTC class driver.
Signed-off-by Thomas Bogendoerfer <[email protected]>---
Please apply for 2.6.28
Thanks, applied.
Ralf