Skip to content

Commit

Permalink
drivers: timer: s/device.h/init.h
Browse files Browse the repository at this point in the history
Timer "drivers" do not use the device model infrastructure, they are
singletons with a SYS_INIT call. This means they do not have to include
device.h but init.h. Things worked because device.h includes init.h.

(cherry picked from commit 12b2ee5)

Original-Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
GitOrigin-RevId: 12b2ee5
Change-Id: I207b556a86e8e1892ee72d8f9dafd7ef226929d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4822201
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Commit-Queue: Yuval Peress <peress@google.com>
Reviewed-by: Yuval Peress <peress@google.com>
Tested-by: Yuval Peress <peress@google.com>
  • Loading branch information
gmarull authored and Chromeos LUCI committed Aug 29, 2023
1 parent 646b9ff commit 3c3c446
Show file tree
Hide file tree
Showing 29 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion drivers/timer/altera_avalon_timer_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <zephyr/kernel.h>
#include <zephyr/arch/cpu.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <altera_common.h>
#include <zephyr/irq.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/apic_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/sys_clock.h>
#include <zephyr/spinlock.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/apic_tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2021 Intel Corporation
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/sys_clock.h>
#include <zephyr/spinlock.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/arcv2_timer0.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/sys_clock.h>
#include <zephyr/spinlock.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/arm_arch_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/arm_arch_timer.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/irq.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/cc13xx_cc26xx_rtc_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* the comparator value set is reached.
*/

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <soc.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/timer/system_timer.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/cortex_m_systick.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/sys_clock.h>
#include <zephyr/spinlock.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/esp32c3_sys_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/sys_clock.h>
#include <soc.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/spinlock.h>

#define CYC_PER_TICK ((uint32_t)((uint64_t)sys_clock_hw_cycles_per_sec() \
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/gecko_burtc_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <soc.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/timer/system_timer.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#define DT_DRV_COMPAT intel_hpet
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/sys_clock.h>
#include <zephyr/spinlock.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/intel_adsp_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/sys_clock.h>
#include <zephyr/spinlock.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/ite_it8xxx2_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#define DT_DRV_COMPAT ite_it8xxx2_timer

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/dt-bindings/interrupt-controller/ite-intc.h>
#include <soc.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/leon_gptimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#define DT_DRV_COMPAT gaisler_gptimer

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/irq.h>
#include <zephyr/sys_clock.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/litex_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <zephyr/kernel.h>
#include <zephyr/arch/cpu.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/irq.h>
#include <zephyr/spinlock.h>
#include <zephyr/drivers/timer/system_timer.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/mchp_xec_rtos_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#define DT_DRV_COMPAT microchip_xec_rtos_timer

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/devicetree.h>
#include <soc.h>
#include <zephyr/drivers/timer/system_timer.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/mcux_gpt_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#define DT_DRV_COMPAT nxp_gpt_hw_timer

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <fsl_gpt.h>
#include <zephyr/sys_clock.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/mcux_lptmr_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#define DT_DRV_COMPAT nxp_kinetis_lptmr

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/time_units.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/mcux_os_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <limits.h>

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/irq.h>
#include <zephyr/sys_clock.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/mips_cp0_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <limits.h>

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/irq.h>
#include <zephyr/sys_clock.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/native_posix_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
#include "zephyr/types.h"
#include <zephyr/irq.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/sys_clock.h>
#include "timer_model.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/npcx_itim_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* "sleep/deep sleep" power state if CONFIG_PM is enabled.
*/

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/kernel.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/nrf_rtc_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <soc.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/clock_control/nrf_clock_control.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/rcar_cmt_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include <zephyr/arch/cpu.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <soc.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/drivers/clock_control.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/riscv_machine_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <limits.h>

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/sys_clock.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/rv32m1_lptmr_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#define DT_DRV_COMPAT openisa_rv32m1_lptmr

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include <zephyr/drivers/timer/system_timer.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/sam0_rtc_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* generate an interrupt every tick.
*/

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <soc.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/timer/system_timer.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/stm32_lptim_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <soc.h>
#include <stm32_ll_lptim.h>
#include <stm32_ll_bus.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/xlnx_psttc_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define DT_DRV_COMPAT xlnx_ttcps

#include <zephyr/arch/cpu.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/irq.h>
#include <zephyr/sys_clock.h>
#include <soc.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/xtensa_sys_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/sys_clock.h>
#include <zephyr/spinlock.h>
Expand Down

0 comments on commit 3c3c446

Please sign in to comment.