Skip to content

Commit

Permalink
aarch64: Add i.MX8 debug UART support
Browse files Browse the repository at this point in the history
Signed-off-by: Sascha Hauer <[email protected]>
[[email protected]: Added imx8_uart_setup_ll()]
Signed-off-by: Andrey Smirnov <[email protected]>
Signed-off-by: Sascha Hauer <[email protected]>
  • Loading branch information
saschahauer committed Jun 11, 2018
1 parent aa6f3af commit ee47ee9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions arch/arm/mach-imx/include/mach/debug_ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <mach/imx53-regs.h>
#include <mach/imx6-regs.h>
#include <mach/imx7-regs.h>
#include <mach/imx8mq-regs.h>
#include <mach/vf610-regs.h>

#include <serial/imx-uart.h>
Expand Down Expand Up @@ -47,6 +48,8 @@
#define IMX_DEBUG_SOC MX6
#elif defined CONFIG_DEBUG_IMX7D_UART
#define IMX_DEBUG_SOC MX7
#elif defined CONFIG_DEBUG_IMX8MQ_UART
#define IMX_DEBUG_SOC MX8MQ
#elif defined CONFIG_DEBUG_VF610_UART
#define IMX_DEBUG_SOC VF610
#else
Expand Down Expand Up @@ -95,6 +98,13 @@ static inline void vf610_uart_setup_ll(void)
lpuart_setup(base, 66000000);
}

static inline void imx8_uart_setup_ll(void)
{
void *base = IOMEM(IMX_UART_BASE(IMX_DEBUG_SOC,
CONFIG_DEBUG_IMX_UART_PORT));
imx8mq_uart_setup(base);
}

static inline void PUTC_LL(int c)
{
void __iomem *base = IOMEM(IMX_UART_BASE(IMX_DEBUG_SOC,
Expand All @@ -117,6 +127,7 @@ static inline void imx53_uart_setup_ll(void) {}
static inline void imx6_uart_setup_ll(void) {}
static inline void imx7_uart_setup_ll(void) {}
static inline void vf610_uart_setup_ll(void) {}
static inline void imx8_uart_setup_ll(void) {}

#endif /* CONFIG_DEBUG_LL */

Expand Down
8 changes: 8 additions & 0 deletions common/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,13 @@ config DEBUG_IMX7D_UART
Say Y here if you want barebox low-level debugging support
on i.MX7D.

config DEBUG_IMX8MQ_UART
bool "i.MX8MQ Debug UART"
depends on ARCH_IMX8MQ
help
Say Y here if you want barebox low-level debugging support
on i.MX8MQ.

config DEBUG_VF610_UART
bool "VF610 Debug UART"
depends on ARCH_VF610
Expand Down Expand Up @@ -1163,6 +1170,7 @@ config DEBUG_IMX_UART_PORT
DEBUG_IMX6Q_UART || \
DEBUG_IMX6SL_UART || \
DEBUG_IMX7D_UART || \
DEBUG_IMX8MQ_UART || \
DEBUG_VF610_UART
default 1
depends on ARCH_IMX
Expand Down

0 comments on commit ee47ee9

Please sign in to comment.