Skip to contentSkip to conversation

clocksource: remove obsolete drivers

PATCH Applied Arnd Bergmann 7 participants 16 messages Jan 20, 2021 – Feb 10, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover clocksource: remove obsolete drivers

From: Arnd Bergmann <[email protected]>

A few Arm platforms are getting removed in v5.12, this removes the corresponding clocksource drivers.

Arnd Bergmann (4):
timer: remove u300 driver
timer: remove tango driver
timer: remove sirf atlas driver
timer: remove sirf prima driver

 .../timer/stericsson-u300-apptimer.txt        |  18 -
 drivers/clocksource/Kconfig                   |  27 --
 drivers/clocksource/Makefile                  |   4 -
 drivers/clocksource/timer-atlas7.c            | 281 -----------
 drivers/clocksource/timer-prima2.c            | 242 ----------
 drivers/clocksource/timer-tango-xtal.c        |  57 ---
 drivers/clocksource/timer-u300.c              | 457 ------------------
 7 files changed, 1086 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt
 delete mode 100644 drivers/clocksource/timer-atlas7.c
 delete mode 100644 drivers/clocksource/timer-prima2.c
 delete mode 100644 drivers/clocksource/timer-tango-xtal.c
 delete mode 100644 drivers/clocksource/timer-u300.c
Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

PATCH 1/4 timer: remove u300 driver

From: Arnd Bergmann <[email protected]>

The ST-Ericsson U300 platform is getting removed, so this driver is no longer needed.

---
 .../timer/stericsson-u300-apptimer.txt        |  18 -
 drivers/clocksource/Kconfig                   |   7 -
 drivers/clocksource/Makefile                  |   1 -
 drivers/clocksource/timer-u300.c              | 457 ------------------
 4 files changed, 483 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt
 delete mode 100644 drivers/clocksource/timer-u300.c
Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt deleted +0 -18
deleted file mode 100644
index 9499bc8ee9e3..000000000000
@@ -1,18 +0,0 @@
-ST-Ericsson U300 apptimer
-
-Required properties:
-
-- compatible : should be "stericsson,u300-apptimer"
-- reg : Specifies base physical address and size of the registers.
-- interrupts : A list of 4 interrupts; one for each subtimer. These
-  are, in order: OS (operating system), DD (device driver) both
-  adopted for EPOC/Symbian with two specific IRQs for these tasks,
-  then GP1 and GP2, which are general-purpose timers.
-
-Example:
-
-timer {
-	compatible = "stericsson,u300-apptimer";
-	reg = <0xc0014000 0x1000>;
-	interrupts = <24 25 26 27>;
-};
drivers/clocksource/Kconfig +0 -7
index 14c7c4712478..824a0f6b77d4 100644
@@ -216,13 +216,6 @@ config PRIMA2_TIMER
 	help
 	  Enables support for the Prima2 timer.
 
-config U300_TIMER
-	bool "U300 timer driver" if COMPILE_TEST
-	depends on ARM
-	select CLKSRC_MMIO
-	help
-	  Enables support for the U300 timer.
-
 config NSPIRE_TIMER
 	bool "NSpire timer driver" if COMPILE_TEST
 	select CLKSRC_MMIO
drivers/clocksource/Makefile +0 -1
index 3c75cbbf8533..41c154478a1a 100644
@@ -34,7 +34,6 @@ obj-$(CONFIG_ATLAS7_TIMER)	+= timer-atlas7.o
 obj-$(CONFIG_MXS_TIMER)		+= mxs_timer.o
 obj-$(CONFIG_CLKSRC_PXA)	+= timer-pxa.o
 obj-$(CONFIG_PRIMA2_TIMER)	+= timer-prima2.o
-obj-$(CONFIG_U300_TIMER)	+= timer-u300.o
 obj-$(CONFIG_SUN4I_TIMER)	+= timer-sun4i.o
 obj-$(CONFIG_SUN5I_HSTIMER)	+= timer-sun5i.o
 obj-$(CONFIG_MESON6_TIMER)	+= timer-meson6.o
drivers/clocksource/timer-u300.c deleted +0 -457

457 lines not on this page · raw message

Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Reviewed-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] timer: remove u300 driver

Quoted 7 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The ST-Ericsson U300 platform is getting removed, so this driver is no longer needed.

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

merge bot Applied
#3 lore raw

[tip: timers/core] clocksource/drivers/u300: Remove the u300 driver

In reply to Arnd Bergmann
The following commit has been merged into the timers/core branch of tip:

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     33105406764f7f13c5e7279826f77342c82c41b5
Gitweb:        https://git.kernel.org/tip/33105406764f7f13c5e7279826f77342c82c41b5
Author:        Arnd Bergmann <[email protected]>
AuthorDate:    Wed, 20 Jan 2021 14:15:56 +01:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Wed, 03 Feb 2021 09:10:24 +01:00

clocksource/drivers/u300: Remove the u300 driver

The ST-Ericsson U300 platform is getting removed, so this driver is no longer needed.

