mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-28 00:11:32 +00:00
serial: Replace CONFIG_DEBUG_UART_BASE by CONFIG_VAL(DEBUG_UART_BASE)
CONFIG_VAL(DEBUG_UART_BASE) expands to CONFIG_DEBUG_UART_BASE or
CONFIG_SPL_DEBUG_UART_BASE or CONFIG_TPL_DEBUG_UART_BASE and allows boards
to set different values for SPL, TPL and U-Boot Proper.
For ns16550 driver this support is there since commit d293759d55
("serial: ns16550: Add support for SPL_DEBUG_UART_BASE").
Signed-off-by: Pali Rohár <pali@kernel.org>
This commit is contained in:
parent
24272ffd50
commit
b62450cf22
24 changed files with 45 additions and 45 deletions
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
static void _debug_uart_putc(int c)
|
static void _debug_uart_putc(int c)
|
||||||
{
|
{
|
||||||
void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
|
void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (!(readl(base + UNIPHIER_UART_LSR) & UART_LSR_THRE))
|
while (!(readl(base + UNIPHIER_UART_LSR) & UART_LSR_THRE))
|
||||||
;
|
;
|
||||||
|
@ -57,7 +57,7 @@ void sg_set_iectrl(unsigned int pin)
|
||||||
void _debug_uart_init(void)
|
void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SPL_BUILD
|
#ifdef CONFIG_SPL_BUILD
|
||||||
void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
|
void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
unsigned int divisor;
|
unsigned int divisor;
|
||||||
|
|
||||||
switch (uniphier_get_soc_id()) {
|
switch (uniphier_get_soc_id()) {
|
||||||
|
|
|
@ -72,7 +72,7 @@ static void pch_uart_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_UART
|
#ifdef CONFIG_DEBUG_UART
|
||||||
apl_uart_init(PCH_DEV_UART, CONFIG_DEBUG_UART_BASE);
|
apl_uart_init(PCH_DEV_UART, CONFIG_VAL(DEBUG_UART_BASE));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -273,7 +273,7 @@ void board_debug_uart_init(void)
|
||||||
setup_early_clocks();
|
setup_early_clocks();
|
||||||
|
|
||||||
/* done by pin controller driver if not debugging */
|
/* done by pin controller driver if not debugging */
|
||||||
enable_uart_pin_mux(CONFIG_DEBUG_UART_BASE);
|
enable_uart_pin_mux(CONFIG_VAL(DEBUG_UART_BASE));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ static inline void _debug_uart_init(void)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
struct altera_jtaguart_regs *regs = (void *)CONFIG_DEBUG_UART_BASE;
|
struct altera_jtaguart_regs *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
u32 st = readl(®s->control);
|
u32 st = readl(®s->control);
|
||||||
|
|
|
@ -123,7 +123,7 @@ U_BOOT_DRIVER(altera_uart) = {
|
||||||
|
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
struct altera_uart_regs *regs = (void *)CONFIG_DEBUG_UART_BASE;
|
struct altera_uart_regs *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
u32 div;
|
u32 div;
|
||||||
|
|
||||||
div = (CONFIG_DEBUG_UART_CLOCK / CONFIG_BAUDRATE) - 1;
|
div = (CONFIG_DEBUG_UART_CLOCK / CONFIG_BAUDRATE) - 1;
|
||||||
|
@ -132,7 +132,7 @@ static inline void _debug_uart_init(void)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
struct altera_uart_regs *regs = (void *)CONFIG_DEBUG_UART_BASE;
|
struct altera_uart_regs *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
u32 st = readl(®s->status);
|
u32 st = readl(®s->status);
|
||||||
|
|
|
@ -319,14 +319,14 @@ U_BOOT_DRIVER(serial_atmel) = {
|
||||||
#ifdef CONFIG_DEBUG_UART_ATMEL
|
#ifdef CONFIG_DEBUG_UART_ATMEL
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_DEBUG_UART_BASE;
|
atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
_atmel_serial_init(usart, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
|
_atmel_serial_init(usart, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_DEBUG_UART_BASE;
|
atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (!(readl(&usart->csr) & USART3_BIT(TXRDY)))
|
while (!(readl(&usart->csr) & USART3_BIT(TXRDY)))
|
||||||
;
|
;
|
||||||
|
|
|
@ -199,7 +199,7 @@ U_BOOT_DRIVER(serial_ar933x) = {
|
||||||
|
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
void __iomem *regs = (void *)CONFIG_DEBUG_UART_BASE;
|
void __iomem *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
u32 val, scale, step;
|
u32 val, scale, step;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -227,7 +227,7 @@ static inline void _debug_uart_init(void)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int c)
|
static inline void _debug_uart_putc(int c)
|
||||||
{
|
{
|
||||||
void __iomem *regs = (void *)CONFIG_DEBUG_UART_BASE;
|
void __iomem *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
u32 data;
|
u32 data;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
|
|
@ -137,7 +137,7 @@ U_BOOT_DRIVER(serial_arc) = {
|
||||||
|
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_DEBUG_UART_BASE;
|
struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
int arc_console_baud = CONFIG_DEBUG_UART_CLOCK / (CONFIG_BAUDRATE * 4) - 1;
|
int arc_console_baud = CONFIG_DEBUG_UART_CLOCK / (CONFIG_BAUDRATE * 4) - 1;
|
||||||
|
|
||||||
writeb(arc_console_baud & 0xff, ®s->baudl);
|
writeb(arc_console_baud & 0xff, ®s->baudl);
|
||||||
|
@ -146,7 +146,7 @@ static inline void _debug_uart_init(void)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int c)
|
static inline void _debug_uart_putc(int c)
|
||||||
{
|
{
|
||||||
struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_DEBUG_UART_BASE;
|
struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (!(readb(®s->status) & UART_TXEMPTY))
|
while (!(readb(®s->status) & UART_TXEMPTY))
|
||||||
;
|
;
|
||||||
|
|
|
@ -269,7 +269,7 @@ U_BOOT_DRIVER(bcm6345_serial) = {
|
||||||
#ifdef CONFIG_DEBUG_UART_BCM6345
|
#ifdef CONFIG_DEBUG_UART_BCM6345
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
|
void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
bcm6345_serial_init(base, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
|
bcm6345_serial_init(base, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
|
||||||
}
|
}
|
||||||
|
@ -285,7 +285,7 @@ static inline void wait_xfered(void __iomem *base)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
|
void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
wait_xfered(base);
|
wait_xfered(base);
|
||||||
writel(ch, base + UART_FIFO_REG);
|
writel(ch, base + UART_FIFO_REG);
|
||||||
|
|
|
@ -201,14 +201,14 @@ U_BOOT_DRIVER(serial_linflex) = {
|
||||||
|
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
struct linflex_fsl *base = (struct linflex_fsl *)CONFIG_DEBUG_UART_BASE;
|
struct linflex_fsl *base = (struct linflex_fsl *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
linflex_serial_init_internal(base);
|
linflex_serial_init_internal(base);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
struct linflex_fsl *base = (struct linflex_fsl *)CONFIG_DEBUG_UART_BASE;
|
struct linflex_fsl *base = (struct linflex_fsl *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
/* XXX: Is this OK? Should this use the non-DM version? */
|
/* XXX: Is this OK? Should this use the non-DM version? */
|
||||||
_linflex_serial_putc(base, ch);
|
_linflex_serial_putc(base, ch);
|
||||||
|
|
|
@ -182,7 +182,7 @@ static inline void _debug_uart_init(void)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
struct meson_uart *regs = (struct meson_uart *)CONFIG_DEBUG_UART_BASE;
|
struct meson_uart *regs = (struct meson_uart *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (readl(®s->status) & AML_UART_TX_FULL)
|
while (readl(®s->status) & AML_UART_TX_FULL)
|
||||||
;
|
;
|
||||||
|
|
|
@ -569,7 +569,7 @@ U_BOOT_DRIVER(serial_msm_geni) = {
|
||||||
#ifdef CONFIG_DEBUG_UART_MSM_GENI
|
#ifdef CONFIG_DEBUG_UART_MSM_GENI
|
||||||
|
|
||||||
static struct msm_serial_data init_serial_data = {
|
static struct msm_serial_data init_serial_data = {
|
||||||
.base = CONFIG_DEBUG_UART_BASE
|
.base = CONFIG_VAL(DEBUG_UART_BASE)
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Serial dumb device, to reuse driver code */
|
/* Serial dumb device, to reuse driver code */
|
||||||
|
@ -587,7 +587,7 @@ static struct udevice init_dev = {
|
||||||
|
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
phys_addr_t base = CONFIG_DEBUG_UART_BASE;
|
phys_addr_t base = CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
geni_serial_init(&init_dev);
|
geni_serial_init(&init_dev);
|
||||||
geni_serial_baud(base, CLK_DIV, CONFIG_BAUDRATE);
|
geni_serial_baud(base, CLK_DIV, CONFIG_BAUDRATE);
|
||||||
|
@ -596,7 +596,7 @@ static inline void _debug_uart_init(void)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
phys_addr_t base = CONFIG_DEBUG_UART_BASE;
|
phys_addr_t base = CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
writel(DEF_TX_WM, base + SE_GENI_TX_WATERMARK_REG);
|
writel(DEF_TX_WM, base + SE_GENI_TX_WATERMARK_REG);
|
||||||
qcom_geni_serial_setup_tx(base, 1);
|
qcom_geni_serial_setup_tx(base, 1);
|
||||||
|
|
|
@ -220,7 +220,7 @@ static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
struct mt7620_serial_plat plat;
|
struct mt7620_serial_plat plat;
|
||||||
|
|
||||||
plat.regs = (void *)CONFIG_DEBUG_UART_BASE;
|
plat.regs = (void *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
plat.clock = CONFIG_DEBUG_UART_CLOCK;
|
plat.clock = CONFIG_DEBUG_UART_CLOCK;
|
||||||
|
|
||||||
writel(0, &plat.regs->ier);
|
writel(0, &plat.regs->ier);
|
||||||
|
@ -233,7 +233,7 @@ static inline void _debug_uart_init(void)
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
struct mt7620_serial_regs __iomem *regs =
|
struct mt7620_serial_regs __iomem *regs =
|
||||||
(void *)CONFIG_DEBUG_UART_BASE;
|
(void *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (!(readl(®s->lsr) & UART_LSR_THRE))
|
while (!(readl(®s->lsr) & UART_LSR_THRE))
|
||||||
;
|
;
|
||||||
|
|
|
@ -426,7 +426,7 @@ static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
struct mtk_serial_priv priv;
|
struct mtk_serial_priv priv;
|
||||||
|
|
||||||
priv.regs = (void *) CONFIG_DEBUG_UART_BASE;
|
priv.regs = (void *) CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
priv.clock = CONFIG_DEBUG_UART_CLOCK;
|
priv.clock = CONFIG_DEBUG_UART_CLOCK;
|
||||||
|
|
||||||
writel(0, &priv.regs->ier);
|
writel(0, &priv.regs->ier);
|
||||||
|
@ -439,7 +439,7 @@ static inline void _debug_uart_init(void)
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
struct mtk_serial_regs __iomem *regs =
|
struct mtk_serial_regs __iomem *regs =
|
||||||
(void *) CONFIG_DEBUG_UART_BASE;
|
(void *) CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (!(readl(®s->lsr) & UART_LSR_THRE))
|
while (!(readl(®s->lsr) & UART_LSR_THRE))
|
||||||
;
|
;
|
||||||
|
|
|
@ -321,7 +321,7 @@ U_BOOT_DRIVER(serial_mvebu) = {
|
||||||
|
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
|
void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
u32 parent_rate, divider;
|
u32 parent_rate, divider;
|
||||||
|
|
||||||
/* reset FIFOs */
|
/* reset FIFOs */
|
||||||
|
@ -349,7 +349,7 @@ static inline void _debug_uart_init(void)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
|
void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (readl(base + UART_STATUS_REG) & UART_STATUS_TXFIFO_FULL)
|
while (readl(base + UART_STATUS_REG) & UART_STATUS_TXFIFO_FULL)
|
||||||
;
|
;
|
||||||
|
|
|
@ -372,7 +372,7 @@ U_BOOT_DRIVER(serial_mxc) = {
|
||||||
|
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
struct mxc_uart *base = (struct mxc_uart *)CONFIG_DEBUG_UART_BASE;
|
struct mxc_uart *base = (struct mxc_uart *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
_mxc_serial_init(base, false);
|
_mxc_serial_init(base, false);
|
||||||
_mxc_serial_setbrg(base, CONFIG_DEBUG_UART_CLOCK,
|
_mxc_serial_setbrg(base, CONFIG_DEBUG_UART_CLOCK,
|
||||||
|
@ -381,7 +381,7 @@ static inline void _debug_uart_init(void)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
struct mxc_uart *base = (struct mxc_uart *)CONFIG_DEBUG_UART_BASE;
|
struct mxc_uart *base = (struct mxc_uart *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (!(readl(&base->ts) & UTS_TXEMPTY))
|
while (!(readl(&base->ts) & UTS_TXEMPTY))
|
||||||
WATCHDOG_RESET();
|
WATCHDOG_RESET();
|
||||||
|
|
|
@ -66,7 +66,7 @@ static inline int serial_in_shift(void *addr, int shift)
|
||||||
|
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE;
|
struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
int baud_divisor;
|
int baud_divisor;
|
||||||
|
|
||||||
baud_divisor = ns16550_calc_divisor(com_port, CONFIG_DEBUG_UART_CLOCK,
|
baud_divisor = ns16550_calc_divisor(com_port, CONFIG_DEBUG_UART_CLOCK,
|
||||||
|
@ -85,7 +85,7 @@ static inline void _debug_uart_init(void)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE;
|
struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (!(serial_din(&com_port->lsr) & UART_LSR_THRE))
|
while (!(serial_din(&com_port->lsr) & UART_LSR_THRE))
|
||||||
;
|
;
|
||||||
|
|
|
@ -187,14 +187,14 @@ U_BOOT_DRIVER(pic32_serial) = {
|
||||||
|
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
|
void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
pic32_serial_init(base, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
|
pic32_serial_init(base, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
writel(ch, CONFIG_DEBUG_UART_BASE + U_TXR);
|
writel(ch, CONFIG_VAL(DEBUG_UART_BASE) + U_TXR);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_UART_FUNCS
|
DEBUG_UART_FUNCS
|
||||||
|
|
|
@ -403,7 +403,7 @@ U_BOOT_DRIVER(serial_pl01x) = {
|
||||||
static void _debug_uart_init(void)
|
static void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_DEBUG_UART_SKIP_INIT
|
#ifndef CONFIG_DEBUG_UART_SKIP_INIT
|
||||||
struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_DEBUG_UART_BASE;
|
struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
enum pl01x_type type;
|
enum pl01x_type type;
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_DEBUG_UART_PL011))
|
if (IS_ENABLED(CONFIG_DEBUG_UART_PL011))
|
||||||
|
@ -419,7 +419,7 @@ static void _debug_uart_init(void)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_DEBUG_UART_BASE;
|
struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (pl01x_putc(regs, ch) == -EAGAIN)
|
while (pl01x_putc(regs, ch) == -EAGAIN)
|
||||||
;
|
;
|
||||||
|
|
|
@ -276,7 +276,7 @@ static inline void _debug_uart_init(void)
|
||||||
if (IS_ENABLED(CONFIG_DEBUG_UART_SKIP_INIT))
|
if (IS_ENABLED(CONFIG_DEBUG_UART_SKIP_INIT))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
struct s5p_uart *uart = (struct s5p_uart *)CONFIG_DEBUG_UART_BASE;
|
struct s5p_uart *uart = (struct s5p_uart *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
s5p_serial_init(uart);
|
s5p_serial_init(uart);
|
||||||
#if CONFIG_IS_ENABLED(ARCH_APPLE)
|
#if CONFIG_IS_ENABLED(ARCH_APPLE)
|
||||||
|
@ -288,7 +288,7 @@ static inline void _debug_uart_init(void)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
struct s5p_uart *uart = (struct s5p_uart *)CONFIG_DEBUG_UART_BASE;
|
struct s5p_uart *uart = (struct s5p_uart *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
#if CONFIG_IS_ENABLED(ARCH_APPLE)
|
#if CONFIG_IS_ENABLED(ARCH_APPLE)
|
||||||
while (readl(&uart->ufstat) & S5L_TX_FIFO_FULL);
|
while (readl(&uart->ufstat) & S5L_TX_FIFO_FULL);
|
||||||
|
|
|
@ -212,7 +212,7 @@ U_BOOT_DRIVER(serial_sifive) = {
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
struct uart_sifive *regs =
|
struct uart_sifive *regs =
|
||||||
(struct uart_sifive *)CONFIG_DEBUG_UART_BASE;
|
(struct uart_sifive *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
_sifive_serial_setbrg(regs, CONFIG_DEBUG_UART_CLOCK,
|
_sifive_serial_setbrg(regs, CONFIG_DEBUG_UART_CLOCK,
|
||||||
CONFIG_BAUDRATE);
|
CONFIG_BAUDRATE);
|
||||||
|
@ -222,7 +222,7 @@ static inline void _debug_uart_init(void)
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
struct uart_sifive *regs =
|
struct uart_sifive *regs =
|
||||||
(struct uart_sifive *)CONFIG_DEBUG_UART_BASE;
|
(struct uart_sifive *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (_sifive_serial_putc(regs, ch) == -EAGAIN)
|
while (_sifive_serial_putc(regs, ch) == -EAGAIN)
|
||||||
WATCHDOG_RESET();
|
WATCHDOG_RESET();
|
||||||
|
|
|
@ -270,7 +270,7 @@ static inline struct stm32_uart_info *_debug_uart_info(void)
|
||||||
|
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
fdt_addr_t base = CONFIG_DEBUG_UART_BASE;
|
fdt_addr_t base = CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
struct stm32_uart_info *uart_info = _debug_uart_info();
|
struct stm32_uart_info *uart_info = _debug_uart_info();
|
||||||
|
|
||||||
_stm32_serial_init(base, uart_info);
|
_stm32_serial_init(base, uart_info);
|
||||||
|
@ -281,7 +281,7 @@ static inline void _debug_uart_init(void)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int c)
|
static inline void _debug_uart_putc(int c)
|
||||||
{
|
{
|
||||||
fdt_addr_t base = CONFIG_DEBUG_UART_BASE;
|
fdt_addr_t base = CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
struct stm32_uart_info *uart_info = _debug_uart_info();
|
struct stm32_uart_info *uart_info = _debug_uart_info();
|
||||||
|
|
||||||
while (_stm32_serial_putc(base, uart_info, c) == -EAGAIN)
|
while (_stm32_serial_putc(base, uart_info, c) == -EAGAIN)
|
||||||
|
|
|
@ -143,7 +143,7 @@ U_BOOT_DRIVER(serial_uartlite) = {
|
||||||
|
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
struct uartlite *regs = (struct uartlite *)CONFIG_DEBUG_UART_BASE;
|
struct uartlite *regs = (struct uartlite *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
uart_out32(®s->control, 0);
|
uart_out32(®s->control, 0);
|
||||||
|
@ -159,7 +159,7 @@ static inline void _debug_uart_init(void)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
struct uartlite *regs = (struct uartlite *)CONFIG_DEBUG_UART_BASE;
|
struct uartlite *regs = (struct uartlite *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (uart_in32(®s->status) & SR_TX_FIFO_FULL)
|
while (uart_in32(®s->status) & SR_TX_FIFO_FULL)
|
||||||
;
|
;
|
||||||
|
|
|
@ -295,7 +295,7 @@ U_BOOT_DRIVER(serial_zynq) = {
|
||||||
#ifdef CONFIG_DEBUG_UART_ZYNQ
|
#ifdef CONFIG_DEBUG_UART_ZYNQ
|
||||||
static inline void _debug_uart_init(void)
|
static inline void _debug_uart_init(void)
|
||||||
{
|
{
|
||||||
struct uart_zynq *regs = (struct uart_zynq *)CONFIG_DEBUG_UART_BASE;
|
struct uart_zynq *regs = (struct uart_zynq *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
_uart_zynq_serial_init(regs);
|
_uart_zynq_serial_init(regs);
|
||||||
_uart_zynq_serial_setbrg(regs, CONFIG_DEBUG_UART_CLOCK,
|
_uart_zynq_serial_setbrg(regs, CONFIG_DEBUG_UART_CLOCK,
|
||||||
|
@ -304,7 +304,7 @@ static inline void _debug_uart_init(void)
|
||||||
|
|
||||||
static inline void _debug_uart_putc(int ch)
|
static inline void _debug_uart_putc(int ch)
|
||||||
{
|
{
|
||||||
struct uart_zynq *regs = (struct uart_zynq *)CONFIG_DEBUG_UART_BASE;
|
struct uart_zynq *regs = (struct uart_zynq *)CONFIG_VAL(DEBUG_UART_BASE);
|
||||||
|
|
||||||
while (_uart_zynq_serial_putc(regs, ch) == -EAGAIN)
|
while (_uart_zynq_serial_putc(regs, ch) == -EAGAIN)
|
||||||
WATCHDOG_RESET();
|
WATCHDOG_RESET();
|
||||||
|
|
Loading…
Add table
Reference in a new issue