summaryrefslogtreecommitdiff
path: root/drivers/pmdomain/renesas
AgeCommit message (Collapse)Author
2024-03-06pmdomain: renesas: rcar-gen4-sysc: Reduce atomic delaysGeert Uytterhoeven
The delays used with the various atomic polling loops are already at the maximum value of ~10µs, as documented for read_poll_timeout_atomic(). Hence reduce the delays from 10 to 1 µs. Increase PDRESR_RETRIES accordingly, to retain the old (generous) timeout value. Measurements on R-Car V3U, S4, V4H, and V4M show that the first three polling loops rarely (never?) loop, so the actual delay does not matter. The fourth loop (for SYSCISCR in rcar_gen4_sysc_power()) typically ran for one or two cycles with the old delay. With the reduced delay, it typically runs for two to 17 cycles, and finishes earlier than before, which can reduce loop time up to a factor of three. While at it, rename the SYSCISR_{TIMEOUT,DELAY_US} definitions to SYSCISCR_{TIMEOUT,DELAY_US}, to match the register name they apply to. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/77f150522096d55c6da0ff983db61e0cf6309344.1709317289.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-02-14pmdomain: renesas: Adjust the waiting time to cover the worst caseDien Pham
Description in HWM rev0.51E, 9.4 Usage notes, page 455 tells "It takes several hundreds of microseconds to shutting off and resuming power domain. Because actual time required for shutting off and resuming depends on the status of on-board power line, shutoff/resume time is not guaranteed by electrical specification" Let's assume the safe value of waiting is about 1000us. Signed-off-by: Dien Pham <dien.pham.ry@renesas.com> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com> Signed-off-by: Tho Vu <tho.vu.wh@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/8734tx8b18.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-02-14pmdomain: renesas: r8a779h0-sysc: Add r8a779h0 supportDuy Nguyen
Add support for R-Car V4M (R8A779H0) SoC power areas to the R-Car SYSC driver. Signed-off-by: Duy Nguyen <duy.nguyen.rh@renesas.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Link: https://lore.kernel.org/r/eed6faa02c628d32676ab8ea0eee636b4ffd6c47.1706194617.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-02-14pmdomain: renesas: rcar-gen4-sysc: Remove unneeded includesGeert Uytterhoeven
The R-Car V3U System Controller (SYSC) driver no longer needs these includes since the factoring out of the common R-Car Gen4 SYSC driver in commit e62906d6315f652b ("soc: renesas: rcar-gen4-sysc: Introduce R-Car Gen4 SYSC driver"). The R-Car S4-8 and V4H SYSC drivers never needed these includes, as these drivers always used the common R-Car Gen4 SYSC driver. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/5b440f84ab8b52499ab307c84154dcbc0f41d1d7.1705931035.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-01-22pmdomain: renesas: r8a77980-sysc: CR7 must be always onGeert Uytterhoeven
The power domain containing the Cortex-R7 CPU core on the R-Car V3H SoC must always be in power-on state, unlike on other SoCs in the R-Car Gen3 family. See Table 9.4 "Power domains" in the R-Car Series, 3rd Generation Hardware User’s Manual Rev.1.00 and later. Fix this by marking the domain as a CPU domain without control registers, so the driver will not touch it. Fixes: 41d6d8bd8ae9 ("soc: renesas: rcar-sysc: add R8A77980 support") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/fdad9a86132d53ecddf72b734dac406915c4edc0.1705076735.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2023-10-04pmdomain: renesas: rmobile-sysc: fix -Wvoid-pointer-to-enum-cast warningJustin Stitt
When building with clang 18 I see the following warning: | drivers/soc/renesas/rmobile-sysc.c:193:22: warning: cast to smaller integer | type 'enum pd_types' from 'const void *' [-Wvoid-pointer-to-enum-cast] | 193 | add_special_pd(np, (enum pd_types)id->data); This is due to the fact that `id->data` is a void* and `enum pd_types` has the size of an integer. This cast from pointer-width to int-width causes truncation and possible data loss. Instead, cast to `uintptr_t` which has the same width as void*. Reported-by: Nathan Chancellor <nathan@kernel.org> Closes: https://github.com/ClangBuiltLinux/linux/issues/1910 Signed-off-by: Justin Stitt <justinstitt@google.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20230814-void-drivers-soc-renesas-rmobile-sysc-v1-1-6648dfd854de@google.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2023-10-04pmdomain: renesas: Move Kconfig options to the pmdomain subsystemUlf Hansson
The Kconfig options belongs closer to the corresponding implementations, hence let's move them from the soc subsystem to the pmdomain subsystem. Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: <linux-renesas-soc@vger.kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2023-09-13pmdomain: Rename the genpd subsystem to pmdomainUlf Hansson
It has been pointed out that naming a subsystem "genpd" isn't very self-explanatory and the acronym itself that means Generic PM Domain, is known only by a limited group of people. In a way to improve the situation, let's rename the subsystem to pmdomain, which ideally should indicate that this is about so called Power Domains or "PM domains" as we often also use within the Linux Kernel terminology. Suggested-by: Rafael J. Wysocki <rafael@kernel.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Rafael J. Wysocki <rafael@kernel.org> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20230912221127.487327-1-ulf.hansson@linaro.org