All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2 v2] i2c: exynos5: remove an unnecessary read of FIFO_STATUS register
@ 2014-06-26  5:14 ` Naveen Krishna Chatradhi
  0 siblings, 0 replies; 9+ messages in thread
From: Naveen Krishna Chatradhi @ 2014-06-26  5:14 UTC (permalink / raw)
  To: linux-samsung-soc, linux-i2c
  Cc: naveenkrishna.ch, linux-arm-kernel, sjg, linux-kernel, wsa, cpgs,
	broonie

This patch removes an extra read of FIFO_STATUS register in the interrrupt
service routine. Which is read again before the actual use.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
---
Changes since v1:
None

 drivers/i2c/busses/i2c-exynos5.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 63d2292..0d1a7bc 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -405,7 +405,6 @@ static irqreturn_t exynos5_i2c_irq(int irqno, void *dev_id)
 
 	int_status = readl(i2c->regs + HSI2C_INT_STATUS);
 	writel(int_status, i2c->regs + HSI2C_INT_STATUS);
-	fifo_status = readl(i2c->regs + HSI2C_FIFO_STATUS);
 
 	/* handle interrupt related to the transfer status */
 	if (int_status & HSI2C_INT_I2C) {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 1/2 v2] i2c: exynos5: remove an unnecessary read of FIFO_STATUS register
@ 2014-06-26  5:14 ` Naveen Krishna Chatradhi
  0 siblings, 0 replies; 9+ messages in thread
From: Naveen Krishna Chatradhi @ 2014-06-26  5:14 UTC (permalink / raw)
  To: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA
  Cc: naveenkrishna.ch-Re5JQEeQqe8AvxtiuMwx3w,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	sjg-F7+t8E8rja9g9hUCZPvPmw, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	wsa-z923LK4zBo2bacvFa/9K2g, cpgs-Sze3O3UU22JBDgjK7y7TUQ,
	broonie-DgEjT+Ai2ygdnm+yROfE0A

This patch removes an extra read of FIFO_STATUS register in the interrrupt
service routine. Which is read again before the actual use.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
Changes since v1:
None

 drivers/i2c/busses/i2c-exynos5.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 63d2292..0d1a7bc 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -405,7 +405,6 @@ static irqreturn_t exynos5_i2c_irq(int irqno, void *dev_id)
 
 	int_status = readl(i2c->regs + HSI2C_INT_STATUS);
 	writel(int_status, i2c->regs + HSI2C_INT_STATUS);
-	fifo_status = readl(i2c->regs + HSI2C_FIFO_STATUS);
 
 	/* handle interrupt related to the transfer status */
 	if (int_status & HSI2C_INT_I2C) {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 1/2 v2] i2c: exynos5: remove an unnecessary read of FIFO_STATUS register
@ 2014-06-26  5:14 ` Naveen Krishna Chatradhi
  0 siblings, 0 replies; 9+ messages in thread
From: Naveen Krishna Chatradhi @ 2014-06-26  5:14 UTC (permalink / raw)
  To: linux-arm-kernel

This patch removes an extra read of FIFO_STATUS register in the interrrupt
service routine. Which is read again before the actual use.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
---
Changes since v1:
None

 drivers/i2c/busses/i2c-exynos5.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 63d2292..0d1a7bc 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -405,7 +405,6 @@ static irqreturn_t exynos5_i2c_irq(int irqno, void *dev_id)
 
 	int_status = readl(i2c->regs + HSI2C_INT_STATUS);
 	writel(int_status, i2c->regs + HSI2C_INT_STATUS);
-	fifo_status = readl(i2c->regs + HSI2C_FIFO_STATUS);
 
 	/* handle interrupt related to the transfer status */
 	if (int_status & HSI2C_INT_I2C) {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2 v2] i2c: exynos5: remove extra line and fix an assignment
  2014-06-26  5:14 ` Naveen Krishna Chatradhi
@ 2014-06-26  5:14   ` Naveen Krishna Chatradhi
  -1 siblings, 0 replies; 9+ messages in thread
From: Naveen Krishna Chatradhi @ 2014-06-26  5:14 UTC (permalink / raw)
  To: linux-samsung-soc, linux-i2c
  Cc: naveenkrishna.ch, linux-arm-kernel, sjg, linux-kernel, wsa, cpgs,
	broonie

This patch does the following in exynos5_i2c_message_start() function
1. Fixes an assignment
   As, "i2c_auto_conf" is initialized to '0' at the beginning of the
   function and HSI2C_READ_WRITE is defined as (1u << 16)

   Using "|=" for the first assignment is more readable.

2. Removes an extra line 

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
---
Changes since v1:
Edited commit message for clarity

 drivers/i2c/busses/i2c-exynos5.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 0d1a7bc..4c2e6f3 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -525,7 +525,7 @@ static void exynos5_i2c_message_start(struct exynos5_i2c *i2c, int stop)
 	if (i2c->msg->flags & I2C_M_RD) {
 		i2c_ctl |= HSI2C_RXCHON;
 
-		i2c_auto_conf = HSI2C_READ_WRITE;
+		i2c_auto_conf |= HSI2C_READ_WRITE;
 
 		trig_lvl = (i2c->msg->len > i2c->variant->fifo_depth) ?
 			(i2c->variant->fifo_depth * 3 / 4) : i2c->msg->len;
@@ -548,7 +548,6 @@ static void exynos5_i2c_message_start(struct exynos5_i2c *i2c, int stop)
 	writel(fifo_ctl, i2c->regs + HSI2C_FIFO_CTL);
 	writel(i2c_ctl, i2c->regs + HSI2C_CTL);
 
-
 	/*
 	 * Enable interrupts before starting the transfer so that we don't
 	 * miss any INT_I2C interrupts.
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2 v2] i2c: exynos5: remove extra line and fix an assignment
@ 2014-06-26  5:14   ` Naveen Krishna Chatradhi
  0 siblings, 0 replies; 9+ messages in thread
