* [PATCH 1/3] serial: sirf: drop redundant pinctrl_get_select_default as pinctrl core does it
@ 2013-08-13 11:18 Barry Song
2013-08-13 11:18 ` [PATCH 2/3] serial: sirf: fix the hardware-flow-ctrl for USP-based UART Barry Song
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Barry Song @ 2013-08-13 11:18 UTC (permalink / raw)
To: gregkh, linux-serial; +Cc: workgroup.linux, Barry Song, Linus Walleij
pinctrl core will get default pinmux, so drop it in the sirfsoc serial driver.
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
---
drivers/tty/serial/sirfsoc_uart.c | 12 ------------
drivers/tty/serial/sirfsoc_uart.h | 1 -
2 files changed, 13 deletions(-)
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
index 3b9382b..64d0192 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -22,7 +22,6 @@
#include <linux/io.h>
#include <asm/irq.h>
#include <asm/mach/irq.h>
-#include <linux/pinctrl/consumer.h>
#include "sirfsoc_uart.h"
@@ -893,13 +892,6 @@ static int sirfsoc_uart_probe(struct platform_device *pdev)
}
port->irq = res->start;
- if (sirfport->hw_flow_ctrl) {
- sirfport->p = pinctrl_get_select_default(&pdev->dev);
- ret = IS_ERR(sirfport->p);
- if (ret)
- goto err;
- }
-
sirfport->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(sirfport->clk)) {
ret = PTR_ERR(sirfport->clk);
@@ -925,8 +917,6 @@ port_err:
clk_put(sirfport->clk);
clk_err:
platform_set_drvdata(pdev, NULL);
- if (sirfport->hw_flow_ctrl)
- pinctrl_put(sirfport->p);
err:
return ret;
}
@@ -936,8 +926,6 @@ static int sirfsoc_uart_remove(struct platform_device *pdev)
struct sirfsoc_uart_port *sirfport = platform_get_drvdata(pdev);
struct uart_port *port = &sirfport->port;
platform_set_drvdata(pdev, NULL);
- if (sirfport->hw_flow_ctrl)
- pinctrl_put(sirfport->p);
clk_disable_unprepare(sirfport->clk);
clk_put(sirfport->clk);
uart_remove_one_port(&sirfsoc_uart_drv, port);
diff --git a/drivers/tty/serial/sirfsoc_uart.h b/drivers/tty/serial/sirfsoc_uart.h
index 6f6d275..2b41b06 100644
--- a/drivers/tty/serial/sirfsoc_uart.h
+++ b/drivers/tty/serial/sirfsoc_uart.h
@@ -367,7 +367,6 @@ struct sirfsoc_uart_port {
unsigned char ms_enabled;
struct uart_port port;
- struct pinctrl *p;
struct clk *clk;
/* for SiRFmarco, there are SET/CLR for UART_INT_EN */
bool is_marco;
--
1.8.2.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] serial: sirf: fix the hardware-flow-ctrl for USP-based UART
2013-08-13 11:18 [PATCH 1/3] serial: sirf: drop redundant pinctrl_get_select_default as pinctrl core does it Barry Song
@ 2013-08-13 11:18 ` Barry Song
2013-08-13 11:18 ` [PATCH 3/3] serial: sirf: add DT-binding document to describle detailed properties Barry Song
2013-08-14 19:11 ` [PATCH 1/3] serial: sirf: drop redundant pinctrl_get_select_default as pinctrl core does it Greg KH
2 siblings, 0 replies; 5+ messages in thread
From: Barry Song @ 2013-08-13 11:18 UTC (permalink / raw)
To: gregkh, linux-serial; +Cc: workgroup.linux, Qipan Li, Barry Song
From: Qipan Li <Qipan.Li@csr.com>
for USP-based UART, we use two gpios as RTS and CST pins.
Signed-off-by: Qipan Li <Qipan.Li@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
---
drivers/tty/serial/sirfsoc_uart.c | 161 ++++++++++++++++++++++++++++----------
drivers/tty/serial/sirfsoc_uart.h | 6 +-
2 files changed, 122 insertions(+), 45 deletions(-)
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
index 64d0192..caf26ec 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -20,6 +20,7 @@
#include <linux/of.h>
#include <linux/slab.h>
#include <linux/io.h>
+#include <linux/of_gpio.h>
#include <asm/irq.h>
#include <asm/mach/irq.h>
@@ -110,14 +111,19 @@ static unsigned int sirfsoc_uart_get_mctrl(struct uart_port *port)
{
struct sirfsoc_uart_port *sirfport = to_sirfport(port);
struct sirfsoc_register *ureg = &sirfport->uart_reg->uart_reg;
- if (!(sirfport->ms_enabled)) {
+ if (!sirfport->hw_flow_ctrl || !sirfport->ms_enabled)
goto cts_asserted;
- } else if (sirfport->hw_flow_ctrl) {
+ if (sirfport->uart_reg->uart_type == SIRF_REAL_UART) {
if (!(rd_regl(port, ureg->sirfsoc_afc_ctrl) &
SIRFUART_AFC_CTS_STATUS))
goto cts_asserted;
else
goto cts_deasserted;
+ } else {
+ if (!gpio_get_value(sirfport->cts_gpio))
+ goto cts_asserted;
+ else
+ goto cts_deasserted;
}
cts_deasserted:
return TIOCM_CAR | TIOCM_DSR;
@@ -132,10 +138,18 @@ static void sirfsoc_uart_set_mctrl(struct uart_port *port, unsigned int mctrl)
unsigned int assert = mctrl & TIOCM_RTS;
unsigned int val = assert ? SIRFUART_AFC_CTRL_RX_THD : 0x0;
unsigned int current_val;
- if (sirfport->hw_flow_ctrl) {
+
+ if (!sirfport->hw_flow_ctrl || !sirfport->ms_enabled)
+ return;
+ if (sirfport->uart_reg->uart_type == SIRF_REAL_UART) {
current_val = rd_regl(port, ureg->sirfsoc_afc_ctrl) & ~0xFF;
val |= current_val;
wr_regl(port, ureg->sirfsoc_afc_ctrl, val);
+ } else {
+ if (!val)
+ gpio_set_value(sirfport->rts_gpio, 1);
+ else
+ gpio_set_value(sirfport->rts_gpio, 0);
}
}
@@ -195,21 +209,32 @@ static void sirfsoc_uart_disable_ms(struct uart_port *port)
struct sirfsoc_uart_port *sirfport = to_sirfport(port);
struct sirfsoc_register *ureg = &sirfport->uart_reg->uart_reg;
struct sirfsoc_int_en *uint_en = &sirfport->uart_reg->uart_int_en;
- unsigned long reg;
- sirfport->ms_enabled = 0;
if (!sirfport->hw_flow_ctrl)
return;
-
- reg = rd_regl(port, ureg->sirfsoc_afc_ctrl);
- wr_regl(port, ureg->sirfsoc_afc_ctrl, reg & ~0x3FF);
- if (!sirfport->is_marco) {
- reg = rd_regl(port, ureg->sirfsoc_int_en_reg);
- wr_regl(port, ureg->sirfsoc_int_en_reg,
- reg & ~uint_en->sirfsoc_cts_en);
+ sirfport->ms_enabled = false;
+ if (sirfport->uart_reg->uart_type == SIRF_REAL_UART) {
+ wr_regl(port, ureg->sirfsoc_afc_ctrl,
+ rd_regl(port, ureg->sirfsoc_afc_ctrl) & ~0x3FF);
+ if (!sirfport->is_marco)
+ wr_regl(port, ureg->sirfsoc_int_en_reg,
+ rd_regl(port, ureg->sirfsoc_int_en_reg)&
+ ~uint_en->sirfsoc_cts_en);
+ else
+ wr_regl(port, SIRFUART_INT_EN_CLR,
+ uint_en->sirfsoc_cts_en);
} else
- wr_regl(port, SIRFUART_INT_EN_CLR,
- uint_en->sirfsoc_cts_en);
+ disable_irq(gpio_to_irq(sirfport->cts_gpio));
+}
+
+static irqreturn_t sirfsoc_uart_usp_cts_handler(int irq, void *dev_id)
+{
+ struct sirfsoc_uart_port *sirfport = (struct sirfsoc_uart_port *)dev_id;
+ struct uart_port *port = &sirfport->port;
+ if (gpio_is_valid(sirfport->cts_gpio) && sirfport->ms_enabled)
+ uart_handle_cts_change(port,
+ !gpio_get_value(sirfport->cts_gpio));
+ return IRQ_HANDLED;
}
static void sirfsoc_uart_enable_ms(struct uart_port *port)
@@ -217,25 +242,23 @@ static void sirfsoc_uart_enable_ms(struct uart_port *port)
struct sirfsoc_uart_port *sirfport = to_sirfport(port);
struct sirfsoc_register *ureg = &sirfport->uart_reg->uart_reg;
struct sirfsoc_int_en *uint_en = &sirfport->uart_reg->uart_int_en;
- unsigned long reg;
- unsigned long flg;
if (!sirfport->hw_flow_ctrl)
return;
- flg = SIRFUART_AFC_TX_EN | SIRFUART_AFC_RX_EN;
- reg = rd_regl(port, ureg->sirfsoc_afc_ctrl);
- wr_regl(port, ureg->sirfsoc_afc_ctrl, reg | flg);
- if (!sirfport->is_marco) {
- reg = rd_regl(port, ureg->sirfsoc_int_en_reg);
- wr_regl(port, ureg->sirfsoc_int_en_reg,
- reg | uint_en->sirfsoc_cts_en);
+ sirfport->ms_enabled = true;
+ if (sirfport->uart_reg->uart_type == SIRF_REAL_UART) {
+ wr_regl(port, ureg->sirfsoc_afc_ctrl,
+ rd_regl(port, ureg->sirfsoc_afc_ctrl) |
+ SIRFUART_AFC_TX_EN | SIRFUART_AFC_RX_EN);
+ if (!sirfport->is_marco)
+ wr_regl(port, ureg->sirfsoc_int_en_reg,
+ rd_regl(port, ureg->sirfsoc_int_en_reg)
+ | uint_en->sirfsoc_cts_en);
+ else
+ wr_regl(port, ureg->sirfsoc_int_en_reg,
+ uint_en->sirfsoc_cts_en);
} else
- wr_regl(port, ureg->sirfsoc_int_en_reg,
- uint_en->sirfsoc_cts_en);
- uart_handle_cts_change(port,
- !(rd_regl(port, ureg->sirfsoc_afc_ctrl) &
- SIRFUART_AFC_CTS_STATUS));
- sirfport->ms_enabled = 1;
+ enable_irq(gpio_to_irq(sirfport->cts_gpio));
}
static void sirfsoc_uart_break_ctl(struct uart_port *port, int break_state)
@@ -505,8 +528,7 @@ static void sirfsoc_uart_set_termios(struct uart_port *port,
if (termios->c_iflag & INPCK)
port->read_status_mask |= uint_en->sirfsoc_frm_err_en |
uint_en->sirfsoc_parity_err_en;
- }
- if (sirfport->uart_reg->uart_type == SIRF_USP_UART) {
+ } else {
if (termios->c_iflag & INPCK)
port->read_status_mask |= uint_en->sirfsoc_frm_err_en;
}
@@ -529,8 +551,7 @@ static void sirfsoc_uart_set_termios(struct uart_port *port,
config_reg |= SIRFUART_STICK_BIT_EVEN;
}
}
- }
- if (sirfport->uart_reg->uart_type == SIRF_USP_UART) {
+ } else {
if (termios->c_iflag & IGNPAR)
port->ignore_status_mask |=
uint_en->sirfsoc_frm_err_en;
@@ -567,8 +588,7 @@ static void sirfsoc_uart_set_termios(struct uart_port *port,
clk_div_reg = sirfsoc_uart_calc_sample_div(baud_rate,
ioclk_rate, &set_baud);
wr_regl(port, ureg->sirfsoc_divisor, clk_div_reg);
- }
- if (sirfport->uart_reg->uart_type == SIRF_USP_UART) {
+ } else {
clk_div_reg = sirfsoc_usp_calc_sample_div(baud_rate,
ioclk_rate, &sample_div_reg);
sample_div_reg--;
@@ -593,8 +613,7 @@ static void sirfsoc_uart_set_termios(struct uart_port *port,
if (sirfport->uart_reg->uart_type == SIRF_REAL_UART) {
config_reg |= SIRFUART_RECV_TIMEOUT(port, rx_time_out);
wr_regl(port, ureg->sirfsoc_line_ctrl, config_reg);
- }
- if (sirfport->uart_reg->uart_type == SIRF_USP_UART) {
+ } else {
/*tx frame ctrl*/
len_val = (data_bit_len - 1) << 0;
len_val |= (data_bit_len + 1 + stop_bit_len - 1) << 16;
@@ -675,7 +694,25 @@ static int sirfsoc_uart_startup(struct uart_port *port)
goto irq_err;
}
startup_uart_controller(port);
+
+ sirfport->ms_enabled = false;
+ if (sirfport->uart_reg->uart_type == SIRF_USP_UART &&
+ sirfport->hw_flow_ctrl) {
+ set_irq_flags(gpio_to_irq(sirfport->cts_gpio),
+ IRQF_VALID | IRQF_NOAUTOEN);
+ ret = request_irq(gpio_to_irq(sirfport->cts_gpio),
+ sirfsoc_uart_usp_cts_handler, IRQF_TRIGGER_FALLING |
+ IRQF_TRIGGER_RISING, "usp_cts_irq", sirfport);
+ if (ret != 0) {
+ dev_err(port->dev, "UART-USP:request gpio irq fail\n");
+ goto init_rx_err;
+ }
+ }
+
enable_irq(port->irq);
+
+init_rx_err:
+ free_irq(port->irq, sirfport);
irq_err:
return ret;
}
@@ -690,9 +727,12 @@ static void sirfsoc_uart_shutdown(struct uart_port *port)
wr_regl(port, SIRFUART_INT_EN_CLR, ~0UL);
free_irq(port->irq, sirfport);
- if (sirfport->ms_enabled) {
+ if (sirfport->ms_enabled)
sirfsoc_uart_disable_ms(port);
- sirfport->ms_enabled = 0;
+ if (sirfport->uart_reg->uart_type == SIRF_USP_UART &&
+ sirfport->hw_flow_ctrl) {
+ gpio_set_value(sirfport->rts_gpio, 1);
+ free_irq(gpio_to_irq(sirfport->cts_gpio), sirfport);
}
}
@@ -852,16 +892,51 @@ static int sirfsoc_uart_probe(struct platform_device *pdev)
port->private_data = sirfport;
sirfport->uart_reg = (struct sirfsoc_uart_register *)match->data;
+ sirfport->hw_flow_ctrl = of_property_read_bool(pdev->dev.of_node,
+ "sirf,uart-has-rtscts");
if (of_device_is_compatible(pdev->dev.of_node, "sirf,prima2-uart"))
sirfport->uart_reg->uart_type = SIRF_REAL_UART;
- if (of_device_is_compatible(pdev->dev.of_node, "sirf,prima2-usp-uart"))
+ if (of_device_is_compatible(pdev->dev.of_node, "sirf,prima2-usp-uart")) {
sirfport->uart_reg->uart_type = SIRF_USP_UART;
+ if (!sirfport->hw_flow_ctrl)
+ goto usp_no_flow_control;
+ if (of_find_property(pdev->dev.of_node, "cts-gpios", NULL))
+ sirfport->cts_gpio = of_get_named_gpio(
+ pdev->dev.of_node, "cts-gpios", 0);
+ else
+ sirfport->cts_gpio = -1;
+ if (of_find_property(pdev->dev.of_node, "rts-gpios", NULL))
+ sirfport->rts_gpio = of_get_named_gpio(
+ pdev->dev.of_node, "rts-gpios", 0);
+ else
+ sirfport->rts_gpio = -1;
+
+ if ((!gpio_is_valid(sirfport->cts_gpio) ||
+ !gpio_is_valid(sirfport->rts_gpio))) {
+ ret = -EINVAL;
+ dev_err(&pdev->dev,
+ "Usp flow control must have rfs and tfs gpio");
+ goto err;
+ }
+ ret = devm_gpio_request(&pdev->dev, sirfport->cts_gpio,
+ "usp-rfs-gpio");
+ if (ret) {
+ dev_err(&pdev->dev, "Unable request rfs gpio");
+ goto err;
+ }
+ gpio_direction_input(sirfport->cts_gpio);
+ ret = devm_gpio_request(&pdev->dev, sirfport->rts_gpio,
+ "usp-tfs-gpio");
+ if (ret) {
+ dev_err(&pdev->dev, "Unable request tfs gpio");
+ goto err;
+ }
+ gpio_direction_output(sirfport->rts_gpio, 1);
+ }
+usp_no_flow_control:
if (of_device_is_compatible(pdev->dev.of_node, "sirf,marco-uart"))
sirfport->is_marco = true;
- if (of_find_property(pdev->dev.of_node, "hw_flow_ctrl", NULL))
- sirfport->hw_flow_ctrl = 1;
-
if (of_property_read_u32(pdev->dev.of_node,
"fifosize",
&port->fifosize)) {
diff --git a/drivers/tty/serial/sirfsoc_uart.h b/drivers/tty/serial/sirfsoc_uart.h
index 2b41b06..e87035a 100644
--- a/drivers/tty/serial/sirfsoc_uart.h
+++ b/drivers/tty/serial/sirfsoc_uart.h
@@ -363,14 +363,16 @@ struct sirfsoc_baudrate_to_regv {
};
struct sirfsoc_uart_port {
- unsigned char hw_flow_ctrl;
- unsigned char ms_enabled;
+ bool hw_flow_ctrl;
+ bool ms_enabled;
struct uart_port port;
struct clk *clk;
/* for SiRFmarco, there are SET/CLR for UART_INT_EN */
bool is_marco;
struct sirfsoc_uart_register *uart_reg;
+ unsigned int cts_gpio;
+ unsigned int rts_gpio;
};
/* Hardware Flow Control */
--
1.8.2.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] serial: sirf: add DT-binding document to describle detailed properties
2013-08-13 11:18 [PATCH 1/3] serial: sirf: drop redundant pinctrl_get_select_default as pinctrl core does it Barry Song
2013-08-13 11:18 ` [PATCH 2/3] serial: sirf: fix the hardware-flow-ctrl for USP-based UART Barry Song
@ 2013-08-13 11:18 ` Barry Song
2013-08-14 19:11 ` [PATCH 1/3] serial: sirf: drop redundant pinctrl_get_select_default as pinctrl core does it Greg KH
2 siblings, 0 replies; 5+ messages in thread
From: Barry Song @ 2013-08-13 11:18 UTC (permalink / raw)
To: gregkh, linux-serial; +Cc: workgroup.linux, Qipan Li, Barry Song
From: Qipan Li <Qipan.Li@csr.com>
we defined some special properties for hardware flow control, document them
for DT-binding.
Signed-off-by: Qipan Li <Qipan.Li@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
---
.../devicetree/bindings/tty/serial/sirf-uart.txt | 34 ++++++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 Documentation/devicetree/bindings/tty/serial/sirf-uart.txt
diff --git a/Documentation/devicetree/bindings/tty/serial/sirf-uart.txt b/Documentation/devicetree/bindings/tty/serial/sirf-uart.txt
new file mode 100644
index 0000000..97dfd59
--- /dev/null
+++ b/Documentation/devicetree/bindings/tty/serial/sirf-uart.txt
@@ -0,0 +1,34 @@
+* CSR SiRFprimaII/atlasVI Universal Synchronous Asynchronous Receiver/Transmitter *
+
+Required properties:
+- compatible : Should be "sirf,prima2-uart" or "sirf, prima2-usp-uart"
+- reg : Offset and length of the register set for the device
+- interrupts : Should contain uart interrupt
+- fifosize : Should define hardware rx/tx fifo size
+- clocks : Should contain uart clock number
+
+Optional properties:
+- sirf,uart-has-rtscts: we have hardware flow controller pins in hardware
+- rts-gpios: RTS pin for USP-based UART if sirf,uart-has-rtscts is true
+- cts-gpios: CTS pin for USP-based UART if sirf,uart-has-rtscts is true
+
+Example:
+
+uart0: uart@b0050000 {
+ cell-index = <0>;
+ compatible = "sirf,prima2-uart";
+ reg = <0xb0050000 0x1000>;
+ interrupts = <17>;
+ fifosize = <128>;
+ clocks = <&clks 13>;
+};
+
+On the board-specific dts, we can put rts-gpios and cts-gpios like
+
+usp@b0090000 {
+ compatible = "sirf,prima2-usp-uart";
+ sirf,uart-has-rtscts;
+ rts-gpios = <&gpio 15 0>;
+ cts-gpios = <&gpio 46 0>;
+};
+
--
1.8.2.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] serial: sirf: drop redundant pinctrl_get_select_default as pinctrl core does it
2013-08-13 11:18 [PATCH 1/3] serial: sirf: drop redundant pinctrl_get_select_default as pinctrl core does it Barry Song
2013-08-13 11:18 ` [PATCH 2/3] serial: sirf: fix the hardware-flow-ctrl for USP-based UART Barry Song
2013-08-13 11:18 ` [PATCH 3/3] serial: sirf: add DT-binding document to describle detailed properties Barry Song
@ 2013-08-14 19:11 ` Greg KH
2013-08-14 22:38 ` Barry Song
2 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2013-08-14 19:11 UTC (permalink / raw)
To: Barry Song; +Cc: linux-serial, workgroup.linux, Barry Song, Linus Walleij
On Tue, Aug 13, 2013 at 07:18:15PM +0800, Barry Song wrote:
> pinctrl core will get default pinmux, so drop it in the sirfsoc serial driver.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Barry Song <Baohua.Song@csr.com>
> ---
> drivers/tty/serial/sirfsoc_uart.c | 12 ------------
> drivers/tty/serial/sirfsoc_uart.h | 1 -
> 2 files changed, 13 deletions(-)
This patch fails to apply to my tree:
checking file drivers/tty/serial/sirfsoc_uart.c
Hunk #3 FAILED at 917.
Hunk #4 FAILED at 928.
2 out of 4 hunks FAILED
checking file drivers/tty/serial/sirfsoc_uart.h
And as such, I can't take any of the patches in this series :(
Care to redo them against my tty-next branch if you wish to have them
applied?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] serial: sirf: drop redundant pinctrl_get_select_default as pinctrl core does it
2013-08-14 19:11 ` [PATCH 1/3] serial: sirf: drop redundant pinctrl_get_select_default as pinctrl core does it Greg KH
@ 2013-08-14 22:38 ` Barry Song
0 siblings, 0 replies; 5+ messages in thread
From: Barry Song @ 2013-08-14 22:38 UTC (permalink / raw)
To: Greg KH; +Cc: linux-serial, DL-SHA-WorkGroupLinux, Barry Song, Linus Walleij
2013/8/15 Greg KH <gregkh@linuxfoundation.org>
>
> On Tue, Aug 13, 2013 at 07:18:15PM +0800, Barry Song wrote:
> > pinctrl core will get default pinmux, so drop it in the sirfsoc serial driver.
> >
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Signed-off-by: Barry Song <Baohua.Song@csr.com>
> > ---
> > drivers/tty/serial/sirfsoc_uart.c | 12 ------------
> > drivers/tty/serial/sirfsoc_uart.h | 1 -
> > 2 files changed, 13 deletions(-)
>
> This patch fails to apply to my tree:
>
> checking file drivers/tty/serial/sirfsoc_uart.c
> Hunk #3 FAILED at 917.
> Hunk #4 FAILED at 928.
> 2 out of 4 hunks FAILED
> checking file drivers/tty/serial/sirfsoc_uart.h
>
> And as such, I can't take any of the patches in this series :(
>
> Care to redo them against my tty-next branch if you wish to have them
> applied?
>
i am sorry, and will be more careful later. i did not rebase to
tty-next this time as i thought i have sync my local tree same with
your tree but missed an external patch of dropping
platform_set_drvdata(pdev, NULL);
index 3b9382b..d28f38b 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -924,7 +924,6 @@ port_err:
clk_disable_unprepare(sirfport->clk);
clk_put(sirfport->clk);
clk_err:
- platform_set_drvdata(pdev, NULL);
if (sirfport->hw_flow_ctrl)
pinctrl_put(sirfport->p);
err:
@@ -935,7 +934,7 @@ static int sirfsoc_uart_remove(struct platform_device *pdev)
{
struct sirfsoc_uart_port *sirfport = platform_get_drvdata(pdev);
struct uart_port *port = &sirfport->port;
- platform_set_drvdata(pdev, NULL);
+
if (sirfport->hw_flow_ctrl)
pinctrl_put(sirfport->p);
clk_disable_unprepare(sirfport->clk);
i will send v2 to fix it.
> thanks,
>
> greg k-h
-barry
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-08-14 22:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-13 11:18 [PATCH 1/3] serial: sirf: drop redundant pinctrl_get_select_default as pinctrl core does it Barry Song
2013-08-13 11:18 ` [PATCH 2/3] serial: sirf: fix the hardware-flow-ctrl for USP-based UART Barry Song
2013-08-13 11:18 ` [PATCH 3/3] serial: sirf: add DT-binding document to describle detailed properties Barry Song
2013-08-14 19:11 ` [PATCH 1/3] serial: sirf: drop redundant pinctrl_get_select_default as pinctrl core does it Greg KH
2013-08-14 22:38 ` Barry Song
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox