diff mbox

serial: samsung: add clock controls in s3c24xx_serial_resume_noirq()

Message ID 000d01d218c5$3069cdf0$913d69d0$@samsung.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

??? Sept. 27, 2016, 1:43 p.m. UTC
This patch adds clock controls in s3c24xx_serial_resume_noirq()
to set S3C64XX_UINTM register.

Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
---
 drivers/tty/serial/samsung.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Krzysztof Kozlowski Sept. 30, 2016, 10:34 a.m. UTC | #1
On Tue, Sep 27, 2016 at 10:43:54PM +0900, 남영민 wrote:
> This patch adds clock controls in s3c24xx_serial_resume_noirq()
> to set S3C64XX_UINTM register.

Code looks correct but the commit message is bogus. It does not bring
any benefit over the code, not mentioning that it is quite cryptic (what
does the "clock controls" mean?).

Just describe here WHAT is the problem and WHY the fix is needed.

Best regards,
Krzysztof

> 
> Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
> ---
>  drivers/tty/serial/samsung.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
> index ae2095a..97f7b3b 100644
> --- a/drivers/tty/serial/samsung.c
> +++ b/drivers/tty/serial/samsung.c
> @@ -1921,6 +1921,7 @@ static int s3c24xx_serial_resume(struct device *dev)
>  static int s3c24xx_serial_resume_noirq(struct device *dev)
>  {
>  	struct uart_port *port = s3c24xx_dev_to_port(dev);
> +	struct s3c24xx_uart_port *ourport = to_ourport(port);
>  
>  	if (port) {
>  		/* restore IRQ mask */
> @@ -1930,7 +1931,9 @@ static int s3c24xx_serial_resume_noirq(struct device *dev)
>  				uintm &= ~S3C64XX_UINTM_TXD_MSK;
>  			if (rx_enabled(port))
>  				uintm &= ~S3C64XX_UINTM_RXD_MSK;
> +			clk_prepare_enable(ourport->clk);
>  			wr_regl(port, S3C64XX_UINTM, uintm);
> +			clk_disable_unprepare(ourport->clk);
>  		}
>  	}
>  
> -- 
> 2.8.1
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
??? Oct. 4, 2016, 5:04 a.m. UTC | #2
Hello,

>On Tue, Sep 27, 2016 at 10:43:54PM +0900, 남영민 wrote:
>> This patch adds clock controls in s3c24xx_serial_resume_noirq() to set
>> S3C64XX_UINTM register.
>
>Code looks correct but the commit message is bogus. It does not bring any
>benefit over the code, not mentioning that it is quite cryptic (what does
>the "clock controls" mean?).
>
>Just describe here WHAT is the problem and WHY the fix is needed.
>
>Best regards,
>Krzysztof
>

Thank you for taking your time for the review.
I will improve the commit message applying your suggestions and resend this patch.

Best regards,
Youngmin Nam


>>
>> Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
>> ---
>>  drivers/tty/serial/samsung.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/tty/serial/samsung.c
>> b/drivers/tty/serial/samsung.c index ae2095a..97f7b3b 100644
>> --- a/drivers/tty/serial/samsung.c
>> +++ b/drivers/tty/serial/samsung.c
>> @@ -1921,6 +1921,7 @@ static int s3c24xx_serial_resume(struct device
>> *dev)  static int s3c24xx_serial_resume_noirq(struct device *dev)  {
>>  	struct uart_port *port = s3c24xx_dev_to_port(dev);
>> +	struct s3c24xx_uart_port *ourport = to_ourport(port);
>>
>>  	if (port) {
>>  		/* restore IRQ mask */
>> @@ -1930,7 +1931,9 @@ static int s3c24xx_serial_resume_noirq(struct
>device *dev)
>>  				uintm &= ~S3C64XX_UINTM_TXD_MSK;
>>  			if (rx_enabled(port))
>>  				uintm &= ~S3C64XX_UINTM_RXD_MSK;
>> +			clk_prepare_enable(ourport->clk);
>>  			wr_regl(port, S3C64XX_UINTM, uintm);
>> +			clk_disable_unprepare(ourport->clk);
>>  		}
>>  	}
>>
>> --
>> 2.8.1
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-samsung-soc" in the body of a message to
>> majordomo@vger.kernel.org More majordomo info at
>http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tobias Jakobi Jan. 26, 2017, 1:40 p.m. UTC | #3
Hello,

was going through my mail folder and I don't think that this patch was
ever applied (or resent).

Just wondering if it is still necessary.

- Tobias


