Merge tag 'timers-core-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull clockevent/clocksource updates from Thomas Gleixner:

- Device tree bindings for MT8186

- Tell the kernel that the RISC-V SBI timer stops in deeper power
states

- Make device tree parsing in sp804 more robust

- Dead code removal and tiny fixes here and there

- Add the missing SPDX identifiers

* tag 'timers-core-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value
clocksource/drivers/timer-ti-dm: Remove unnecessary NULL check
clocksource/drivers/timer-sun5i: Convert to SPDX identifier
clocksource/drivers/timer-sun4i: Convert to SPDX identifier
clocksource/drivers/pistachio: Convert to SPDX identifier
clocksource/drivers/orion: Convert to SPDX identifier
clocksource/drivers/lpc32xx: Convert to SPDX identifier
clocksource/drivers/digicolor: Convert to SPDX identifier
clocksource/drivers/armada-370-xp: Convert to SPDX identifier
clocksource/drivers/mips-gic-timer: Convert to SPDX identifier
clocksource/drivers/jcore: Convert to SPDX identifier
clocksource/drivers/bcm_kona: Convert to SPDX identifier
clocksource/drivers/sp804: Avoid error on multiple instances
clocksource/drivers/riscv: Events are stopped during CPU suspend
clocksource/drivers/ixp4xx: Drop boardfile probe path
dt-bindings: timer: Add compatible for Mediatek MT8186

