aboutsummaryrefslogtreecommitdiff
path: root/include/clocksource/timer-ti-dm.h
AgeCommit message (Collapse)AuthorFilesLines
2022-12-02clocksource/drivers/timer-ti-dm: Make timer_get_irq staticTony Lindgren1-2/+0
We can make timer_get_irq() static as noted by Janusz. It is only used by omap_rproc_get_timer_irq() via platform data. Reported-by: Janusz Krzysztofik <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
2022-09-20clocksource/drivers/timer-ti-dm: Move struct omap_dm_timer fields to driverTony Lindgren1-43/+0
There is no longer any need to expose the elements of struct omap_dm_timer outside the driver. The pwm and remoteproc drivers just use struct omap_dm_timer as a cookie. Let's move the elements of struct omap_dm_timer into struct dmtimer that is private to the driver. To do this, we mostly rename omap_dm_timer to dmtimer in the driver. We keep omap_dm_timer only for the exposed functions in the platform_data for the pwm and remoteproc drivers. Let's also add a note about not using the exposed functions internally as those will get deprecated eventually in favor of Linux generic frameworks. Signed-off-by: Tony Lindgren <[email protected]> Reviewed-by: Janusz Krzysztofik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
2022-09-20clocksource/drivers/timer-ti-dm: Move private defines to the driverTony Lindgren1-62/+0
These defines are only used by timer-ti-dm driver. Signed-off-by: Tony Lindgren <[email protected]> Reviewed-by: Janusz Krzysztofik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
2022-09-20clocksource/drivers/timer-ti-dm: Simplify register access furtherTony Lindgren1-3/+3
Let's unify register access and use dmtimer_read() and dmtimer_write() also for the timer revision specific registers like we now do for the shread registers. Signed-off-by: Tony Lindgren <[email protected]> Reviewed-by: Janusz Krzysztofik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
2022-09-20clocksource/drivers/timer-ti-dm: Drop unused functionsTony Lindgren1-7/+0
We still have some unused functions left, let's drop them. Signed-off-by: Tony Lindgren <[email protected]> Reviewed-by: Janusz Krzysztofik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
2022-07-27clocksource/drivers/timer-ti-dm: Move inline functions to driver for am6Tony Lindgren1-144/+0
The __omap_dm_timer_* inline functions in the header are no longer needed outside the driver, and the header ifdefs prevent the driver working for ARCH_K3. Let's move the inline functions to the driver and drop the ifdefs and drop the unused functions __omap_dm_timer_override_errata() and __omap_dm_timer_load_start(). Cc: Keerthy <[email protected]> Cc: Nishanth Menon <[email protected]> Cc: Vignesh Raghavendra <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
2021-06-15clocksource/drivers/timer-ti-dm: Save and restore timer TIOCP_CFGTony Lindgren1-0/+1
As we are using cpu_pm to save and restore context, we must also save and restore the timer sysconfig register TIOCP_CFG. This is needed because we are not calling PM runtime functions at all with cpu_pm. Fixes: b34677b0999a ("clocksource/drivers/timer-ti-dm: Implement cpu_pm notifier for context save and restore") Cc: Aaro Koskinen <[email protected]> Cc: Adam Ford <[email protected]> Cc: Andreas Kemnade <[email protected]> Cc: Lokesh Vutla <[email protected]> Cc: Peter Ujfalusi <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-08-12include/: replace HTTP links with HTTPS onesAlexander A. Klimov1-1/+1
Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Signed-off-by: Alexander A. Klimov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Kees Cook <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
2020-03-30pwm: omap-dmtimer: Drop unused header fileLokesh Vutla1-2/+1
pwm_omap_dmtimer.h is used only: - to typedef struct omap_dm_timer to pwm_omap_dmtimer - for macro PWM_OMAP_DMTIMER_TRIGGER_OVERFLOW_AND_COMPARE Rest of the file is pretty mush unsed. So reuse omap_dm_timer and OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE in pwm-omap-dmtimer.c and delete the header file. Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2020-03-16clocksource/drivers/timer-ti-dm: Implement cpu_pm notifier for context save ↵Lokesh Vutla1-2/+1
and restore omap_dm_timer_enable() restores the entire context(including counter) based on 2 conditions: - If get_context_loss_count is populated and context is lost. - If get_context_loss_count is not populated update unconditionally. Case2 has a side effect of updating the counter register even though context is not lost. When timer is configured in pwm mode, this is causing undesired behaviour in the pwm period. Instead of using get_context_loss_count call back, implement cpu_pm notifier with context save and restore support. And delete the get_context_loss_count callback all together. Suggested-by: Tony Lindgren <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> [[email protected]: removed pm_runtime calls from cpuidle calls] Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-03-16clocksource/drivers/timer-ti-dm: Prepare for using cpuidleTony Lindgren1-0/+1
Let's add runtime_suspend and resume functions and atomic enabled flag. This way we can use these when converting to use cpuidle for saving and restoring device context. And we need to maintain the driver state in the driver as documented in "9. Autosuspend, or automatically-delayed suspends" in the Documentation/power/runtime_pm.rst document related to using driver private lock and races with runtime_suspend(). Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2018-02-28clocksource: timer-ti-dm: Make unexported functions staticLadislav Michl1-33/+0
As dmtimer no longer exports functions, make those previously exported static (this requires few functions to be moved around as their prototypes were deleted). Signed-off-by: Ladislav Michl <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2018-02-22clocksource: timer-ti-dm: Replace architectureKeerthy1-5/+3
Replace architecture specific guard with clocksource guard. Signed-off-by: Keerthy <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2018-02-22ARM: OMAP: Move dmtimer.h out of plat-omapKeerthy1-0/+429
The header file is currently under plat-omap directory under arch/omap. Move this out to an accessible place. No Code changes done to the header file and renamed to timer-ti-dm.h. Signed-off-by: Keerthy <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Tested-by: Ladislav Michl <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>