summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2017-01-29 17:15:36 -0800
committerOlof Johansson <olof@lixom.net>2017-01-29 17:15:36 -0800
commitf0d0b8cb6bb361bd88f10900e9716eec73e262d9 (patch)
tree4648de6fb61e7e719d37b5fd6d34e6dceb0ec249 /arch/arm/mach-omap2/omap_hwmod.c
parent37b3785b136289b36f5403b4f59b2dc47c35c485 (diff)
parent8c4bc910633d942b4422e8b264c39a48e230a261 (diff)
downloadlinux-f0d0b8cb6bb361bd88f10900e9716eec73e262d9.tar.bz2
Merge tag 'omap-for-v4.11/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
SoC changes for omaps for v4.11 merge window. This adds support for keeping the interconnect target module active for uart if earlycon is specified. And we're adding Aaro Koskinen as a co-maintainer for omap1 to make sure things stay working for omap1. The other changes are mostly clean-up of old legacy code: - Remove unused omap_display_init() - Make omapdss_find_dss_of_node() function static - Add support for earlycon - Tidy up omap1 usb logging output with pr_cont - Make omap_otg_init() static - Delete redundant CPU class checks for omap1 - Remove unused mpurate cmdline option that has not done anything for past 1.5 years at least * tag 'omap-for-v4.11/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP: clock: Remove unused mpurate cmdline option ARM: OMAP2+: omap_hwmod: Add support for earlycon MAINTAINERS: Add Aaro Koskinen as TI omap1 SoC co-maintainer ARM: OMAP1: USB: delete redundant CPU class checks ARM: OMAP1: USB: make omap_otg_init() static ARM: OMAP1: USB: tidy up logging output ARM: OMAP2+: Make the omapdss_find_dss_of_node() function static ARM: OMAP2+: Remove unused omap_display_init() function Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index e8b988714a09..0da4f2ea76c4 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3249,6 +3249,36 @@ int __init omap_hwmod_setup_one(const char *oh_name)
}
/**
+ * omap_hwmod_setup_earlycon_flags - set up flags for early console
+ *
+ * Enable DEBUG_OMAPUART_FLAGS for uart hwmod that is being used as
+ * early concole so that hwmod core doesn't reset and keep it in idle
+ * that specific uart.
+ */
+#ifdef CONFIG_SERIAL_EARLYCON
+static void __init omap_hwmod_setup_earlycon_flags(void)
+{
+ struct device_node *np;
+ struct omap_hwmod *oh;
+ const char *uart;
+
+ np = of_find_node_by_path("/chosen");
+ if (np) {
+ uart = of_get_property(np, "stdout-path", NULL);
+ if (uart) {
+ np = of_find_node_by_path(uart);
+ if (np) {
+ uart = of_get_property(np, "ti,hwmods", NULL);
+ oh = omap_hwmod_lookup(uart);
+ if (oh)
+ oh->flags |= DEBUG_OMAPUART_FLAGS;
+ }
+ }
+ }
+}
+#endif
+
+/**
* omap_hwmod_setup_all - set up all registered IP blocks
*
* Initialize and set up all IP blocks registered with the hwmod code.
@@ -3261,6 +3291,9 @@ static int __init omap_hwmod_setup_all(void)
_ensure_mpu_hwmod_is_setup(NULL);
omap_hwmod_for_each(_init, NULL);
+#ifdef CONFIG_SERIAL_EARLYCON
+ omap_hwmod_setup_earlycon_flags();
+#endif
omap_hwmod_for_each(_setup, NULL);
return 0;