---
 Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt |  18 +---
 drivers/clocksource/Kconfig                                          |   7 +-
 drivers/clocksource/Makefile                                         |   1 +-
 drivers/clocksource/timer-u300.c                                     | 457 +----------------------------------------------------------------------
 4 files changed, 483 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt
 delete mode 100644 drivers/clocksource/timer-u300.c
Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt deleted +0 -18
deleted file mode 100644
index 9499bc8..0000000
@@ -1,18 +0,0 @@
-ST-Ericsson U300 apptimer
-
-Required properties:
-
-- compatible : should be "stericsson,u300-apptimer"
-- reg : Specifies base physical address and size of the registers.
-- interrupts : A list of 4 interrupts; one for each subtimer. These
-  are, in order: OS (operating system), DD (device driver) both
-  adopted for EPOC/Symbian with two specific IRQs for these tasks,
-  then GP1 and GP2, which are general-purpose timers.
-
-Example:
-
-timer {
-	compatible = "stericsson,u300-apptimer";
-	reg = <0xc0014000 0x1000>;
-	interrupts = <24 25 26 27>;
-};
drivers/clocksource/Kconfig +0 -7
index 6bf89e2..b26bb9e 100644
@@ -216,13 +216,6 @@ config PRIMA2_TIMER
 	help
 	  Enables support for the Prima2 timer.
 
-config U300_TIMER
-	bool "U300 timer driver" if COMPILE_TEST
-	depends on ARM
-	select CLKSRC_MMIO
-	help
-	  Enables support for the U300 timer.
-
 config NSPIRE_TIMER
 	bool "NSpire timer driver" if COMPILE_TEST
 	select CLKSRC_MMIO
drivers/clocksource/Makefile +0 -1
index 0817338..ce8a3c0 100644
@@ -34,7 +34,6 @@ obj-$(CONFIG_ATLAS7_TIMER)	+= timer-atlas7.o
 obj-$(CONFIG_MXS_TIMER)		+= mxs_timer.o
 obj-$(CONFIG_CLKSRC_PXA)	+= timer-pxa.o
 obj-$(CONFIG_PRIMA2_TIMER)	+= timer-prima2.o
-obj-$(CONFIG_U300_TIMER)	+= timer-u300.o
 obj-$(CONFIG_SUN4I_TIMER)	+= timer-sun4i.o
 obj-$(CONFIG_SUN5I_HSTIMER)	+= timer-sun5i.o
 obj-$(CONFIG_MESON6_TIMER)	+= timer-meson6.o
drivers/clocksource/timer-u300.c deleted +0 -457

457 lines not on this page · raw message

#4 lore raw

PATCH 2/4 timer: remove tango driver

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The tango platform is getting removed, so the driver is no longer needed.

Cc Marc Gonzalez <[email protected]>
Cc Mans Rullgard <[email protected]>
---
 drivers/clocksource/Kconfig            |  8 ----
 drivers/clocksource/Makefile           |  1 -
 drivers/clocksource/timer-tango-xtal.c | 57 --------------------------
 3 files changed, 66 deletions(-)
 delete mode 100644 drivers/clocksource/timer-tango-xtal.c
drivers/clocksource/Kconfig +0 -8
index 824a0f6b77d4..1feadd067677 100644
@@ -560,14 +560,6 @@ config CLKSRC_MIPS_GIC
 	select CLOCKSOURCE_WATCHDOG
 	select TIMER_OF
 
-config CLKSRC_TANGO_XTAL
-	bool "Clocksource for Tango SoC" if COMPILE_TEST
-	depends on ARM
-	select TIMER_OF
-	select CLKSRC_MMIO
-	help
-	  This enables the clocksource for Tango SoC.
-
 config CLKSRC_PXA
 	bool "Clocksource for PXA or SA-11x0 platform" if COMPILE_TEST
 	depends on HAS_IOMEM
drivers/clocksource/Makefile +0 -1
index 41c154478a1a..1089f2ed8560 100644
@@ -72,7 +72,6 @@ obj-$(CONFIG_KEYSTONE_TIMER)		+= timer-keystone.o
 obj-$(CONFIG_INTEGRATOR_AP_TIMER)	+= timer-integrator-ap.o
 obj-$(CONFIG_CLKSRC_VERSATILE)		+= timer-versatile.o
 obj-$(CONFIG_CLKSRC_MIPS_GIC)		+= mips-gic-timer.o
-obj-$(CONFIG_CLKSRC_TANGO_XTAL)		+= timer-tango-xtal.o
 obj-$(CONFIG_CLKSRC_IMX_GPT)		+= timer-imx-gpt.o
 obj-$(CONFIG_CLKSRC_IMX_TPM)		+= timer-imx-tpm.o
 obj-$(CONFIG_TIMER_IMX_SYS_CTR)		+= timer-imx-sysctr.o
drivers/clocksource/timer-tango-xtal.c deleted +0 -57

57 lines not on this page · raw message

Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Acked-by on v1 2/4
#5 lore raw

Re: [PATCH 2/4] timer: remove tango driver

Quoted 8 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The tango platform is getting removed, so the driver is no longer needed.

Cc Marc Gonzalez <[email protected]>
Cc Mans Rullgard <[email protected]>
Quoted 105 lines
---
 drivers/clocksource/Kconfig            |  8 ----
 drivers/clocksource/Makefile           |  1 -
 drivers/clocksource/timer-tango-xtal.c | 57 --------------------------
 3 files changed, 66 deletions(-)
 delete mode 100644 drivers/clocksource/timer-tango-xtal.c
