summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/include/mach/debug_ll.h
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2015-05-06 12:32:03 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2015-05-07 09:49:40 +0200
commit059098fe07e06d5ebec484a5b4747197955b53ce (patch)
tree409af9d5a9c69aa3cdc59d899a069da21dd14ba4 /arch/arm/mach-imx/include/mach/debug_ll.h
parent5b7def7b68f46ed4ec9979865ff9187e465eed4e (diff)
downloadbarebox-059098fe07e06d5ebec484a5b4747197955b53ce.tar.gz
barebox-059098fe07e06d5ebec484a5b4747197955b53ce.tar.xz
i.MX: serial: Distil common clock ungating code
Move all of the common clock ungating code in early UART initialization into a dedicated subroutine that can be shared by all of the users. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/include/mach/debug_ll.h')
-rw-r--r--arch/arm/mach-imx/include/mach/debug_ll.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/include/mach/debug_ll.h b/arch/arm/mach-imx/include/mach/debug_ll.h
index 1f35e81532..ab939b3a88 100644
--- a/arch/arm/mach-imx/include/mach/debug_ll.h
+++ b/arch/arm/mach-imx/include/mach/debug_ll.h
@@ -101,8 +101,22 @@ static inline void imx_uart_setup_ll(void __iomem *uartbase,
unsigned int refclock)
{
}
+
static inline void imx51_uart_setup_ll(void) {}
static inline void imx6_uart_setup_ll(void) {}
#endif /* CONFIG_DEBUG_LL */
+
+static inline void imx_ungate_all_peripherals(void __iomem *ccmbase)
+{
+ int i;
+ for (i = 0x68; i <= 0x80; i += 4)
+ writel(0xffffffff, ccmbase + i);
+}
+
+static inline void imx6_ungate_all_peripherals(void)
+{
+ imx_ungate_all_peripherals(IOMEM(MX6_CCM_BASE_ADDR));
+}
+
#endif /* __MACH_DEBUG_LL_H__ */