int minor;/* 次设备号 */ int nr;/* 该uart_driver支持的串口个数(最大) */ struct console *cons;/* 其对应的console.若该uart_driver支持serial console,否则为NULL */ /* * these are private; the low level driver should not * touch
first) return; first = 0; // 标记为不是首次初始化 // 如果系统定义的UART端口数量大于硬件支持的最大数量,将其限制为最大支持数量 if (nr_uarts > UART_NR) nr_uarts = UART_NR; // 遍历所有定义的UART端口数量,初始化每个端口 for (i = 0; i < nr_uarts; i++) { struct uart_8250_port ...
int minor;/* 次设备号 */ int nr;/* 该uart_driver支持的串口个数(最大) */ struct console *cons;/* 其对应的console.若该uart_driver支持serial console,否则为NULL */ /* * these are private; the low level driver should not * touch these; they should be initialised to NULL */ struct u...
...2. cat include/linux/serial_core.h ...structuart_driver {structmodule *owner;constchar*driver_name;constchar*dev_name;intmajor;intminor;intnr;structconsole *cons;/** these are private; the low level driver should not * touch these; they should be initialised to NULL*/structuart_state...
7@@CONFIG_INPUT_RK805_PWRKEY=y# CONFIG_LEGACY_PTYS is not setCONFIG_SERIAL_8250=y# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set-CONFIG_SERIAL_8250_CONSOLE=y+#CONFIG_SERIAL_8250_CONSOLE=y# CONFIG_SERIAL_8250_PCI is not setCONFIG_SERIAL_8250_NR_UARTS=10CONFIG_SERIAL_8250_RUNTIME_UARTS...
root@testboard:~# zcat /proc/config.gz | grep -i 8250 CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DMA=y CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=10 CONFIG_SERIAL_8250_RUNTIME_UARTS=10 # CONFIG_SERIAL_8250_...
Note that because some devices historically used incorrect clashing numbering this may prevent you building a single kernel which can be booted on multiple platforms. And then we do .nr = CONFIG_SERIAL_SAMSUNG_UARTS, .cons = S3C24XX_SERIAL_CONSOLE, ...
7 @@ CONFIG_INPUT_RK805_PWRKEY=y # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set -CONFIG_SERIAL_8250_CONSOLE=y +#CONFIG_SERIAL_8250_CONSOLE=y # CONFIG_SERIAL_8250_PCI is not set CONFIG_SERIAL_8250_NR_UARTS=10 CONFIG_SERIAL_8250...
* 6_Linux_UART_device&driver_hacking * 声明: * 1. 目录脚本生成: * grep -v '^\s' 6_UART_hacking.txt | grep '\.' * 2. 该文章是在vim中编辑,请尽量是用vim来阅读,这样就不会出现缩进不对齐的问题; * 3. 本人阅读源码使用了ctags,强烈建议您使用类似高效的工具进行内核源代码阅读; ...