drivers/clocksource/Kconfig +0 -8
index 824a0f6b77d4..1feadd067677 100644
@@ -560,14 +560,6 @@ config CLKSRC_MIPS_GIC
 	select CLOCKSOURCE_WATCHDOG
 	select TIMER_OF
 
-config CLKSRC_TANGO_XTAL
-	bool "Clocksource for Tango SoC" if COMPILE_TEST
-	depends on ARM
-	select TIMER_OF
-	select CLKSRC_MMIO
-	help
-	  This enables the clocksource for Tango SoC.
-
 config CLKSRC_PXA
 	bool "Clocksource for PXA or SA-11x0 platform" if COMPILE_TEST
 	depends on HAS_IOMEM
drivers/clocksource/Makefile +0 -1
index 41c154478a1a..1089f2ed8560 100644
@@ -72,7 +72,6 @@ obj-$(CONFIG_KEYSTONE_TIMER)		+= timer-keystone.o
 obj-$(CONFIG_INTEGRATOR_AP_TIMER)	+= timer-integrator-ap.o
 obj-$(CONFIG_CLKSRC_VERSATILE)		+= timer-versatile.o
 obj-$(CONFIG_CLKSRC_MIPS_GIC)		+= mips-gic-timer.o
-obj-$(CONFIG_CLKSRC_TANGO_XTAL)		+= timer-tango-xtal.o
 obj-$(CONFIG_CLKSRC_IMX_GPT)		+= timer-imx-gpt.o
 obj-$(CONFIG_CLKSRC_IMX_TPM)		+= timer-imx-tpm.o
 obj-$(CONFIG_TIMER_IMX_SYS_CTR)		+= timer-imx-sysctr.o
drivers/clocksource/timer-tango-xtal.c deleted +0 -57
deleted file mode 100644
index 3f94e454ef99..000000000000
@@ -1,57 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <linux/clocksource.h>
-#include <linux/sched_clock.h>
-#include <linux/of_address.h>
-#include <linux/printk.h>
-#include <linux/delay.h>
-#include <linux/init.h>
-#include <linux/clk.h>
-
-static void __iomem *xtal_in_cnt;
-static struct delay_timer delay_timer;
-
-static unsigned long notrace read_xtal_counter(void)
-{
-	return readl_relaxed(xtal_in_cnt);
-}
-
-static u64 notrace read_sched_clock(void)
-{
-	return read_xtal_counter();
-}
-
-static int __init tango_clocksource_init(struct device_node *np)
-{
-	struct clk *clk;
-	int xtal_freq, ret;
-
-	xtal_in_cnt = of_iomap(np, 0);
-	if (xtal_in_cnt == NULL) {
-		pr_err("%pOF: invalid address\n", np);
-		return -ENXIO;
-	}
-
-	clk = of_clk_get(np, 0);
-	if (IS_ERR(clk)) {
-		pr_err("%pOF: invalid clock\n", np);
-		return PTR_ERR(clk);
-	}
-
-	xtal_freq = clk_get_rate(clk);
-	delay_timer.freq = xtal_freq;
-	delay_timer.read_current_timer = read_xtal_counter;
-
-	ret = clocksource_mmio_init(xtal_in_cnt, "tango-xtal", xtal_freq, 350,
-				    32, clocksource_mmio_readl_up);
-	if (ret) {
-		pr_err("%pOF: registration failed\n", np);
-		return ret;
-	}
-
-	sched_clock_register(read_sched_clock, 32, xtal_freq);
-	register_current_timer_delay(&delay_timer);
-
-	return 0;
-}
-
-TIMER_OF_DECLARE(tango, "sigma,tick-counter", tango_clocksource_init);
Signature · 1 line
2.29.2
Signature · 6 lines
Måns Rullgård

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
merge bot Applied
#6 lore raw

[tip: timers/core] clocksource/drivers/tango: Remove tango driver

In reply to Arnd Bergmann
The following commit has been merged into the timers/core branch of tip:

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     8fdb44176928fb3ef3e10d97eaf1aed82c90bd58
Gitweb:        https://git.kernel.org/tip/8fdb44176928fb3ef3e10d97eaf1aed82c90bd58
Author:        Arnd Bergmann <[email protected]>
AuthorDate:    Wed, 20 Jan 2021 14:15:57 +01:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Wed, 03 Feb 2021 09:11:35 +01:00

clocksource/drivers/tango: Remove tango driver

The tango platform is getting removed, so the driver is no longer needed.

---
 drivers/clocksource/Kconfig            |  8 +----
 drivers/clocksource/Makefile           |  1 +-
 drivers/clocksource/timer-tango-xtal.c | 57 +-------------------------
 3 files changed, 66 deletions(-)
 delete mode 100644 drivers/clocksource/timer-tango-xtal.c
drivers/clocksource/Kconfig +0 -8
index b26bb9e..b5250e4 100644
@@ -551,14 +551,6 @@ config CLKSRC_MIPS_GIC
 	select CLOCKSOURCE_WATCHDOG
 	select TIMER_OF
 
-config CLKSRC_TANGO_XTAL
-	bool "Clocksource for Tango SoC" if COMPILE_TEST
-	depends on ARM
-	select TIMER_OF
-	select CLKSRC_MMIO
-	help
-	  This enables the clocksource for Tango SoC.
-
 config CLKSRC_PXA
 	bool "Clocksource for PXA or SA-11x0 platform" if COMPILE_TEST
 	depends on HAS_IOMEM
