From: Kuibao Zhang Date: Fri, 7 Sep 2018 07:45:56 +0000 (+0800) Subject: BT: porting cpy 2704 X-Git-Tag: khadas-vims-v0.9.6-release~1293 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=655155d97848cc893b75cfc284f480652d4a9064;p=platform%2Fkernel%2Flinux-amlogic.git BT: porting cpy 2704 PD#172583: bt power and uart rts Change-Id: I392b3caf0771c9608d532694ecd16b52dccf05a3 Signed-off-by: Kuibao Zhang --- diff --git a/drivers/amlogic/uart/meson_uart.c b/drivers/amlogic/uart/meson_uart.c index d6ea1ad..811e362 100644 --- a/drivers/amlogic/uart/meson_uart.c +++ b/drivers/amlogic/uart/meson_uart.c @@ -162,7 +162,7 @@ __setup("printk_no_block", new_printk_enable); module_param_named(new_printk, new_printk_enabled, - bool, S_IRUGO | S_IWUSR); + bool, 0644); MODULE_PARM_DESC(new_printk, "printk use no block mode"); @@ -181,7 +181,7 @@ static ssize_t printk_mode_store(struct device_driver *drv, const char *buf, return count; } -static DRIVER_ATTR(printkmode, S_IRUGO | S_IWUSR, printk_mode_show, +static DRIVER_ATTR(printkmode, 0644, printk_mode_show, printk_mode_store); @@ -203,7 +203,7 @@ static ssize_t support_sysrq_store(struct device_driver *drv, const char *buf, return count; } -static DRIVER_ATTR(sysrqsupport, S_IRUGO | S_IWUSR, support_sysrq_show, +static DRIVER_ATTR(sysrqsupport, 0644, support_sysrq_show, support_sysrq_store); @@ -346,6 +346,7 @@ static void meson_uart_shutdown(struct uart_port *port) val = readl(port->membase + AML_UART_CONTROL); val &= ~(AML_UART_RX_EN | AML_UART_TX_EN); val &= ~(AML_UART_RX_INT_EN | AML_UART_TX_INT_EN); + val |= UART_CTS_EN; writel(val, port->membase + AML_UART_CONTROL); spin_unlock_irqrestore(&port->lock, flags); @@ -526,6 +527,7 @@ static int meson_uart_startup(struct uart_port *port) writel(val, port->membase + AML_UART_CONTROL); val |= (AML_UART_RX_INT_EN | AML_UART_TX_INT_EN); + val &= ~UART_CTS_EN; writel(val, port->membase + AML_UART_CONTROL); return ret; @@ -708,6 +710,9 @@ static int meson_uart_request_port(struct uart_port *port) val = (AML_UART_RECV_IRQ(1) | AML_UART_XMIT_IRQ(port->fifosize / 2)); writel(val, port->membase + AML_UART_MISC); + writel(readl(port->membase + AML_UART_CONTROL) | UART_CTS_EN, + port->membase + AML_UART_CONTROL); + ret = request_irq(port->irq, meson_uart_interrupt, 0, meson_uart_type(port), port); return 0; diff --git a/drivers/amlogic/uart/meson_uart.h b/drivers/amlogic/uart/meson_uart.h index af16c6a..21bd8eb 100644 --- a/drivers/amlogic/uart/meson_uart.h +++ b/drivers/amlogic/uart/meson_uart.h @@ -36,7 +36,7 @@ #define UART_RXRST (0x01<<23) #define UART_RXINT_EN (0x01<<27) #define UART_TXINT_EN (0x01<<28) - +#define UART_CTS_EN (0x01<<31) #define UART_WFIFO 0 #define UART_RFIFO 1 #define UART_CONTROL 2