Qualcomm msm8255 serial port driver porting

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.