drivers/clocksource/Makefile +0 -1
index ce8a3c0..1b05f03 100644
@@ -71,7 +71,6 @@ obj-$(CONFIG_KEYSTONE_TIMER)		+= timer-keystone.o
 obj-$(CONFIG_INTEGRATOR_AP_TIMER)	+= timer-integrator-ap.o
 obj-$(CONFIG_CLKSRC_VERSATILE)		+= timer-versatile.o
 obj-$(CONFIG_CLKSRC_MIPS_GIC)		+= mips-gic-timer.o
-obj-$(CONFIG_CLKSRC_TANGO_XTAL)		+= timer-tango-xtal.o
 obj-$(CONFIG_CLKSRC_IMX_GPT)		+= timer-imx-gpt.o
 obj-$(CONFIG_CLKSRC_IMX_TPM)		+= timer-imx-tpm.o
 obj-$(CONFIG_TIMER_IMX_SYS_CTR)		+= timer-imx-sysctr.o
drivers/clocksource/timer-tango-xtal.c deleted +0 -57

57 lines not on this page · raw message

#7 lore raw

PATCH 3/4 timer: remove sirf atlas driver

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The CSR SiRF prima2/atlas platforms are getting removed, so this driver is no longer needed.

---
 drivers/clocksource/Kconfig        |   6 -
 drivers/clocksource/Makefile       |   1 -
 drivers/clocksource/timer-atlas7.c | 281 -----------------------------
 3 files changed, 288 deletions(-)
 delete mode 100644 drivers/clocksource/timer-atlas7.c
drivers/clocksource/Kconfig +0 -6
index 1feadd067677..ac6de462591a 100644
@@ -197,12 +197,6 @@ config CLPS711X_TIMER
 	help
 	  Enables support for the Cirrus Logic PS711 timer.
 
-config ATLAS7_TIMER
-	bool "Atlas7 timer driver" if COMPILE_TEST
-	select CLKSRC_MMIO
-	help
-	  Enables support for the Atlas7 timer.
-
 config MXS_TIMER
 	bool "MXS timer driver" if COMPILE_TEST
 	select CLKSRC_MMIO
drivers/clocksource/Makefile +0 -1
index 1089f2ed8560..49496637700f 100644
@@ -30,7 +30,6 @@ obj-$(CONFIG_ARMADA_370_XP_TIMER)	+= timer-armada-370-xp.o
 obj-$(CONFIG_ORION_TIMER)	+= timer-orion.o
 obj-$(CONFIG_BCM2835_TIMER)	+= bcm2835_timer.o
 obj-$(CONFIG_CLPS711X_TIMER)	+= clps711x-timer.o
-obj-$(CONFIG_ATLAS7_TIMER)	+= timer-atlas7.o
 obj-$(CONFIG_MXS_TIMER)		+= mxs_timer.o
 obj-$(CONFIG_CLKSRC_PXA)	+= timer-pxa.o
 obj-$(CONFIG_PRIMA2_TIMER)	+= timer-prima2.o
drivers/clocksource/timer-atlas7.c deleted +0 -281

281 lines not on this page · raw message

Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Acked-by on v1 3/4
#8 lore raw

Re: [PATCH 3/4] timer: remove sirf atlas driver

Quoted 8 lines · Arnd Bergmann <[email protected]> 于2021年1月21日周四 上午2:16写道:

From: Arnd Bergmann <[email protected]>

The CSR SiRF prima2/atlas platforms are getting removed, so this driver is no longer needed.

Quoted 324 lines
---
 drivers/clocksource/Kconfig        |   6 -
 drivers/clocksource/Makefile       |   1 -
 drivers/clocksource/timer-atlas7.c | 281 -----------------------------
 3 files changed, 288 deletions(-)
 delete mode 100644 drivers/clocksource/timer-atlas7.c
drivers/clocksource/Kconfig +0 -6
index 1feadd067677..ac6de462591a 100644
@@ -197,12 +197,6 @@ config CLPS711X_TIMER
        help
          Enables support for the Cirrus Logic PS711 timer.
 
-config ATLAS7_TIMER
-       bool "Atlas7 timer driver" if COMPILE_TEST
-       select CLKSRC_MMIO
-       help
-         Enables support for the Atlas7 timer.
-
 config MXS_TIMER
        bool "MXS timer driver" if COMPILE_TEST
        select CLKSRC_MMIO
drivers/clocksource/Makefile +0 -1
index 1089f2ed8560..49496637700f 100644
@@ -30,7 +30,6 @@ obj-$(CONFIG_ARMADA_370_XP_TIMER)     += timer-armada-370-xp.o
 obj-$(CONFIG_ORION_TIMER)      += timer-orion.o
 obj-$(CONFIG_BCM2835_TIMER)    += bcm2835_timer.o
 obj-$(CONFIG_CLPS711X_TIMER)   += clps711x-timer.o
-obj-$(CONFIG_ATLAS7_TIMER)     += timer-atlas7.o
 obj-$(CONFIG_MXS_TIMER)                += mxs_timer.o
 obj-$(CONFIG_CLKSRC_PXA)       += timer-pxa.o
 obj-$(CONFIG_PRIMA2_TIMER)     += timer-prima2.o