+22 -98
+1
Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt
··· 23 23 24 24 For those SoCs that use SYST 25 25 * "mediatek,mt8183-timer" for MT8183 compatible timers (SYST) 26 + * "mediatek,mt8186-timer" for MT8186 compatible timers (SYST) 26 27 * "mediatek,mt8192-timer" for MT8192 compatible timers (SYST) 27 28 * "mediatek,mt8195-timer" for MT8195 compatible timers (SYST) 28 29 * "mediatek,mt7629-timer" for MT7629 compatible timers (SYST)
+1 -1
drivers/clocksource/Kconfig
··· 80 80 bool "Intel XScale IXP4xx timer driver" if COMPILE_TEST 81 81 depends on HAS_IOMEM 82 82 select CLKSRC_MMIO 83 - select TIMER_OF if OF 83 + select TIMER_OF 84 84 help 85 85 Enables support for the Intel XScale IXP4xx SoC timer. 86 86
+2 -12
drivers/clocksource/bcm_kona_timer.c
··· 1 - /* 2 - * Copyright (C) 2012 Broadcom Corporation 3 - * 4 - * This program is free software; you can redistribute it and/or 5 - * modify it under the terms of the GNU General Public License as 6 - * published by the Free Software Foundation version 2. 7 - * 8 - * This program is distributed "as is" WITHOUT ANY WARRANTY of any 9 - * kind, whether express or implied; without even the implied warranty 10 - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 - * GNU General Public License for more details. 12 - */ 1 + // SPDX-License-Identifier: GPL-2.0 2 + // Copyright (C) 2012 Broadcom Corporation 13 3 14 4 #include <linux/init.h> 15 5 #include <linux/irq.h>
+1 -4
drivers/clocksource/jcore-pit.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * J-Core SoC PIT/clocksource driver 3 4 * 4 5 * Copyright (C) 2015-2016 Smart Energy Instruments, Inc. 5 - * 6 - * This file is subject to the terms and conditions of the GNU General Public 7 - * License. See the file "COPYING" in the main directory of this archive 8 - * for more details. 9 6 */ 10 7 11 8 #include <linux/kernel.h>
+2 -7
drivers/clocksource/mips-gic-timer.c
··· 1 - /* 2 - * This file is subject to the terms and conditions of the GNU General Public 3 - * License. See the file "COPYING" in the main directory of this archive 4 - * for more details. 5 - * 6 - * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. 7 - */ 1 + // SPDX-License-Identifier: GPL-2.0 2 + // Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. 8 3 9 4 #define pr_fmt(fmt) "mips-gic-timer: " fmt 10 5
+1 -4
drivers/clocksource/timer-armada-370-xp.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Marvell Armada 370/XP SoC timer handling. 3 4 * ··· 7 6 * Lior Amsalem <alior@marvell.com> 8 7 * Gregory CLEMENT <gregory.clement@free-electrons.com> 9 8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 10 - * 11 - * This file is licensed under the terms of the GNU General Public 12 - * License version 2. This program is licensed "as is" without any 13 - * warranty of any kind, whether express or implied. 14 9 * 15 10 * Timer 0 is used as free-running clocksource, while timer 1 is 16 11 * used as clock_event_device.
+1 -4
drivers/clocksource/timer-digicolor.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Conexant Digicolor timer driver 3 4 * ··· 12 11 * Copyright (C) 2013 Maxime Ripard 13 12 * 14 13 * Maxime Ripard <maxime.ripard@free-electrons.com> 15 - * 16 - * This file is licensed under the terms of the GNU General Public 17 - * License version 2. This program is licensed "as is" without any 18 - * warranty of any kind, whether express or implied. 19 14 */ 20 15 21 16 /*
-25
drivers/clocksource/timer-ixp4xx.c
··· 19 19 #include <linux/of_address.h> 20 20 #include <linux/of_irq.h> 21 21 #include <linux/platform_device.h> 22 - /* Goes away with OF conversion */ 23 - #include <linux/platform_data/timer-ixp4xx.h> 24 22 25 23 /* 26 24 * Constants to make it easy to access Timer Control/Status registers ··· 261 263 }; 262 264 builtin_platform_driver(ixp4xx_timer_driver); 263 265 264 - /** 265 - * ixp4xx_timer_setup() - Timer setup function to be called from boardfiles 266 - * @timerbase: physical base of timer block 267 - * @timer_irq: Linux IRQ number for the timer 268 - * @timer_freq: Fixed frequency of the timer 269 - */ 270 - void __init ixp4xx_timer_setup(resource_size_t timerbase, 271 - int timer_irq, 272 - unsigned int timer_freq) 273 - { 274 - void __iomem *base; 275 - 276 - base = ioremap(timerbase, 0x100); 277 - if (!base) { 278 - pr_crit("IXP4xx: can't remap timer\n"); 279 - return; 280 - } 281 - ixp4xx_timer_register(base, timer_irq, timer_freq); 282 - } 283 - EXPORT_SYMBOL_GPL(ixp4xx_timer_setup); 284 - 285 - #ifdef CONFIG_OF 286 266 static __init int ixp4xx_of_timer_init(struct device_node *np) 287 267 { 288 268 void __iomem *base; ··· 291 315 return ret; 292 316 } 293 317 TIMER_OF_DECLARE(ixp4xx, "intel,ixp4xx-timer", ixp4xx_of_timer_init); 294 - #endif
+1 -5
drivers/clocksource/timer-lpc32xx.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Clocksource driver for NXP LPC32xx/18xx/43xx timer 3 4 * ··· 7 6 * Based on: 8 7 * time-efm32 Copyright (C) 2013 Pengutronix 9 8 * mach-lpc32xx/timer.c Copyright (C) 2009 - 2010 NXP Semiconductors 10 - * 11 - * This file is licensed under the terms of the GNU General Public 12 - * License version 2. This program is licensed "as is" without any 13 - * warranty of any kind, whether express or implied. 14 - * 15 9 */ 16 10 17 11 #define pr_fmt(fmt) "%s: " fmt, __func__
+1 -4
drivers/clocksource/timer-orion.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Marvell Orion SoC timer handling. 3 4 * 4 5 * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 5 - * 6 - * This file is licensed under the terms of the GNU General Public 7 - * License version 2. This program is licensed "as is" without any 8 - * warranty of any kind, whether express or implied. 9 6 * 10 7 * Timer 0 is used as free-running clocksource, while timer 1 is 11 8 * used as clock_event_device.
+1 -1
drivers/clocksource/timer-oxnas-rps.c
··· 236 236 } 237 237 238 238 rps->irq = irq_of_parse_and_map(np, 0); 239 - if (rps->irq < 0) { 239 + if (!rps->irq) { 240 240 ret = -EINVAL; 241 241 goto err_iomap; 242 242 }
+1 -4
drivers/clocksource/timer-pistachio.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Pistachio clocksource based on general-purpose timers 3 4 * 4 5 * Copyright (C) 2015 Imagination Technologies 5 - * 6 - * This file is subject to the terms and conditions of the GNU General Public 7 - * License. See the file "COPYING" in the main directory of this archive 8 - * for more details. 9 6 */ 10 7 11 8 #define pr_fmt(fmt) "%s: " fmt, __func__
+1 -1
drivers/clocksource/timer-riscv.c
··· 34 34 static unsigned int riscv_clock_event_irq; 35 35 static DEFINE_PER_CPU(struct clock_event_device, riscv_clock_event) = { 36 36 .name = "riscv_timer_clockevent", 37 - .features = CLOCK_EVT_FEAT_ONESHOT, 37 + .features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP, 38 38 .rating = 100, 39 39 .set_next_event = riscv_clock_next_event, 40 40 };
+5 -5
drivers/clocksource/timer-sp804.c
··· 259 259 struct clk *clk1, *clk2; 260 260 const char *name = of_get_property(np, "compatible", NULL); 261 261 262 + if (initialized) { 263 + pr_debug("%pOF: skipping further SP804 timer device\n", np); 264 + return 0; 265 + } 266 + 262 267 base = of_iomap(np, 0); 263 268 if (!base) 264 269 return -ENXIO; ··· 274 269 /* Ensure timers are disabled */ 275 270 writel(0, timer1_base + timer->ctrl); 276 271 writel(0, timer2_base + timer->ctrl); 277 - 278 - if (initialized || !of_device_is_available(np)) { 279 - ret = -EINVAL; 280 - goto err; 281 - } 282 272 283 273 clk1 = of_clk_get(np, 0); 284 274 if (IS_ERR(clk1))
+1 -4
drivers/clocksource/timer-sun4i.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Allwinner A1X SoCs timer handling. 3 4 * ··· 9 8 * Based on code from 10 9 * Allwinner Technology Co., Ltd. <www.allwinnertech.com> 11 10 * Benn Huang <benn@allwinnertech.com> 12 - * 13 - * This file is licensed under the terms of the GNU General Public 14 - * License version 2. This program is licensed "as is" without any 15 - * warranty of any kind, whether express or implied. 16 11 */ 17 12 18 13 #include <linux/clk.h>
+1 -4
drivers/clocksource/timer-sun5i.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Allwinner SoCs hstimer driver. 3 4 * 4 5 * Copyright (C) 2013 Maxime Ripard 5 6 * 6 7 * Maxime Ripard <maxime.ripard@free-electrons.com> 7 - * 8 - * This file is licensed under the terms of the GNU General Public 9 - * License version 2. This program is licensed "as is" without any 10 - * warranty of any kind, whether express or implied. 11 8 */ 12 9 13 10 #include <linux/clk.h>
+1 -2
drivers/clocksource/timer-ti-dm.c
··· 828 828 cpu_pm_register_notifier(&timer->nb); 829 829 } 830 830 831 - if (pdata) 832 - timer->errata = pdata->timer_errata; 831 + timer->errata = pdata->timer_errata; 833 832 834 833 timer->pdev = pdev; 835 834
-11
include/linux/platform_data/timer-ixp4xx.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef __TIMER_IXP4XX_H 3 - #define __TIMER_IXP4XX_H 4 - 5 - #include <linux/ioport.h> 6 - 7 - void __init ixp4xx_timer_setup(resource_size_t timerbase, 8 - int timer_irq, 9 - unsigned int timer_freq); 10 - 11 - #endif