ARM: shmobile: Enable drivers/sh/pm_runtime.c on multi-platform
cover ARM: shmobile: Enable drivers/sh/pm_runtime.c on multi-platform
This patchset enables the PM runtime code in drivers/sh/pm_runtime.c when running a multi-platform ARM kernel including support for shmobile. Before this code was only enabled for legacy shmobile kernels, leading to disabled clocks in multiplatform kernels, depending on implicit reset state or on the bootloader.
[1/5] drivers: sh: pm_runtime does not need idle callback [2/5] sh: intc: Restrict INTC_USERIMASK to SH4A
[3/5] drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI [4/5] ARM: shmobile: Call sh_pm_runtime_init() from platform code on all
SoCs
[5/5] drivers: sh: Remove automatic sh_pm_runtime_init() if
ARCH_SHMOBILE_LEGACY
Patches 1 and 3 were authored by Ben Dooks, with some changes made by me (for patch 3). Patch 4 was based on a patch by Ben for r8a7790.
After this it should be safe to revert the various commits to "Work around core clock issues". Note that this is just a port of the existing sh(mobile)-specifc PM runtime code from legacy to multi-platform, so expect more work to fix the core issues.
This was tested on Koelsch, both legacy and multi-platform.
Many thanks to Ben Dooks, Laurent Pinchart, and Magnus Damm for the valuable input, investigations, and discussions.
Thanks for your comments, and test results on other boards/SoCs (esp. SoCs supporting power domains, like sh7372, r8a7740, and r8a7779)!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Geert,
Thank you for the patches.
Quoted 22 lines · On Wednesday 19 March 2014 20:06:45 Geert Uytterhoeven wrote:
This patchset enables the PM runtime code in
drivers/sh/pm_runtime.cwhen running a multi-platform ARM kernel including support for shmobile. Before this code was only enabled for legacy shmobile kernels, leading to disabled clocks in multiplatform kernels, depending on implicit reset state or on the bootloader.[1/5] drivers: sh:
pm_runtimedoes not need idle callback [2/5] sh: intc: RestrictINTC_USERIMASKto SH4A
[3/5] drivers: sh: compiledrivers/sh/pm_runtime.cifARCH_SHMOBILE_MULTI[4/5] ARM: shmobile: Callsh_pm_runtime_init()from platform code on all
SoCs
[5/5] drivers: sh: Remove automaticsh_pm_runtime_init()if
ARCH_SHMOBILE_LEGACYPatches 1 and 3 were authored by Ben Dooks, with some changes made by me (for patch 3). Patch 4 was based on a patch by Ben for r8a7790.
After this it should be safe to revert the various commits to "Work around core clock issues". Note that this is just a port of the existing sh(mobile)-specifc PM runtime code from legacy to multi-platform, so expect more work to fix the core issues.
Quoted 7 lines
This was tested on Koelsch, both legacy and multi-platform.
Many thanks to Ben Dooks, Laurent Pinchart, and Magnus Damm for the valuable input, investigations, and discussions.
Thanks for your comments, and test results on other boards/SoCs (esp. SoCs supporting power domains, like sh7372, r8a7740, and r8a7779)!
For the whole series,
On r8a7779 legacy only (as r8a7779 isn't supported in multiplatform kernels yet),
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 8 lines · Geert Uytterhoeven
This patchset enables the PM runtime code in
drivers/sh/pm_runtime.cwhen running a multi-platform ARM kernel including support for shmobile. Before this code was only enabled for legacy shmobile kernels, leading to disabled clocks in multiplatform kernels, depending on implicit reset state or on the bootloader.[1/5] drivers: sh:
pm_runtimedoes not need idle callback [2/5] sh: intc: RestrictINTC_USERIMASKto SH4A
I thought there was already a of capable intc driver in the irq drivers directory?
Quoted 14 lines
[3/5] drivers: sh: compile
drivers/sh/pm_runtime.cifARCH_SHMOBILE_MULTI[4/5] ARM: shmobile: Callsh_pm_runtime_init()from platform code on all
SoCs
[5/5] drivers: sh: Remove automaticsh_pm_runtime_init()if
ARCH_SHMOBILE_LEGACYPatches 1 and 3 were authored by Ben Dooks, with some changes made by me (for patch 3). Patch 4 was based on a patch by Ben for r8a7790.
After this it should be safe to revert the various commits to "Work around core clock issues". Note that this is just a port of the existing sh(mobile)-specifc PM runtime code from legacy to multi-platform, so expect more work to fix the core issues.
Quoted 4 lines
This was tested on Koelsch, both legacy and multi-platform.
Many thanks to Ben Dooks, Laurent Pinchart, and Magnus Damm for the valuable input, investigations, and discussions.
Thanks, I will probably not get around to testing this until next week as I am not in the office until Monday now. I think there is one more thing we need to do, which is to do a device suspend and resume like the current davinci implementation.
Signature · 2 lines
Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius
Hi Ben,
Quoted 4 lines · Ben Dooks
Quoted 1 line
[2/5] sh: intc: Restrict
INTC_USERIMASKto SH4AI thought there was already a of capable intc driver in the irq drivers directory?
SH4A doesn't use OF. Or am I missing your point?
Quoted 4 lines
Thanks, I will probably not get around to testing this until next week as I am not in the office until Monday now. I think there is one more thing we need to do, which is to do a device suspend and resume like the current davinci implementation.
Thanks, I'll have a look at that.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 8 lines · Geert Uytterhoeven
Hi Ben,
Quoted 4 lines · Ben Dooks
Quoted 1 line
[2/5] sh: intc: Restrict
INTC_USERIMASKto SH4AI thought there was already a of capable intc driver in the irq drivers directory?
Quoted 8 lines
SH4A doesn't use OF. Or am I missing your point?
Quoted 4 lines
Thanks, I will probably not get around to testing this until next week as I am not in the office until Monday now. I think there is one more thing we need to do, which is to do a device suspend and resume like the current davinci implementation.
Thanks, I'll have a look at that.
I've already done a patch which I am testing for it.
Signature · 2 lines
Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius
Hi Geert,
Quoted 7 lines · On Thursday 20 March 2014 09:56:17 Ben Dooks wrote:
Quoted 6 lines · Geert Uytterhoeven
This patchset enables the PM runtime code in
drivers/sh/pm_runtime.cwhen running a multi-platform ARM kernel including support for shmobile. Before this code was only enabled for legacy shmobile kernels, leading to disabled clocks in multiplatform kernels, depending on implicit reset state or on the bootloader.
Quoted 5 lines
Quoted 2 lines
[1/5] drivers: sh:
pm_runtimedoes not need idle callback [2/5] sh: intc: RestrictINTC_USERIMASKto SH4AI thought there was already a of capable intc driver in the irq drivers directory?
I think Ben's point is that drivers/sh/intc might be completely unneeded for ARM.
Quoted 28 lines
Quoted 19 lines
[3/5] drivers: sh: compile
drivers/sh/pm_runtime.cifARCH_SHMOBILE_MULTI
[4/5] ARM: shmobile: Callsh_pm_runtime_init()from platform code on allSoCs
[5/5] drivers: sh: Remove automatic
sh_pm_runtime_init()if
ARCH_SHMOBILE_LEGACYPatches 1 and 3 were authored by Ben Dooks, with some changes made by me (for patch 3). Patch 4 was based on a patch by Ben for r8a7790.
After this it should be safe to revert the various commits to "Work around core clock issues". Note that this is just a port of the existing sh(mobile)-specifc PM runtime code from legacy to multi-platform, so expect more work to fix the core issues.
Quoted 4 lines
This was tested on Koelsch, both legacy and multi-platform.
Many thanks to Ben Dooks, Laurent Pinchart, and Magnus Damm for the valuable input, investigations, and discussions.
Thanks, I will probably not get around to testing this until next week as I am not in the office until Monday now. I think there is one more thing we need to do, which is to do a device suspend and resume like the current davinci implementation.
Signature · 3 lines
Regards, Laurent Pinchart
Hi Laurent,
Quoted 8 lines · Laurent Pinchart
Quoted 7 lines · On Thursday 20 March 2014 09:56:17 Ben Dooks wrote:
Quoted 6 lines · Geert Uytterhoeven
This patchset enables the PM runtime code in
drivers/sh/pm_runtime.cwhen running a multi-platform ARM kernel including support for shmobile. Before this code was only enabled for legacy shmobile kernels, leading to disabled clocks in multiplatform kernels, depending on implicit reset state or on the bootloader.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
[1/5] drivers: sh:
pm_runtimedoes not need idle callback [2/5] sh: intc: RestrictINTC_USERIMASKto SH4AI thought there was already a of capable intc driver in the irq drivers directory?
I think Ben's point is that
drivers/sh/intcmight be completely unneeded for ARM.
http://www.spinics.net/lists/linux-sh/msg30067.html
"Furthermore, the core intc parts are used by sh7372/mackerel and
sh73a0/kzm9g (and arch/sh) only, so I'm gonna restrict it to ARCH_SHMOBILE_LEGACY and SUPERH only."
Despite the names, sh7372 and sh73a0 are ARM.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 10 lines · Geert Uytterhoeven
Quoted 2 lines
I think Ben's point is that
drivers/sh/intcmight be completely unneeded for ARM.http://www.spinics.net/lists/linux-sh/msg30067.html
"Furthermore, the core intc parts are used by sh7372/mackerel and
sh73a0/kzm9g (andarch/sh) only, so I'm gonna restrict it toARCH_SHMOBILE_LEGACYand SUPERH only."Despite the names, sh7372 and sh73a0 are ARM.
Hmm, I think the inclusion of drivers/sh/intc could depend on a new SH_INTC symbol, to be selected by legacy sh, and ARM sh7372/sh73a0?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Geert,
Quoted 15 lines · On Thursday 20 March 2014 13:13:28 Geert Uytterhoeven wrote:
Quoted 14 lines · Laurent Pinchart
Quoted 12 lines · On Thursday 20 March 2014 09:56:17 Ben Dooks wrote:
Quoted 8 lines · Geert Uytterhoeven
This patchset enables the PM runtime code in
drivers/sh/pm_runtime.cwhen running a multi-platform ARM kernel including support for shmobile. Before this code was only enabled for legacy shmobile kernels, leading to disabled clocks in multiplatform kernels, depending on implicit reset state or on the bootloader.[1/5] drivers: sh:
pm_runtimedoes not need idle callback [2/5] sh: intc: RestrictINTC_USERIMASKto SH4AI thought there was already a of capable intc driver in the irq drivers directory?
Quoted 8 lines
Quoted 2 lines
I think Ben's point is that
drivers/sh/intcmight be completely unneeded for ARM.http://www.spinics.net/lists/linux-sh/msg30067.html
"Furthermore, the core intc parts are used by sh7372/mackerel and
sh73a0/kzm9g (andarch/sh) only, so I'm gonna restrict it toARCH_SHMOBILE_LEGACYand SUPERH only."
My bad, sorry. If it wasn't for sh7372 and sh73a0 being old SoCs that's probably something we should fix by moving the code to drivers/irqchip.
Quoted 1 line
Despite the names, sh7372 and sh73a0 are ARM.
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 21 lines · Laurent Pinchart
Hi Geert,
Quoted 18 lines · On Thursday 20 March 2014 13:13:28 Geert Uytterhoeven wrote:
Quoted 16 lines · Laurent Pinchart
Quoted 7 lines · On Thursday 20 March 2014 09:56:17 Ben Dooks wrote:
Quoted 6 lines · Geert Uytterhoeven
This patchset enables the PM runtime code in
drivers/sh/pm_runtime.cwhen running a multi-platform ARM kernel including support for shmobile. Before this code was only enabled for legacy shmobile kernels, leading to disabled clocks in multiplatform kernels, depending on implicit reset state or on the bootloader.Quoted 5 lines
Quoted 2 lines
[1/5] drivers: sh:
pm_runtimedoes not need idle callback [2/5] sh: intc: RestrictINTC_USERIMASKto SH4AI thought there was already a of capable intc driver in the irq drivers directory?
I think Ben's point is that
drivers/sh/intcmight be completely unneeded for ARM.
Quoted 8 lines
Quoted 5 lines
http://www.spinics.net/lists/linux-sh/msg30067.html
"Furthermore, the core intc parts are used by sh7372/mackerel and
sh73a0/kzm9g (andarch/sh) only, so I'm gonna restrict it toARCH_SHMOBILE_LEGACYand SUPERH only."My bad, sorry. If it wasn't for sh7372 and sh73a0 being old SoCs that's probably something we should fix by moving the code to
drivers/irqchip.
Something to look at later?
Signature · 2 lines
Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius
Hi
I tested these patches with r8a7770 lager on multiplatform DT. Sound couldn't works without these patches.
Quoted 44 lines
This patchset enables the PM runtime code in
drivers/sh/pm_runtime.cwhen running a multi-platform ARM kernel including support for shmobile. Before this code was only enabled for legacy shmobile kernels, leading to disabled clocks in multiplatform kernels, depending on implicit reset state or on the bootloader.[1/5] drivers: sh:
pm_runtimedoes not need idle callback [2/5] sh: intc: RestrictINTC_USERIMASKto SH4A
[3/5] drivers: sh: compiledrivers/sh/pm_runtime.cifARCH_SHMOBILE_MULTI[4/5] ARM: shmobile: Callsh_pm_runtime_init()from platform code on all
SoCs
[5/5] drivers: sh: Remove automaticsh_pm_runtime_init()if
ARCH_SHMOBILE_LEGACYPatches 1 and 3 were authored by Ben Dooks, with some changes made by me (for patch 3). Patch 4 was based on a patch by Ben for r8a7790.
After this it should be safe to revert the various commits to "Work around core clock issues". Note that this is just a port of the existing sh(mobile)-specifc PM runtime code from legacy to multi-platform, so expect more work to fix the core issues.
This was tested on Koelsch, both legacy and multi-platform.
Many thanks to Ben Dooks, Laurent Pinchart, and Magnus Damm for the valuable input, investigations, and discussions.
Thanks for your comments, and test results on other boards/SoCs (esp. SoCs supporting power domains, like sh7372, r8a7740, and r8a7779)!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html