1.相关文件
drivers/serial/serial_pl01x.h
drivers/serial/serial_pl01x.c
drivers/serial/serial,c
drivers/serial/serial_pl01x.c
// CONFIG_CONS_INDEX 定义在 include\configs\s5p4418_nanopi2.h 值为 CFG_UART_DEBUG_CH
// CFG_UART_DEBUG_CH 定义在 board\s5p4418\nanopi2\include\cfg_main.h 值为 0
#define CONSOLE_PORT CONFIG_CONS_INDEX
// CONFIG_PL01x_PORTS 定义在 include\configs\s5p4418_nanopi2.h 值为 { (void *)IO_ADDRESS(PHY_BASEADDR_UART0), (void *)IO_ADDRESS(PHY_BASEADDR_UART1) }
// PHY_BASEADDR_UART0 PHY_BASEADDR_UART1 定义在 arch\arm\include\asm\arch-s5p4418\s5p4418.h 值为 0xC00A1000
// 0xC00A0000
static volatile unsigned char *const port[] = CONFIG_PL01x_PORTS;
#define NUM_PORTS (sizeof(port)/sizeof(port[0]))
// CFG_UART_DEBUG_CH 定义在 board\s5p4418\nanopi2\include\cfg_main.h 值为 0
#define CONSOLE_PORT CONFIG_CONS_INDEX
// CONFIG_PL01x_PORTS 定义在 include\configs\s5p4418_nanopi2.h 值为 { (void *)IO_ADDRESS(PHY_BASEADDR_UART0), (void *)IO_ADDRESS(PHY_BASEADDR_UART1) }
// PHY_BASEADDR_UART0 PHY_BASEADDR_UART1 定义在 arch\arm\include\asm\arch-s5p4418\s5p4418.h 值为 0xC00A1000
// 0xC00A0000
static volatile unsigned char *const port[] = CONFIG_PL01x_PORTS;
#define NUM_PORTS (sizeof(port)/sizeof(port[0]))