drivers/clocksource/timer-atlas7.c deleted +0 -282
deleted file mode 100644
index c21c91c2bc56..000000000000
@@ -1,281 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * System timer for CSR SiRFprimaII
- *
- * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
- */
-
-#include <linux/kernel.h>
-#include <linux/interrupt.h>
-#include <linux/clockchips.h>
-#include <linux/clocksource.h>
-#include <linux/cpu.h>
-#include <linux/bitops.h>
-#include <linux/irq.h>
-#include <linux/clk.h>
-#include <linux/slab.h>
-#include <linux/of.h>
-#include <linux/of_irq.h>
-#include <linux/of_address.h>
-#include <linux/sched_clock.h>
-
-#define SIRFSOC_TIMER_32COUNTER_0_CTRL                 0x0000
-#define SIRFSOC_TIMER_32COUNTER_1_CTRL                 0x0004
-#define SIRFSOC_TIMER_MATCH_0                          0x0018
-#define SIRFSOC_TIMER_MATCH_1                          0x001c
-#define SIRFSOC_TIMER_COUNTER_0                                0x0048
-#define SIRFSOC_TIMER_COUNTER_1                                0x004c
-#define SIRFSOC_TIMER_INTR_STATUS                      0x0060
-#define SIRFSOC_TIMER_WATCHDOG_EN                      0x0064
-#define SIRFSOC_TIMER_64COUNTER_CTRL                   0x0068
-#define SIRFSOC_TIMER_64COUNTER_LO                     0x006c
-#define SIRFSOC_TIMER_64COUNTER_HI                     0x0070
-#define SIRFSOC_TIMER_64COUNTER_LOAD_LO                        0x0074
-#define SIRFSOC_TIMER_64COUNTER_LOAD_HI                        0x0078
-#define SIRFSOC_TIMER_64COUNTER_RLATCHED_LO            0x007c
-#define SIRFSOC_TIMER_64COUNTER_RLATCHED_HI            0x0080
-
-#define SIRFSOC_TIMER_REG_CNT 6
-
-static unsigned long atlas7_timer_rate;
-
-static const u32 sirfsoc_timer_reg_list[SIRFSOC_TIMER_REG_CNT] = {
-       SIRFSOC_TIMER_WATCHDOG_EN,
-       SIRFSOC_TIMER_32COUNTER_0_CTRL,
-       SIRFSOC_TIMER_32COUNTER_1_CTRL,
-       SIRFSOC_TIMER_64COUNTER_CTRL,
-       SIRFSOC_TIMER_64COUNTER_RLATCHED_LO,
-       SIRFSOC_TIMER_64COUNTER_RLATCHED_HI,
-};
-
-static u32 sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT];
-
-static void __iomem *sirfsoc_timer_base;
-
-/* disable count and interrupt */
-static inline void sirfsoc_timer_count_disable(int idx)
-{
-       writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx) & ~0x7,
-               sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx);
-}
-
-/* enable count and interrupt */
-static inline void sirfsoc_timer_count_enable(int idx)
-{
-       writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx) | 0x3,
-               sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx);
-}
-
-/* timer interrupt handler */
-static irqreturn_t sirfsoc_timer_interrupt(int irq, void *dev_id)
-{
-       struct clock_event_device *ce = dev_id;
-       int cpu = smp_processor_id();
-
-       /* clear timer interrupt */
-       writel_relaxed(BIT(cpu), sirfsoc_timer_base + SIRFSOC_TIMER_INTR_STATUS);
-
-       if (clockevent_state_oneshot(ce))
-               sirfsoc_timer_count_disable(cpu);
-
-       ce->event_handler(ce);
-
-       return IRQ_HANDLED;
-}
-
-/* read 64-bit timer counter */
-static u64 sirfsoc_timer_read(struct clocksource *cs)
-{
-       u64 cycles;
-
-       writel_relaxed((readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL) |
-                       BIT(0)) & ~BIT(1), sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
-
-       cycles = readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_RLATCHED_HI);
-       cycles = (cycles << 32) | readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_RLATCHED_LO);
-
-       return cycles;
-}
-
-static int sirfsoc_timer_set_next_event(unsigned long delta,
-       struct clock_event_device *ce)
-{
-       int cpu = smp_processor_id();
-
-       /* disable timer first, then modify the related registers */
-       sirfsoc_timer_count_disable(cpu);
-
-       writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_0 +
-               4 * cpu);
-       writel_relaxed(delta, sirfsoc_timer_base + SIRFSOC_TIMER_MATCH_0 +
-               4 * cpu);
-
-       /* enable the tick */
-       sirfsoc_timer_count_enable(cpu);
-
-       return 0;
-}
-
-/* Oneshot is enabled in set_next_event */
-static int sirfsoc_timer_shutdown(struct clock_event_device *evt)
-{
-       sirfsoc_timer_count_disable(smp_processor_id());
-       return 0;
-}
-
-static void sirfsoc_clocksource_suspend(struct clocksource *cs)
-{
-       int i;
-
-       for (i = 0; i < SIRFSOC_TIMER_REG_CNT; i++)
-               sirfsoc_timer_reg_val[i] = readl_relaxed(sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);
-}
-
-static void sirfsoc_clocksource_resume(struct clocksource *cs)
-{
-       int i;
-
-       for (i = 0; i < SIRFSOC_TIMER_REG_CNT - 2; i++)
-               writel_relaxed(sirfsoc_timer_reg_val[i], sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);
-
-       writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 2],
-               sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_LO);
-       writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 1],
-               sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_HI);
-
-       writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL) |
-               BIT(1) | BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
-}
-
-static struct clock_event_device __percpu *sirfsoc_clockevent;
-
-static struct clocksource sirfsoc_clocksource = {
-       .name = "sirfsoc_clocksource",
-       .rating = 200,
-       .mask = CLOCKSOURCE_MASK(64),
-       .flags = CLOCK_SOURCE_IS_CONTINUOUS,
-       .read = sirfsoc_timer_read,
-       .suspend = sirfsoc_clocksource_suspend,
-       .resume = sirfsoc_clocksource_resume,
-};
-
-static unsigned int sirfsoc_timer_irq, sirfsoc_timer1_irq;
-
-static int sirfsoc_local_timer_starting_cpu(unsigned int cpu)
-{
-       struct clock_event_device *ce = per_cpu_ptr(sirfsoc_clockevent, cpu);
-       unsigned int irq;
-       const char *name;
-
-       if (cpu == 0) {
-               irq = sirfsoc_timer_irq;
-               name = "sirfsoc_timer0";
-       } else {
-               irq = sirfsoc_timer1_irq;
-               name = "sirfsoc_timer1";
-       }
-
-       ce->irq = irq;
-       ce->name = "local_timer";
-       ce->features = CLOCK_EVT_FEAT_ONESHOT;
-       ce->rating = 200;
-       ce->set_state_shutdown = sirfsoc_timer_shutdown;
-       ce->set_state_oneshot = sirfsoc_timer_shutdown;
-       ce->tick_resume = sirfsoc_timer_shutdown;
-       ce->set_next_event = sirfsoc_timer_set_next_event;
-       clockevents_calc_mult_shift(ce, atlas7_timer_rate, 60);
-       ce->max_delta_ns = clockevent_delta2ns(-2, ce);
-       ce->max_delta_ticks = (unsigned long)-2;
-       ce->min_delta_ns = clockevent_delta2ns(2, ce);
-       ce->min_delta_ticks = 2;
-       ce->cpumask = cpumask_of(cpu);
-
-       BUG_ON(request_irq(ce->irq, sirfsoc_timer_interrupt,
-                          IRQF_TIMER | IRQF_NOBALANCING, name, ce));
-       irq_force_affinity(ce->irq, cpumask_of(cpu));
-
-       clockevents_register_device(ce);
-       return 0;
-}
-
-static int sirfsoc_local_timer_dying_cpu(unsigned int cpu)
-{
-       struct clock_event_device *ce = per_cpu_ptr(sirfsoc_clockevent, cpu);
-
-       sirfsoc_timer_count_disable(1);
-
-       if (cpu == 0)
-               free_irq(sirfsoc_timer_irq, ce);
-       else
-               free_irq(sirfsoc_timer1_irq, ce);
-       return 0;
-}
-
-static int __init sirfsoc_clockevent_init(void)
-{
-       sirfsoc_clockevent = alloc_percpu(struct clock_event_device);
-       BUG_ON(!sirfsoc_clockevent);
-
-       /* Install and invoke hotplug callbacks */
-       return cpuhp_setup_state(CPUHP_AP_MARCO_TIMER_STARTING,
-                                "clockevents/marco:starting",
-                                sirfsoc_local_timer_starting_cpu,
-                                sirfsoc_local_timer_dying_cpu);
-}
-
-/* initialize the kernel jiffy timer source */
-static int __init sirfsoc_atlas7_timer_init(struct device_node *np)
-{
-       struct clk *clk;
-
-       clk = of_clk_get(np, 0);
-       BUG_ON(IS_ERR(clk));
-
-       BUG_ON(clk_prepare_enable(clk));
-
-       atlas7_timer_rate = clk_get_rate(clk);
-
-       /* timer dividers: 0, not divided */
-       writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
-       writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL);
-       writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_1_CTRL);
-
-       /* Initialize timer counters to 0 */
-       writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_LO);
-       writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_HI);
-       writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL) |
-               BIT(1) | BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
-       writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_0);
-       writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_1);
-
-       /* Clear all interrupts */
-       writel_relaxed(0xFFFF, sirfsoc_timer_base + SIRFSOC_TIMER_INTR_STATUS);
-
-       BUG_ON(clocksource_register_hz(&sirfsoc_clocksource, atlas7_timer_rate));
-
-       return sirfsoc_clockevent_init();
-}
-
-static int __init sirfsoc_of_timer_init(struct device_node *np)
-{
-       sirfsoc_timer_base = of_iomap(np, 0);
-       if (!sirfsoc_timer_base) {
-               pr_err("unable to map timer cpu registers\n");
-               return -ENXIO;
-       }
-
-       sirfsoc_timer_irq = irq_of_parse_and_map(np, 0);
-       if (!sirfsoc_timer_irq) {
-               pr_err("No irq passed for timer0 via DT\n");
-               return -EINVAL;
-       }
-
-       sirfsoc_timer1_irq = irq_of_parse_and_map(np, 1);
-       if (!sirfsoc_timer1_irq) {
-               pr_err("No irq passed for timer1 via DT\n");
-               return -EINVAL;
-       }
-
-       return sirfsoc_atlas7_timer_init(np);
-}
-TIMER_OF_DECLARE(sirfsoc_atlas7_timer, "sirf,atlas7-tick", sirfsoc_of_timer_init);
--
Quoted 2 lines