From: Naveen Krishna Chatradhi @ 2014-06-26  5:14 UTC (permalink / raw)
  To: linux-arm-kernel

This patch does the following in exynos5_i2c_message_start() function
1. Fixes an assignment
   As, "i2c_auto_conf" is initialized to '0' at the beginning of the
   function and HSI2C_READ_WRITE is defined as (1u << 16)

   Using "|=" for the first assignment is more readable.

2. Removes an extra line 

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
---
Changes since v1:
Edited commit message for clarity

 drivers/i2c/busses/i2c-exynos5.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 0d1a7bc..4c2e6f3 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -525,7 +525,7 @@ static void exynos5_i2c_message_start(struct exynos5_i2c *i2c, int stop)
 	if (i2c->msg->flags & I2C_M_RD) {
 		i2c_ctl |= HSI2C_RXCHON;
 
-		i2c_auto_conf = HSI2C_READ_WRITE;
+		i2c_auto_conf |= HSI2C_READ_WRITE;
 
 		trig_lvl = (i2c->msg->len > i2c->variant->fifo_depth) ?
 			(i2c->variant->fifo_depth * 3 / 4) : i2c->msg->len;
@@ -548,7 +548,6 @@ static void exynos5_i2c_message_start(struct exynos5_i2c *i2c, int stop)
 	writel(fifo_ctl, i2c->regs + HSI2C_FIFO_CTL);
 	writel(i2c_ctl, i2c->regs + HSI2C_CTL);
 
-
 	/*
 	 * Enable interrupts before starting the transfer so that we don't
 	 * miss any INT_I2C interrupts.
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2 v2] i2c: exynos5: remove an unnecessary read of FIFO_STATUS register
  2014-06-26  5:14 ` Naveen Krishna Chatradhi
@ 2014-07-17 10:02   ` Wolfram Sang
  -1 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2014-07-17 10:02 UTC (permalink / raw)
  To: Naveen Krishna Chatradhi
  Cc: linux-samsung-soc, linux-i2c, naveenkrishna.ch, linux-arm-kernel,
	sjg, linux-kernel, cpgs, broonie

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

On Thu, Jun 26, 2014 at 10:44:57AM +0530, Naveen Krishna Chatradhi wrote:
> This patch removes an extra read of FIFO_STATUS register in the interrrupt
> service routine. Which is read again before the actual use.
> 
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>

Applied to for-next, thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2 v2] i2c: exynos5: remove an unnecessary read of FIFO_STATUS register
@ 2014-07-17 10:02   ` Wolfram Sang
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2014-07-17 10:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 26, 2014 at 10:44:57AM +0530, Naveen Krishna Chatradhi wrote:
> This patch removes an extra read of FIFO_STATUS register in the interrrupt
> service routine. Which is read again before the actual use.
> 
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>

Applied to for-next, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140717/469f1137/attachment.sig>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2 v2] i2c: exynos5: remove extra line and fix an assignment
  2014-06-26  5:14   ` Naveen Krishna Chatradhi
@ 2014-07-17 10:02     ` Wolfram Sang
  -1 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2014-07-17 10:02 UTC (permalink / raw)
  To: Naveen Krishna Chatradhi
  Cc: linux-samsung-soc, linux-i2c, naveenkrishna.ch, linux-arm-kernel,
	sjg, linux-kernel, cpgs, broonie

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]

On Thu, Jun 26, 2014 at 10:44:58AM +0530, Naveen Krishna Chatradhi wrote:
> This patch does the following in exynos5_i2c_message_start() function
> 1. Fixes an assignment
>    As, "i2c_auto_conf" is initialized to '0' at the beginning of the
>    function and HSI2C_READ_WRITE is defined as (1u << 16)
> 
>    Using "|=" for the first assignment is more readable.
> 
> 2. Removes an extra line 
> 
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>

Applied to for-next, thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/2 v2] i2c: exynos5: remove extra line and fix an assignment
@ 2014-07-17 10:02     ` Wolfram Sang
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2014-07-17 10:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 26, 2014 at 10:44:58AM +0530, Naveen Krishna Chatradhi wrote:
> This patch does the following in exynos5_i2c_message_start() function
> 1. Fixes an assignment
>    As, "i2c_auto_conf" is initialized to '0' at the beginning of the
>    function and HSI2C_READ_WRITE is defined as (1u << 16)
> 
>    Using "|=" for the first assignment is more readable.
> 
> 2. Removes an extra line 
> 
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>

Applied to for-next, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140717/b4f9cc30/attachment.sig>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-07-17 10:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-26  5:14 [PATCH 1/2 v2] i2c: exynos5: remove an unnecessary read of FIFO_STATUS register Naveen Krishna Chatradhi
2014-06-26  5:14 ` Naveen Krishna Chatradhi
2014-06-26  5:14 ` Naveen Krishna Chatradhi
2014-06-26  5:14 ` [PATCH 2/2 v2] i2c: exynos5: remove extra line and fix an assignment Naveen Krishna Chatradhi
2014-06-26  5:14   ` Naveen Krishna Chatradhi
2014-07-17 10:02   ` Wolfram Sang
2014-07-17 10:02     ` Wolfram Sang
2014-07-17 10:02 ` [PATCH 1/2 v2] i2c: exynos5: remove an unnecessary read of FIFO_STATUS register Wolfram Sang
2014-07-17 10:02   ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.