남영민 wrote:
> Hello,
> 
>> On Tue, Sep 27, 2016 at 10:43:54PM +0900, 남영민 wrote:
>>> This patch adds clock controls in s3c24xx_serial_resume_noirq() to set
>>> S3C64XX_UINTM register.
>>
>> Code looks correct but the commit message is bogus. It does not bring any
>> benefit over the code, not mentioning that it is quite cryptic (what does
>> the "clock controls" mean?).
>>
>> Just describe here WHAT is the problem and WHY the fix is needed.
>>
>> Best regards,
>> Krzysztof
>>
> 
> Thank you for taking your time for the review.
> I will improve the commit message applying your suggestions and resend this patch.
> 
> Best regards,
> Youngmin Nam
> 
> 
>>>
>>> Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
>>> ---
>>>  drivers/tty/serial/samsung.c | 3 +++
>>>  1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/tty/serial/samsung.c
>>> b/drivers/tty/serial/samsung.c index ae2095a..97f7b3b 100644
>>> --- a/drivers/tty/serial/samsung.c
>>> +++ b/drivers/tty/serial/samsung.c
>>> @@ -1921,6 +1921,7 @@ static int s3c24xx_serial_resume(struct device
>>> *dev)  static int s3c24xx_serial_resume_noirq(struct device *dev)  {
>>>  	struct uart_port *port = s3c24xx_dev_to_port(dev);
>>> +	struct s3c24xx_uart_port *ourport = to_ourport(port);
>>>
>>>  	if (port) {
>>>  		/* restore IRQ mask */
>>> @@ -1930,7 +1931,9 @@ static int s3c24xx_serial_resume_noirq(struct
>> device *dev)
>>>  				uintm &= ~S3C64XX_UINTM_TXD_MSK;
>>>  			if (rx_enabled(port))
>>>  				uintm &= ~S3C64XX_UINTM_RXD_MSK;
>>> +			clk_prepare_enable(ourport->clk);
>>>  			wr_regl(port, S3C64XX_UINTM, uintm);
>>> +			clk_disable_unprepare(ourport->clk);
>>>  		}
>>>  	}
>>>
>>> --
>>> 2.8.1
>>>
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe
>>> linux-samsung-soc" in the body of a message to
>>> majordomo@vger.kernel.org More majordomo info at
>> http://vger.kernel.org/majordomo-info.html
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
??? Feb. 1, 2017, 9:45 a.m. UTC | #4
Hello,

>
>Hello,
>
>was going through my mail folder and I don't think that this patch was ever
>applied (or resent).
>
>Just wondering if it is still necessary.
>
>- Tobias
>

Sorry for late reply. I will resend the patch soon.

Thanks.

>
>남영민 wrote:
>> Hello,
>>
>>> On Tue, Sep 27, 2016 at 10:43:54PM +0900, 남영민 wrote:
>>>> This patch adds clock controls in s3c24xx_serial_resume_noirq() to
>>>> set S3C64XX_UINTM register.
>>>
>>> Code looks correct but the commit message is bogus. It does not bring
>>> any benefit over the code, not mentioning that it is quite cryptic
>>> (what does the "clock controls" mean?).
>>>
>>> Just describe here WHAT is the problem and WHY the fix is needed.
>>>
>>> Best regards,
>>> Krzysztof
>>>
>>
>> Thank you for taking your time for the review.
>> I will improve the commit message applying your suggestions and resend
>this patch.
>>
>> Best regards,
>> Youngmin Nam
>>
>>
>>>>
>>>> Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
>>>> ---
>>>>  drivers/tty/serial/samsung.c | 3 +++
>>>>  1 file changed, 3 insertions(+)
>>>>
>>>> diff --git a/drivers/tty/serial/samsung.c
>>>> b/drivers/tty/serial/samsung.c index ae2095a..97f7b3b 100644
>>>> --- a/drivers/tty/serial/samsung.c
>>>> +++ b/drivers/tty/serial/samsung.c
>>>> @@ -1921,6 +1921,7 @@ static int s3c24xx_serial_resume(struct device
>>>> *dev)  static int s3c24xx_serial_resume_noirq(struct device *dev)  {
>>>>  	struct uart_port *port = s3c24xx_dev_to_port(dev);
>>>> +	struct s3c24xx_uart_port *ourport = to_ourport(port);
>>>>
>>>>  	if (port) {
>>>>  		/* restore IRQ mask */
>>>> @@ -1930,7 +1931,9 @@ static int s3c24xx_serial_resume_noirq(struct
>>> device *dev)
>>>>  				uintm &= ~S3C64XX_UINTM_TXD_MSK;
>>>>  			if (rx_enabled(port))
>>>>  				uintm &= ~S3C64XX_UINTM_RXD_MSK;
>>>> +			clk_prepare_enable(ourport->clk);
>>>>  			wr_regl(port, S3C64XX_UINTM, uintm);
>>>> +			clk_disable_unprepare(ourport->clk);
>>>>  		}
>>>>  	}
>>>>
>>>> --
>>>> 2.8.1
>>>>
>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe
>>>> linux-samsung-soc" in the body of a message to
>>>> majordomo@vger.kernel.org More majordomo info at
>>> http://vger.kernel.org/majordomo-info.html
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-samsung-soc" in the body of a message to
>> majordomo@vger.kernel.org More majordomo info at
>> http://vger.kernel.org/majordomo-info.html
>>
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-samsung-
>soc" in the body of a message to majordomo@vger.kernel.org More majordomo
>info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index ae2095a..97f7b3b 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -1921,6 +1921,7 @@  static int s3c24xx_serial_resume(struct device *dev)
 static int s3c24xx_serial_resume_noirq(struct device *dev)
 {
 	struct uart_port *port = s3c24xx_dev_to_port(dev);
+	struct s3c24xx_uart_port *ourport = to_ourport(port);
 
 	if (port) {
 		/* restore IRQ mask */
@@ -1930,7 +1931,9 @@  static int s3c24xx_serial_resume_noirq(struct device *dev)
 				uintm &= ~S3C64XX_UINTM_TXD_MSK;
 			if (rx_enabled(port))
 				uintm &= ~S3C64XX_UINTM_RXD_MSK;
+			clk_prepare_enable(ourport->clk);
 			wr_regl(port, S3C64XX_UINTM, uintm);
+			clk_disable_unprepare(ourport->clk);
 		}
 	}