diff mbox series

[2/2] MIPS: loongson32: Remove regs-rtc.h

Message ID 20230707111151.461373-3-keguang.zhang@gmail.com (mailing list archive)
State Superseded
Headers show
Series MIPS: loongson32: Remove obsolete header files | expand

Commit Message

Keguang Zhang July 7, 2023, 11:11 a.m. UTC
Since commit 9fb23090658a ("rtc: Remove the
Loongson-1 RTC driver"), no one is using regs-rtc.h.
Therefore, remove this obsolete header file.

Signed-off-by: Keguang Zhang <keguang.zhang@gmail.com>
---
 .../include/asm/mach-loongson32/loongson1.h   |  1 -
 .../include/asm/mach-loongson32/regs-rtc.h    | 19 -------------------
 2 files changed, 20 deletions(-)
 delete mode 100644 arch/mips/include/asm/mach-loongson32/regs-rtc.h

Comments

Thomas Bogendoerfer July 25, 2023, 8:47 a.m. UTC | #1
On Fri, Jul 07, 2023 at 07:11:51PM +0800, Keguang Zhang wrote:
> Since commit 9fb23090658a ("rtc: Remove the
> Loongson-1 RTC driver"), no one is using regs-rtc.h.
> Therefore, remove this obsolete header file.
> 
> Signed-off-by: Keguang Zhang <keguang.zhang@gmail.com>
> ---
>  .../include/asm/mach-loongson32/loongson1.h   |  1 -
>  .../include/asm/mach-loongson32/regs-rtc.h    | 19 -------------------
>  2 files changed, 20 deletions(-)
>  delete mode 100644 arch/mips/include/asm/mach-loongson32/regs-rtc.h
> 
> diff --git a/arch/mips/include/asm/mach-loongson32/loongson1.h b/arch/mips/include/asm/mach-loongson32/loongson1.h
> index bc27fcee3176..84f45461c832 100644
> --- a/arch/mips/include/asm/mach-loongson32/loongson1.h
> +++ b/arch/mips/include/asm/mach-loongson32/loongson1.h
> @@ -46,6 +46,5 @@
>  #define LS1X_CLK_BASE			0x1fe78030
>  
>  #include <regs-mux.h>
> -#include <regs-rtc.h>
>  
>  #endif /* __ASM_MACH_LOONGSON32_LOONGSON1_H */
> diff --git a/arch/mips/include/asm/mach-loongson32/regs-rtc.h b/arch/mips/include/asm/mach-loongson32/regs-rtc.h
> deleted file mode 100644
> index a3d096be1607..000000000000
> --- a/arch/mips/include/asm/mach-loongson32/regs-rtc.h
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0-or-later */
> -/*
> - * Copyright (c) 2016 Yang Ling <gnaygnil@gmail.com>
> - *
> - * Loongson 1 RTC timer Register Definitions.
> - */
> -
> -#ifndef __ASM_MACH_LOONGSON32_REGS_RTC_H
> -#define __ASM_MACH_LOONGSON32_REGS_RTC_H
> -
> -#define LS1X_RTC_REG(x) \
> -		((void __iomem *)KSEG1ADDR(LS1X_RTC_BASE + (x)))
> -
> -#define LS1X_RTC_CTRL	LS1X_RTC_REG(0x40)
> -
> -#define RTC_EXTCLK_OK	(BIT(5) | BIT(8))
> -#define RTC_EXTCLK_EN	BIT(8)
> -
> -#endif /* __ASM_MACH_LOONGSON32_REGS_RTC_H */
> -- 
> 2.39.2

I get these build error when this patch is applied:

linux/arch/mips/loongson32/common/platform.c: In function ‘ls1x_rtc_set_extclk’:
/local/tbogendoerfer/korg/linux/arch/mips/loongson32/common/platform.c:270:24: error: ‘LS1X_RTC_CTRL’ undeclared (first use in this function)
  u32 val = __raw_readl(LS1X_RTC_CTRL);
                        ^~~~~~~~~~~~~
linux/arch/mips/loongson32/common/platform.c:270:24: note: each undeclared identifier is reported only once for each function it appears in
/local/tbogendoerfer/korg/linux/arch/mips/loongson32/common/platform.c:272:14: error: ‘RTC_EXTCLK_OK’ undeclared (first use in this function)
  if (!(val & RTC_EXTCLK_OK))
              ^~~~~~~~~~~~~
linux/arch/mips/loongson32/common/platform.c:273:22: error: ‘RTC_EXTCLK_EN’ undeclared (first use in this function)
   __raw_writel(val | RTC_EXTCLK_EN, LS1X_RTC_CTRL);

Thomas.
Keguang Zhang July 25, 2023, 10:15 a.m. UTC | #2
On Tue, Jul 25, 2023 at 4:59 PM Thomas Bogendoerfer
<tsbogend@alpha.franken.de> wrote:
>
> On Fri, Jul 07, 2023 at 07:11:51PM +0800, Keguang Zhang wrote:
> > Since commit 9fb23090658a ("rtc: Remove the
> > Loongson-1 RTC driver"), no one is using regs-rtc.h.
> > Therefore, remove this obsolete header file.
> >
> > Signed-off-by: Keguang Zhang <keguang.zhang@gmail.com>
> > ---
> >  .../include/asm/mach-loongson32/loongson1.h   |  1 -
> >  .../include/asm/mach-loongson32/regs-rtc.h    | 19 -------------------
> >  2 files changed, 20 deletions(-)
> >  delete mode 100644 arch/mips/include/asm/mach-loongson32/regs-rtc.h
> >
> > diff --git a/arch/mips/include/asm/mach-loongson32/loongson1.h b/arch/mips/include/asm/mach-loongson32/loongson1.h
> > index bc27fcee3176..84f45461c832 100644
> > --- a/arch/mips/include/asm/mach-loongson32/loongson1.h
> > +++ b/arch/mips/include/asm/mach-loongson32/loongson1.h
> > @@ -46,6 +46,5 @@
> >  #define LS1X_CLK_BASE                        0x1fe78030
> >
> >  #include <regs-mux.h>
> > -#include <regs-rtc.h>
> >
> >  #endif /* __ASM_MACH_LOONGSON32_LOONGSON1_H */
> > diff --git a/arch/mips/include/asm/mach-loongson32/regs-rtc.h b/arch/mips/include/asm/mach-loongson32/regs-rtc.h
> > deleted file mode 100644
> > index a3d096be1607..000000000000
> > --- a/arch/mips/include/asm/mach-loongson32/regs-rtc.h
> > +++ /dev/null
> > @@ -1,19 +0,0 @@
> > -/* SPDX-License-Identifier: GPL-2.0-or-later */
> > -/*
> > - * Copyright (c) 2016 Yang Ling <gnaygnil@gmail.com>
> > - *
> > - * Loongson 1 RTC timer Register Definitions.
> > - */
> > -
> > -#ifndef __ASM_MACH_LOONGSON32_REGS_RTC_H
> > -#define __ASM_MACH_LOONGSON32_REGS_RTC_H
> > -
> > -#define LS1X_RTC_REG(x) \
> > -             ((void __iomem *)KSEG1ADDR(LS1X_RTC_BASE + (x)))
> > -
> > -#define LS1X_RTC_CTRL        LS1X_RTC_REG(0x40)
> > -
> > -#define RTC_EXTCLK_OK        (BIT(5) | BIT(8))
> > -#define RTC_EXTCLK_EN        BIT(8)
> > -
> > -#endif /* __ASM_MACH_LOONGSON32_REGS_RTC_H */
> > --
> > 2.39.2
>
> I get these build error when this patch is applied:
>
> linux/arch/mips/loongson32/common/platform.c: In function ‘ls1x_rtc_set_extclk’:
> /local/tbogendoerfer/korg/linux/arch/mips/loongson32/common/platform.c:270:24: error: ‘LS1X_RTC_CTRL’ undeclared (first use in this function)
>   u32 val = __raw_readl(LS1X_RTC_CTRL);
>                         ^~~~~~~~~~~~~
> linux/arch/mips/loongson32/common/platform.c:270:24: note: each undeclared identifier is reported only once for each function it appears in
> /local/tbogendoerfer/korg/linux/arch/mips/loongson32/common/platform.c:272:14: error: ‘RTC_EXTCLK_OK’ undeclared (first use in this function)
>   if (!(val & RTC_EXTCLK_OK))
>               ^~~~~~~~~~~~~
> linux/arch/mips/loongson32/common/platform.c:273:22: error: ‘RTC_EXTCLK_EN’ undeclared (first use in this function)
>    __raw_writel(val | RTC_EXTCLK_EN, LS1X_RTC_CTRL);
>
> Thomas.
>

Sorry! I will send v2 to fix this ASAP.

> --
> Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
> good idea.                                                [ RFC1925, 2.3 ]
diff mbox series

Patch

diff --git a/arch/mips/include/asm/mach-loongson32/loongson1.h b/arch/mips/include/asm/mach-loongson32/loongson1.h
index bc27fcee3176..84f45461c832 100644
--- a/arch/mips/include/asm/mach-loongson32/loongson1.h
+++ b/arch/mips/include/asm/mach-loongson32/loongson1.h
@@ -46,6 +46,5 @@ 
 #define LS1X_CLK_BASE			0x1fe78030
 
 #include <regs-mux.h>
-#include <regs-rtc.h>
 
 #endif /* __ASM_MACH_LOONGSON32_LOONGSON1_H */
diff --git a/arch/mips/include/asm/mach-loongson32/regs-rtc.h b/arch/mips/include/asm/mach-loongson32/regs-rtc.h
deleted file mode 100644
index a3d096be1607..000000000000
--- a/arch/mips/include/asm/mach-loongson32/regs-rtc.h
+++ /dev/null
@@ -1,19 +0,0 @@ 
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Copyright (c) 2016 Yang Ling <gnaygnil@gmail.com>
- *
- * Loongson 1 RTC timer Register Definitions.
- */
-
-#ifndef __ASM_MACH_LOONGSON32_REGS_RTC_H
-#define __ASM_MACH_LOONGSON32_REGS_RTC_H
-
-#define LS1X_RTC_REG(x) \
-		((void __iomem *)KSEG1ADDR(LS1X_RTC_BASE + (x)))
-
-#define LS1X_RTC_CTRL	LS1X_RTC_REG(0x40)
-
-#define RTC_EXTCLK_OK	(BIT(5) | BIT(8))
-#define RTC_EXTCLK_EN	BIT(8)
-
-#endif /* __ASM_MACH_LOONGSON32_REGS_RTC_H */