summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/rz-mtu3.c
Commit message (Collapse)AuthorAgeFilesLines
* mfd: rz-mtu3: Replace raw_spin_lock->spin_lock()Biju Das2023-08-221-8/+8
| | | | | | | | | | | | | | As per kernel documentation, use raw_spinlock_t only in real critical core code, low-level interrupt handling, and places where disabling preemption or interrupts is required. Here the lock is for concurrent register access from different drivers, hence spin_lock() is sufficient. Reported-by: Pavel Machek <pavel@denx.de> Closes: https://lore.kernel.org/all/ZIL%2FitcJvV5s3Bnf@duo.ucw.cz/ Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Pavel Machek <pavel@denx.de> Link: https://lore.kernel.org/r/20230815073445.9579-3-biju.das.jz@bp.renesas.com Signed-off-by: Lee Jones <lee@kernel.org>
* mfd: rz-mtu3: Reduce critical sectionsBiju Das2023-08-221-9/+7
| | | | | | | | | | | | | | Reduce critical sections on rz_mtu3_start_stop_ch() and rz_mtu3_is_enabled() by moving offset and bitpos computation outside the critical section and drop the 'ret' variable on rz_mtu3_is_enabled() and return 'tstr & BIT(bitpos)' directly. Reported-by: Pavel Machek <pavel@denx.de> Closes: https://lore.kernel.org/all/ZIMAse1ikTuycJ02@duo.ucw.cz/ Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Pavel Machek <pavel@denx.de> Link: https://lore.kernel.org/r/20230815073445.9579-2-biju.das.jz@bp.renesas.com Signed-off-by: Lee Jones <lee@kernel.org>
* mfd: rz-mtu3: Remove duplicated include module.hYang Li2023-08-181-1/+0
| | | | | | | | ./drivers/mfd/rz-mtu3.c: linux/module.h is included more than once. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20230810005938.12519-1-yang.lee@linux.alibaba.com Signed-off-by: Lee Jones <lee@kernel.org>
* mfd: Explicitly include correct DT includesRob Herring2023-08-181-1/+3
| | | | | | | | | | | | | | | The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230714174731.4059811-1-robh@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
* mfd: Add module build support for RZ/G2L MTU3aBiju Das2023-08-181-0/+1
| | | | | | | | | | Modified Kconfig to enable module build support for RZ/G2L MTU3a driver. While at it, added module.h header file. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20230711092841.119161-1-biju.das.jz@bp.renesas.com Signed-off-by: Lee Jones <lee@kernel.org>
* mfd: Add Renesas RZ/G2L MTU3a core driverBiju Das2023-04-261-0/+391
The RZ/G2L multi-function timer pulse unit 3 (MTU3a) is embedded in the Renesas RZ/G2L family SoCs. It consists of eight 16-bit timer channels and one 32-bit timer channel. It supports the following functions - Counter - Timer - PWM The 8/16/32 bit registers are mixed in each channel. Add MTU3a core driver for RZ/G2L SoC. The core driver shares the clk and channel register access for the other child devices like Counter, PWM and Clock event. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20230330111632.169434-3-biju.das.jz@bp.renesas.com