2.29.2

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

merge bot Applied
#9 lore raw

[tip: timers/core] clocksource/drivers/atlas: Remove sirf atlas driver

In reply to Arnd Bergmann
The following commit has been merged into the timers/core branch of tip:

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     446262b27285e86bfc078d5602d7e047a351d536
Gitweb:        https://git.kernel.org/tip/446262b27285e86bfc078d5602d7e047a351d536
Author:        Arnd Bergmann <[email protected]>
AuthorDate:    Wed, 20 Jan 2021 14:15:58 +01:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Wed, 03 Feb 2021 09:12:28 +01:00

clocksource/drivers/atlas: Remove sirf atlas driver

The CSR SiRF prima2/atlas platforms are getting removed, so this driver is no longer needed.

---
 drivers/clocksource/Kconfig        |   6 +-
 drivers/clocksource/Makefile       |   1 +-
 drivers/clocksource/timer-atlas7.c | 281 +----------------------------
 3 files changed, 288 deletions(-)
 delete mode 100644 drivers/clocksource/timer-atlas7.c
drivers/clocksource/Kconfig +0 -6
index b5250e4..4a17957 100644
@@ -197,12 +197,6 @@ config CLPS711X_TIMER
 	help
 	  Enables support for the Cirrus Logic PS711 timer.
 
