3288_Reload 串口UART4无法使用

按照维基的教学,在reload.dts文件中加入了
&uart_exp {
status = “okay”;
dma-names = “!tx”, “!rx”;
pinctrl-0 = <&uart4_xfer &uart4_cts>;
};
使能同时因为spi0的复用关系,关闭spi0
&spi0 {
status = “disabled”;}

3288.dtsi文件:
aliases {
serial0 = &uart_bt;
serial1 = &uart_bb;
serial2 = &uart_dbg;
serial3 = &uart_gps;
serial4 = &uart_exp;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
i2c3 = &i2c3;
i2c4 = &i2c4;
i2c5 = &i2c5;
lcdc0 = &lcdc0;
lcdc1 = &lcdc1;
//spi0 = &spi0;
spi1 = &spi1;
spi2 = &spi2;
};

编译后UART4还是无法连接外设,求问各位大神我是不是忽略的哪里没有设置

已经找到问题,是ttyS4的权限不够,无法读写

celticszhao 发表于 2017-3-31 15:55
已经找到问题,是ttyS4的权限不够,无法读写

怎么获取权限呢

zhang7013409 发表于 2017-4-6 11:54
怎么获取权限呢

init.connectivity.rc里面增加tty4的权限就可以了

celticszhao 发表于 2017-4-6 16:27
init.connectivity.rc里面增加tty4的权限就可以了

ttyS3是否用过

zhang7013409 发表于 2017-4-6 18:08
ttyS3是否用过

用过,一样的

请尝试修改如下代码
— a/kernel/drivers/tty/serial/rk_serial.c
+++ b/kernel/drivers/tty/serial/rk_serial.c
@@ -1425,6 +1425,7 @@ serial_rk_set_termios(struct uart_port port, struct ktermios termios,
baud = uart_get_baud_rate(port, termios, old,
port->uartclk / 16 / 0xffff,
port->uartclk / 16);
+/

if ( port->baud > 0 && port->line != 0)
{
baud = port->baud;
@@ -1434,6 +1435,7 @@ else
{
printk(“%d,baud is:%d\n”,port->line,baud);
}
+
/
quot = uart_get_divisor(port, baud);
//dev_info(up->port.dev, “uartclk:%d\n”, port->uartclk/16);
//dev_info(up->port.dev, “baud:%d\n”, baud);