mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 10:58:49 +08:00
arch/boards: Rename up_lowputc to [arm64|renesas]_lowputc
follow other arch coding style Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
da4e2671f5
commit
454921eac7
16 changed files with 30 additions and 35 deletions
|
@ -115,7 +115,7 @@ config ARCH_EARLY_PRINT
|
||||||
be not normal anymore. So we need to print something in arm64_head.S
|
be not normal anymore. So we need to print something in arm64_head.S
|
||||||
to debug this situation.
|
to debug this situation.
|
||||||
Enabling this option will need to implement up_earlyserialinit and
|
Enabling this option will need to implement up_earlyserialinit and
|
||||||
up_lowputc functions just you see in qemu, if you not sure,
|
arm64_lowputc functions just you see in qemu, if you not sure,
|
||||||
keeping the option disable.
|
keeping the option disable.
|
||||||
|
|
||||||
config ARCH_CORTEX_A53
|
config ARCH_CORTEX_A53
|
||||||
|
|
|
@ -68,9 +68,6 @@ extern "C"
|
||||||
|
|
||||||
void a64_board_initialize(void);
|
void a64_board_initialize(void);
|
||||||
|
|
||||||
void up_lowputc(char c);
|
|
||||||
void up_low_flush(void);
|
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,8 +83,8 @@ SECTION_FUNC(text, up_earlyserialinit)
|
||||||
* x0: Character to print
|
* x0: Character to print
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GTEXT(up_lowputc)
|
GTEXT(arm64_lowputc)
|
||||||
SECTION_FUNC(text, up_lowputc)
|
SECTION_FUNC(text, arm64_lowputc)
|
||||||
ldr x15, =UART0_BASE_ADDRESS
|
ldr x15, =UART0_BASE_ADDRESS
|
||||||
early_uart_ready x15, w2
|
early_uart_ready x15, w2
|
||||||
early_uart_transmit x15, w0
|
early_uart_transmit x15, w0
|
||||||
|
|
|
@ -640,10 +640,10 @@ int up_putc(int ch)
|
||||||
{
|
{
|
||||||
/* Add CR */
|
/* Add CR */
|
||||||
|
|
||||||
up_lowputc('\r');
|
arm64_lowputc('\r');
|
||||||
}
|
}
|
||||||
|
|
||||||
up_lowputc((uint8_t)ch);
|
arm64_lowputc((uint8_t)ch);
|
||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -706,10 +706,10 @@ int up_putc(int ch)
|
||||||
{
|
{
|
||||||
/* Add CR */
|
/* Add CR */
|
||||||
|
|
||||||
up_lowputc('\r');
|
arm64_lowputc('\r');
|
||||||
}
|
}
|
||||||
|
|
||||||
up_lowputc((uint8_t)ch);
|
arm64_lowputc((uint8_t)ch);
|
||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -326,7 +326,7 @@ boot_stage_puts:
|
||||||
cmp w0, 0
|
cmp w0, 0
|
||||||
beq 1f /* Exit on nul */
|
beq 1f /* Exit on nul */
|
||||||
stp xzr, x30, [sp, #-16]!
|
stp xzr, x30, [sp, #-16]!
|
||||||
bl up_lowputc
|
bl arm64_lowputc
|
||||||
ldp xzr, x30, [sp], #16
|
ldp xzr, x30, [sp], #16
|
||||||
b boot_stage_puts
|
b boot_stage_puts
|
||||||
1:
|
1:
|
||||||
|
|
|
@ -297,6 +297,8 @@ void arm64_serialinit(void);
|
||||||
void arm64_earlyserialinit(void);
|
void arm64_earlyserialinit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void arm64_lowputc(char c);
|
||||||
|
|
||||||
/* DMA */
|
/* DMA */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_DMA
|
#ifdef CONFIG_ARCH_DMA
|
||||||
|
|
|
@ -73,9 +73,6 @@ extern "C"
|
||||||
|
|
||||||
void fvp_board_initialize(void);
|
void fvp_board_initialize(void);
|
||||||
|
|
||||||
void up_lowputc(char c);
|
|
||||||
void up_low_flush(void);
|
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,8 +93,8 @@ SECTION_FUNC(text, up_earlyserialinit)
|
||||||
* x0: character to print
|
* x0: character to print
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GTEXT(up_lowputc)
|
GTEXT(arm64_lowputc)
|
||||||
SECTION_FUNC(text, up_lowputc)
|
SECTION_FUNC(text, arm64_lowputc)
|
||||||
ldr x15, =CONFIG_UART0_BASE
|
ldr x15, =CONFIG_UART0_BASE
|
||||||
early_uart_ready x15, w2
|
early_uart_ready x15, w2
|
||||||
early_uart_transmit x15, w0
|
early_uart_transmit x15, w0
|
||||||
|
|
|
@ -823,10 +823,10 @@ int up_putc(int ch)
|
||||||
{
|
{
|
||||||
/* Add CR */
|
/* Add CR */
|
||||||
|
|
||||||
up_lowputc('\r');
|
arm64_lowputc('\r');
|
||||||
}
|
}
|
||||||
|
|
||||||
up_lowputc((uint8_t)ch);
|
arm64_lowputc((uint8_t)ch);
|
||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -871,10 +871,10 @@ int up_putc(int ch)
|
||||||
{
|
{
|
||||||
/* Add CR */
|
/* Add CR */
|
||||||
|
|
||||||
up_lowputc('\r');
|
arm64_lowputc('\r');
|
||||||
}
|
}
|
||||||
|
|
||||||
up_lowputc((uint8_t)ch);
|
arm64_lowputc((uint8_t)ch);
|
||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,9 +74,6 @@ extern "C"
|
||||||
|
|
||||||
void qemu_board_initialize(void);
|
void qemu_board_initialize(void);
|
||||||
|
|
||||||
void up_lowputc(char c);
|
|
||||||
void up_low_flush(void);
|
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,8 +93,8 @@ SECTION_FUNC(text, up_earlyserialinit)
|
||||||
* x0: character to print
|
* x0: character to print
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GTEXT(up_lowputc)
|
GTEXT(arm64_lowputc)
|
||||||
SECTION_FUNC(text, up_lowputc)
|
SECTION_FUNC(text, arm64_lowputc)
|
||||||
ldr x15, =UART1_BASE_ADDRESS
|
ldr x15, =UART1_BASE_ADDRESS
|
||||||
early_uart_ready x15, w2
|
early_uart_ready x15, w2
|
||||||
early_uart_transmit x15, w0
|
early_uart_transmit x15, w0
|
||||||
|
|
|
@ -828,10 +828,10 @@ int up_putc(int ch)
|
||||||
{
|
{
|
||||||
/* Add CR */
|
/* Add CR */
|
||||||
|
|
||||||
up_lowputc('\r');
|
arm64_lowputc('\r');
|
||||||
}
|
}
|
||||||
|
|
||||||
up_lowputc((uint8_t)ch);
|
arm64_lowputc((uint8_t)ch);
|
||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -876,10 +876,10 @@ int up_putc(int ch)
|
||||||
{
|
{
|
||||||
/* Add CR */
|
/* Add CR */
|
||||||
|
|
||||||
up_lowputc('\r');
|
arm64_lowputc('\r');
|
||||||
}
|
}
|
||||||
|
|
||||||
up_lowputc((uint8_t)ch);
|
arm64_lowputc((uint8_t)ch);
|
||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -172,6 +172,8 @@ void renesas_consoleinit(void);
|
||||||
void renesas_serialinit(void);
|
void renesas_serialinit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void renesas_lowputc(char ch);
|
||||||
|
|
||||||
/* Defined in board/xyz_lcd.c */
|
/* Defined in board/xyz_lcd.c */
|
||||||
|
|
||||||
#ifdef CONFIG_SLCD_CONSOLE
|
#ifdef CONFIG_SLCD_CONSOLE
|
||||||
|
|
|
@ -96,14 +96,14 @@ void up_consoleinit(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_lowputc
|
* Name: renesas_lowputc
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Output one character on the console
|
* Output one character on the console
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void up_lowputc(char ch)
|
void renesas_lowputc(char ch)
|
||||||
{
|
{
|
||||||
up_lcdputc(ch);
|
up_lcdputc(ch);
|
||||||
}
|
}
|
||||||
|
|
|
@ -467,14 +467,14 @@ void board_crashdump(uintptr_t sp, struct tcb_s *tcb,
|
||||||
|
|
||||||
while (*dead)
|
while (*dead)
|
||||||
{
|
{
|
||||||
up_lowputc(*dead++);
|
renesas_lowputc(*dead++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (rv == -ENOSPC)
|
else if (rv == -ENOSPC)
|
||||||
{
|
{
|
||||||
/* hard fault again */
|
/* hard fault again */
|
||||||
|
|
||||||
up_lowputc('!');
|
renesas_lowputc('!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_RX65N_SAVE_CRASHDUMP */
|
#endif /* CONFIG_RX65N_SAVE_CRASHDUMP */
|
||||||
|
|
|
@ -464,14 +464,14 @@ void board_crashdump(uintptr_t sp, struct tcb_s *tcb,
|
||||||
|
|
||||||
while (*dead)
|
while (*dead)
|
||||||
{
|
{
|
||||||
up_lowputc(*dead++);
|
renesas_lowputc(*dead++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (rv == -ENOSPC)
|
else if (rv == -ENOSPC)
|
||||||
{
|
{
|
||||||
/* hard fault again */
|
/* hard fault again */
|
||||||
|
|
||||||
up_lowputc('!');
|
renesas_lowputc('!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_RX65N_SAVE_CRASHDUMP */
|
#endif /* CONFIG_RX65N_SAVE_CRASHDUMP */
|
||||||
|
|
Loading…
Reference in a new issue