-config ATLAS7_TIMER
-	bool "Atlas7 timer driver" if COMPILE_TEST
-	select CLKSRC_MMIO
-	help
-	  Enables support for the Atlas7 timer.
-
 config MXS_TIMER
 	bool "MXS timer driver" if COMPILE_TEST
 	select CLKSRC_MMIO
drivers/clocksource/Makefile +0 -1
index 1b05f03..8c4ab8c 100644
@@ -30,7 +30,6 @@ obj-$(CONFIG_ARMADA_370_XP_TIMER)	+= timer-armada-370-xp.o
 obj-$(CONFIG_ORION_TIMER)	+= timer-orion.o
 obj-$(CONFIG_BCM2835_TIMER)	+= bcm2835_timer.o
 obj-$(CONFIG_CLPS711X_TIMER)	+= clps711x-timer.o
-obj-$(CONFIG_ATLAS7_TIMER)	+= timer-atlas7.o
 obj-$(CONFIG_MXS_TIMER)		+= mxs_timer.o
 obj-$(CONFIG_CLKSRC_PXA)	+= timer-pxa.o
 obj-$(CONFIG_PRIMA2_TIMER)	+= timer-prima2.o
drivers/clocksource/timer-atlas7.c deleted +0 -281

281 lines not on this page · raw message

#10 lore raw

PATCH 4/4 timer: remove sirf prima driver

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The CSR SiRF prima2/atlas platforms are getting removed, so this driver is no longer needed.

---
 drivers/clocksource/Kconfig        |   6 -
 drivers/clocksource/Makefile       |   1 -
 drivers/clocksource/timer-prima2.c | 242 -----------------------------
 3 files changed, 249 deletions(-)
 delete mode 100644 drivers/clocksource/timer-prima2.c
drivers/clocksource/Kconfig +0 -6
index ac6de462591a..a2d932825975 100644
@@ -204,12 +204,6 @@ config MXS_TIMER
 	help
 	  Enables support for the MXS timer.
 
-config PRIMA2_TIMER
-	bool "Prima2 timer driver" if COMPILE_TEST
-	select CLKSRC_MMIO
-	help
-	  Enables support for the Prima2 timer.
-
 config NSPIRE_TIMER
 	bool "NSpire timer driver" if COMPILE_TEST
 	select CLKSRC_MMIO
drivers/clocksource/Makefile +0 -1
index 49496637700f..d6ffe3d77d7e 100644
@@ -32,7 +32,6 @@ obj-$(CONFIG_BCM2835_TIMER)	+= bcm2835_timer.o
 obj-$(CONFIG_CLPS711X_TIMER)	+= clps711x-timer.o
 obj-$(CONFIG_MXS_TIMER)		+= mxs_timer.o
 obj-$(CONFIG_CLKSRC_PXA)	+= timer-pxa.o
-obj-$(CONFIG_PRIMA2_TIMER)	+= timer-prima2.o
 obj-$(CONFIG_SUN4I_TIMER)	+= timer-sun4i.o
 obj-$(CONFIG_SUN5I_HSTIMER)	+= timer-sun5i.o
 obj-$(CONFIG_MESON6_TIMER)	+= timer-meson6.o
drivers/clocksource/timer-prima2.c deleted +0 -242

242 lines not on this page · raw message

Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#11 lore raw

Re: [PATCH 4/4] timer: remove sirf prima driver

