All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] net: zynq_gem: Use wait_for_bit with non breakable
@ 2017-05-30 12:28 Michal Simek
  2017-05-30 12:28 ` [U-Boot] [PATCH 2/2] net: zynq_gem: Dont flush dummy descriptors Michal Simek
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Michal Simek @ 2017-05-30 12:28 UTC (permalink / raw)
  To: u-boot

From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

Use wait_for_bit to be non breakable as using it with
breakable causes issue of un interruptible auto negotiation.
This is due to the ctrlc pressed will taken for wait_for_bit()
abort during phy_read() and hence not coming out of
auto negotiation.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 drivers/net/zynq_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 357f8c2917d2..9c0f5fba28cd 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -192,7 +192,7 @@ static u32 phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
 	int err;
 
 	err = wait_for_bit(__func__, &regs->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
-			    true, 20000, true);
+			    true, 20000, false);
 	if (err)
 		return err;
 
@@ -205,7 +205,7 @@ static u32 phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
 	writel(mgtcr, &regs->phymntnc);
 
 	err = wait_for_bit(__func__, &regs->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
-			    true, 20000, true);
+			    true, 20000, false);
 	if (err)
 		return err;
 
-- 
1.9.1

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

* [U-Boot] [PATCH 2/2] net: zynq_gem: Dont flush dummy descriptors
  2017-05-30 12:28 [U-Boot] [PATCH 1/2] net: zynq_gem: Use wait_for_bit with non breakable Michal Simek
@ 2017-05-30 12:28 ` Michal Simek
  2017-05-30 16:49   ` Joe Hershberger
  2017-06-02 19:48   ` [U-Boot] " Joe Hershberger
  2017-05-30 16:49 ` [U-Boot] [PATCH 1/2] net: zynq_gem: Use wait_for_bit with non breakable Joe Hershberger
  2017-06-02 19:48 ` [U-Boot] " Joe Hershberger
  2 siblings, 2 replies; 6+ messages in thread
From: Michal Simek @ 2017-05-30 12:28 UTC (permalink / raw)
  To: u-boot

From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

Dont flush dummy descriptors as they are already
allocated from a region with dcache off. Tested
this on Zynq(zc702) and ZynqMP(zcu102) boards.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 drivers/net/zynq_gem.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 9c0f5fba28cd..31bb3f17d835 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -407,10 +407,6 @@ static int zynq_gem_init(struct udevice *dev)
 		dummy_rx_bd->addr = ZYNQ_GEM_RXBUF_WRAP_MASK |
 				ZYNQ_GEM_RXBUF_NEW_MASK;
 		dummy_rx_bd->status = 0;
-		flush_dcache_range((ulong)&dummy_tx_bd, (ulong)&dummy_tx_bd +
-				   sizeof(dummy_tx_bd));
-		flush_dcache_range((ulong)&dummy_rx_bd, (ulong)&dummy_rx_bd +
-				   sizeof(dummy_rx_bd));
 
 		writel((ulong)dummy_tx_bd, &regs->transmit_q1_ptr);
 		writel((ulong)dummy_rx_bd, &regs->receive_q1_ptr);
-- 
1.9.1

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

* [U-Boot] [PATCH 2/2] net: zynq_gem: Dont flush dummy descriptors
  2017-05-30 12:28 ` [U-Boot] [PATCH 2/2] net: zynq_gem: Dont flush dummy descriptors Michal Simek
@ 2017-05-30 16:49   ` Joe Hershberger
  2017-06-02 19:48   ` [U-Boot] " Joe Hershberger
  1 sibling, 0 replies; 6+ messages in thread
From: Joe Hershberger @ 2017-05-30 16:49 UTC (permalink / raw)
  To: u-boot

On Tue, May 30, 2017 at 7:28 AM, Michal Simek <michal.simek@xilinx.com> wrote:
> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
>
> Dont flush dummy descriptors as they are already
> allocated from a region with dcache off. Tested
> this on Zynq(zc702) and ZynqMP(zcu102) boards.
>
> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

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

* [U-Boot] [PATCH 1/2] net: zynq_gem: Use wait_for_bit with non breakable
  2017-05-30 12:28 [U-Boot] [PATCH 1/2] net: zynq_gem: Use wait_for_bit with non breakable Michal Simek
  2017-05-30 12:28 ` [U-Boot] [PATCH 2/2] net: zynq_gem: Dont flush dummy descriptors Michal Simek
@ 2017-05-30 16:49 ` Joe Hershberger
  2017-06-02 19:48 ` [U-Boot] " Joe Hershberger
  2 siblings, 0 replies; 6+ messages in thread
From: Joe Hershberger @ 2017-05-30 16:49 UTC (permalink / raw)
  To: u-boot

On Tue, May 30, 2017 at 7:28 AM, Michal Simek <michal.simek@xilinx.com> wrote:
> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
>
> Use wait_for_bit to be non breakable as using it with
> breakable causes issue of un interruptible auto negotiation.
> This is due to the ctrlc pressed will taken for wait_for_bit()
> abort during phy_read() and hence not coming out of
> auto negotiation.
>
> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

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

* [U-Boot] net: zynq_gem: Use wait_for_bit with non breakable
  2017-05-30 12:28 [U-Boot] [PATCH 1/2] net: zynq_gem: Use wait_for_bit with non breakable Michal Simek
  2017-05-30 12:28 ` [U-Boot] [PATCH 2/2] net: zynq_gem: Dont flush dummy descriptors Michal Simek
  2017-05-30 16:49 ` [U-Boot] [PATCH 1/2] net: zynq_gem: Use wait_for_bit with non breakable Joe Hershberger
@ 2017-06-02 19:48 ` Joe Hershberger
  2 siblings, 0 replies; 6+ messages in thread
From: Joe Hershberger @ 2017-06-02 19:48 UTC (permalink / raw)
  To: u-boot

Hi Michal,

https://patchwork.ozlabs.org/patch/768585/ was applied to u-boot-net.git.

Thanks!
-Joe

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

* [U-Boot] net: zynq_gem: Dont flush dummy descriptors
  2017-05-30 12:28 ` [U-Boot] [PATCH 2/2] net: zynq_gem: Dont flush dummy descriptors Michal Simek
  2017-05-30 16:49   ` Joe Hershberger
@ 2017-06-02 19:48   ` Joe Hershberger
  1 sibling, 0 replies; 6+ messages in thread
From: Joe Hershberger @ 2017-06-02 19:48 UTC (permalink / raw)
  To: u-boot

Hi Michal,

https://patchwork.ozlabs.org/patch/768580/ was applied to u-boot-net.git.

Thanks!
-Joe

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

end of thread, other threads:[~2017-06-02 19:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-30 12:28 [U-Boot] [PATCH 1/2] net: zynq_gem: Use wait_for_bit with non breakable Michal Simek
2017-05-30 12:28 ` [U-Boot] [PATCH 2/2] net: zynq_gem: Dont flush dummy descriptors Michal Simek
2017-05-30 16:49   ` Joe Hershberger
2017-06-02 19:48   ` [U-Boot] " Joe Hershberger
2017-05-30 16:49 ` [U-Boot] [PATCH 1/2] net: zynq_gem: Use wait_for_bit with non breakable Joe Hershberger
2017-06-02 19:48 ` [U-Boot] " Joe Hershberger

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.