1. Add the following content to the onboard information:
A. first enter the kernel/ARCH/ARM/Mach-MSM/board-msm7x30.c In the struct platform_device * devices [] _ initdata {}; Add the variable & msm_devices_uart3,
Configure the variable struct msm_gpio uart3_config_data [] and configure gpio to the serial port mode. Complete the serial port configuration.
Static struct msm_gpio uart3_config_data [] = {
{Gpio_cfg (57, 1, gpio_cfg_output, gpio_cfg_no_pull, gpio_cfg_2ma ),
"Uart3_rfr "},
{Gpio_cfg (55, 1, gpio_cfg_input, gpio_cfg_no_pull, gpio_cfg_2ma ),
"Uart3_cts "},
{Gpio_cfg (53, 1, gpio_cfg_input, gpio_cfg_pull_up, gpio_cfg_8ma), "uart3_rx "},
{Gpio_cfg (54, 1, gpio_cfg_output, gpio_cfg_pull_up, gpio_cfg_8ma), "uart3_tx "},
};
Among them, "57" belongs to the pin number, "1" belongs to the mode (for example, "0" is the gpio mode, "1" is the serial port mode), and "gpio_cfg_output" is the input and output modes, the "gpio_1__no_pull" mode is pull-up or drop-down by default, and the "gpio_1__2ma" mode is used to drive the current capacity.
Static void msm7x30_init_uart3 (void)
{
Msm_gpios_request_enable (uart3_config_data,
Array_size (uart3_config_data ));
} // Enable the configuration function
Then, add msm7x30_init_uart3 to the _ init msm7x30_init () function.
2. The serial driver is in kernel/Drivers/serials/msm_serial.c. The device name of "ttymsm" is found in the msm_uart_driver variable.
In this way, the node ttymsm2.