Quoted 4 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The CSR SiRF prima2/atlas platforms are getting removed, so this driver is no longer needed.

Should this platform really be removed?

While I followed the removal thread just a little, isn't prima still in use in various GPS handhelds?

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#12 lore raw

Re: [PATCH 4/4] timer: remove sirf prima driver

Quoted 11 lines · Joe Perches
Quoted 4 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The CSR SiRF prima2/atlas platforms are getting removed, so this driver is no longer needed.

Should this platform really be removed?

While I followed the removal thread just a little, isn't prima still in use in various GPS handhelds?

I'm not aware of anyone running mainline Linux on those, as I said in the platform removal patch[1] description, there have not been any contributions to third-party machine support, the only boards that ever booted a mainline kernel were the evaluation boards.

If you have any information on hobbyist users of this platform, let me know.

Arnd

[1] https://lore.kernel.org/linux-arm-kernel/[email protected]/T/#u

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Acked-by on v1 4/4
#13 lore raw

Re: [PATCH 4/4] timer: remove sirf prima driver

In reply to Arnd Bergmann
Quoted 8 lines · Arnd Bergmann <[email protected]> 于2021年1月21日周四 上午2:16写道:

From: Arnd Bergmann <[email protected]>

The CSR SiRF prima2/atlas platforms are getting removed, so this driver is no longer needed.

Quoted 7 lines
---
 drivers/clocksource/Kconfig        |   6 -
 drivers/clocksource/Makefile       |   1 -
 drivers/clocksource/timer-prima2.c | 242 -----------------------------
 3 files changed, 249 deletions(-)
 delete mode 100644 drivers/clocksource/timer-prima2.c

Thanks
Barry

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

merge bot Applied
#14 lore raw

[tip: timers/core] clocksource/drivers/prima: Remove sirf prima driver

In reply to Arnd Bergmann
The following commit has been merged into the timers/core branch of tip:

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     a8d80235808c8359b614412da76dc10518ea9090
Gitweb:        https://git.kernel.org/tip/a8d80235808c8359b614412da76dc10518ea9090
Author:        Arnd Bergmann <[email protected]>
AuthorDate:    Wed, 20 Jan 2021 14:15:59 +01:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Wed, 03 Feb 2021 09:13:46 +01:00

clocksource/drivers/prima: Remove sirf prima driver

The CSR SiRF prima2/atlas platforms are getting removed, so this driver is no longer needed.

---
 drivers/clocksource/Kconfig        |   6 +-
 drivers/clocksource/Makefile       |   1 +-
 drivers/clocksource/timer-prima2.c | 242 +----------------------------
 3 files changed, 249 deletions(-)
 delete mode 100644 drivers/clocksource/timer-prima2.c
drivers/clocksource/Kconfig +0 -6
index 4a17957..05f6d60 100644
@@ -204,12 +204,6 @@ config MXS_TIMER
 	help
 	  Enables support for the MXS timer.
 
-config PRIMA2_TIMER
-	bool "Prima2 timer driver" if COMPILE_TEST
-	select CLKSRC_MMIO
-	help
-	  Enables support for the Prima2 timer.
-
 config NSPIRE_TIMER
 	bool "NSpire timer driver" if COMPILE_TEST
 	select CLKSRC_MMIO
drivers/clocksource/Makefile +0 -1
index 8c4ab8c..c17ee32 100644
@@ -32,7 +32,6 @@ obj-$(CONFIG_BCM2835_TIMER)	+= bcm2835_timer.o
 obj-$(CONFIG_CLPS711X_TIMER)	+= clps711x-timer.o
 obj-$(CONFIG_MXS_TIMER)		+= mxs_timer.o
 obj-$(CONFIG_CLKSRC_PXA)	+= timer-pxa.o
-obj-$(CONFIG_PRIMA2_TIMER)	+= timer-prima2.o
 obj-$(CONFIG_SUN4I_TIMER)	+= timer-sun4i.o
 obj-$(CONFIG_SUN5I_HSTIMER)	+= timer-sun5i.o
 obj-$(CONFIG_MESON6_TIMER)	+= timer-meson6.o
drivers/clocksource/timer-prima2.c deleted +0 -242

242 lines not on this page · raw message

#15 lore raw
In reply to Arnd Bergmann

Applied, thanks

Quoted 28 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

A few Arm platforms are getting removed in v5.12, this removes the corresponding clocksource drivers.

Arnd Bergmann (4):
timer: remove u300 driver
timer: remove tango driver
timer: remove sirf atlas driver
timer: remove sirf prima driver

 .../timer/stericsson-u300-apptimer.txt        |  18 -
 drivers/clocksource/Kconfig                   |  27 --
 drivers/clocksource/Makefile                  |   4 -
 drivers/clocksource/timer-atlas7.c            | 281 -----------
 drivers/clocksource/timer-prima2.c            | 242 ----------
 drivers/clocksource/timer-tango-xtal.c        |  57 ---
 drivers/clocksource/timer-u300.c              | 457 ------------------
 7 files changed, 1086 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt
 delete mode 100644 drivers/clocksource/timer-atlas7.c
 delete mode 100644 drivers/clocksource/timer-prima2.c
 delete mode 100644 drivers/clocksource/timer-tango-xtal.c
 delete mode 100644 drivers/clocksource/timer-u300.c
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog