Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1575494 > unrolled thread

[PATCH 0/2] get rid of immrbar_virt_to_phys()

Started byChristophe Leroy <christophe.leroy@c-s.fr>
First post2017-02-07 10:10 +0100
Last post2017-02-08 19:20 +0100
Articles 5 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] get rid of immrbar_virt_to_phys() Christophe Leroy <christophe.leroy@c-s.fr> - 2017-02-07 10:10 +0100
    [PATCH 1/2] net: ethernet: ucc_geth: fix MEM_PART_MURAM mode Christophe Leroy <christophe.leroy@c-s.fr> - 2017-02-07 10:10 +0100
      Re: [PATCH 1/2] net: ethernet: ucc_geth: fix MEM_PART_MURAM mode Christophe LEROY <christophe.leroy@c-s.fr> - 2017-02-09 11:50 +0100
      Re: [PATCH 1/2] net: ethernet: ucc_geth: fix MEM_PART_MURAM mode Li Yang <leoli@freescale.com> - 2017-02-10 00:30 +0100
    Re: [PATCH 0/2] get rid of immrbar_virt_to_phys() David Miller <davem@davemloft.net> - 2017-02-08 19:20 +0100

#1575494 — [PATCH 0/2] get rid of immrbar_virt_to_phys()

FromChristophe Leroy <christophe.leroy@c-s.fr>
Date2017-02-07 10:10 +0100
Subject[PATCH 0/2] get rid of immrbar_virt_to_phys()
Message-ID<t89WF-Sa-3@gated-at.bofh.it>
ucc_geth ethernet driver is the only driver using immrbar_virt_to_phys() and it uses it incorrectly.

This patch fixes ucc_geth driver then removes immrbar_virt_to_phys()

Christophe Leroy (2):
  net: ethernet: ucc_geth: fix MEM_PART_MURAM mode
  soc/fsl/qe: get rid of immrbar_virt_to_phys()

 drivers/net/ethernet/freescale/ucc_geth.c |  8 +++-----
 drivers/soc/fsl/qe/qe.c                   |  2 --
 include/soc/fsl/qe/immap_qe.h             | 19 -------------------
 include/soc/fsl/qe/qe.h                   |  1 +
 4 files changed, 4 insertions(+), 26 deletions(-)

-- 
2.10.1

[toc] | [next] | [standalone]


#1575496 — [PATCH 1/2] net: ethernet: ucc_geth: fix MEM_PART_MURAM mode

FromChristophe Leroy <christophe.leroy@c-s.fr>
Date2017-02-07 10:10 +0100
Subject[PATCH 1/2] net: ethernet: ucc_geth: fix MEM_PART_MURAM mode
Message-ID<t89WG-Sa-25@gated-at.bofh.it>
In reply to#1575494
Since commit 5093bb965a163 ("powerpc/QE: switch to the cpm_muram
implementation"), muram area is not part of immrbar mapping anymore
so immrbar_virt_to_phys() is not usable anymore.

Fixes: 5093bb965a163 ("powerpc/QE: switch to the cpm_muram implementation)
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 drivers/net/ethernet/freescale/ucc_geth.c | 8 +++-----
 include/soc/fsl/qe/qe.h                   | 1 +
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index 3f7ae9f..f77ba9f 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -2594,11 +2594,10 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
 		} else if (ugeth->ug_info->uf_info.bd_mem_part ==
 			   MEM_PART_MURAM) {
 			out_be32(&ugeth->p_send_q_mem_reg->sqqd[i].bd_ring_base,
-				 (u32) immrbar_virt_to_phys(ugeth->
-							    p_tx_bd_ring[i]));
+				 (u32)qe_muram_dma(ugeth->p_tx_bd_ring[i]));
 			out_be32(&ugeth->p_send_q_mem_reg->sqqd[i].
 				 last_bd_completed_address,
-				 (u32) immrbar_virt_to_phys(endOfRing));
+				 (u32)qe_muram_dma(endOfRing));
 		}
 	}
 
@@ -2844,8 +2843,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
 		} else if (ugeth->ug_info->uf_info.bd_mem_part ==
 			   MEM_PART_MURAM) {
 			out_be32(&ugeth->p_rx_bd_qs_tbl[i].externalbdbaseptr,
-				 (u32) immrbar_virt_to_phys(ugeth->
-							    p_rx_bd_ring[i]));
+				 (u32)qe_muram_dma(ugeth->p_rx_bd_ring[i]));
 		}
 		/* rest of fields handled by QE */
 	}
diff --git a/include/soc/fsl/qe/qe.h b/include/soc/fsl/qe/qe.h
index 70339d7..0cd4c1147 100644
--- a/include/soc/fsl/qe/qe.h
+++ b/include/soc/fsl/qe/qe.h
@@ -243,6 +243,7 @@ static inline int qe_alive_during_sleep(void)
 #define qe_muram_free cpm_muram_free
 #define qe_muram_addr cpm_muram_addr
 #define qe_muram_offset cpm_muram_offset
+#define qe_muram_dma cpm_muram_dma
 
 #define qe_setbits32(_addr, _v) iowrite32be(ioread32be(_addr) |  (_v), (_addr))
 #define qe_clrbits32(_addr, _v) iowrite32be(ioread32be(_addr) & ~(_v), (_addr))
-- 
2.10.1

[toc] | [prev] | [next] | [standalone]


#1577464 — Re: [PATCH 1/2] net: ethernet: ucc_geth: fix MEM_PART_MURAM mode

FromChristophe LEROY <christophe.leroy@c-s.fr>
Date2017-02-09 11:50 +0100
SubjectRe: [PATCH 1/2] net: ethernet: ucc_geth: fix MEM_PART_MURAM mode
Message-ID<t8Usx-538-5@gated-at.bofh.it>
In reply to#1575496
Acked-by: David S. Miller <davem@davemloft.net>

Le 07/02/2017 à 10:05, Christophe Leroy a écrit :
> Since commit 5093bb965a163 ("powerpc/QE: switch to the cpm_muram
> implementation"), muram area is not part of immrbar mapping anymore
> so immrbar_virt_to_phys() is not usable anymore.
>
> Fixes: 5093bb965a163 ("powerpc/QE: switch to the cpm_muram implementation)
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
>  drivers/net/ethernet/freescale/ucc_geth.c | 8 +++-----
>  include/soc/fsl/qe/qe.h                   | 1 +
>  2 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
> index 3f7ae9f..f77ba9f 100644
> --- a/drivers/net/ethernet/freescale/ucc_geth.c
> +++ b/drivers/net/ethernet/freescale/ucc_geth.c
> @@ -2594,11 +2594,10 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
>  		} else if (ugeth->ug_info->uf_info.bd_mem_part ==
>  			   MEM_PART_MURAM) {
>  			out_be32(&ugeth->p_send_q_mem_reg->sqqd[i].bd_ring_base,
> -				 (u32) immrbar_virt_to_phys(ugeth->
> -							    p_tx_bd_ring[i]));
> +				 (u32)qe_muram_dma(ugeth->p_tx_bd_ring[i]));
>  			out_be32(&ugeth->p_send_q_mem_reg->sqqd[i].
>  				 last_bd_completed_address,
> -				 (u32) immrbar_virt_to_phys(endOfRing));
> +				 (u32)qe_muram_dma(endOfRing));
>  		}
>  	}
>
> @@ -2844,8 +2843,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
>  		} else if (ugeth->ug_info->uf_info.bd_mem_part ==
>  			   MEM_PART_MURAM) {
>  			out_be32(&ugeth->p_rx_bd_qs_tbl[i].externalbdbaseptr,
> -				 (u32) immrbar_virt_to_phys(ugeth->
> -							    p_rx_bd_ring[i]));
> +				 (u32)qe_muram_dma(ugeth->p_rx_bd_ring[i]));
>  		}
>  		/* rest of fields handled by QE */
>  	}
> diff --git a/include/soc/fsl/qe/qe.h b/include/soc/fsl/qe/qe.h
> index 70339d7..0cd4c1147 100644
> --- a/include/soc/fsl/qe/qe.h
> +++ b/include/soc/fsl/qe/qe.h
> @@ -243,6 +243,7 @@ static inline int qe_alive_during_sleep(void)
>  #define qe_muram_free cpm_muram_free
>  #define qe_muram_addr cpm_muram_addr
>  #define qe_muram_offset cpm_muram_offset
> +#define qe_muram_dma cpm_muram_dma
>
>  #define qe_setbits32(_addr, _v) iowrite32be(ioread32be(_addr) |  (_v), (_addr))
>  #define qe_clrbits32(_addr, _v) iowrite32be(ioread32be(_addr) & ~(_v), (_addr))
>

[toc] | [prev] | [next] | [standalone]


#1578039 — Re: [PATCH 1/2] net: ethernet: ucc_geth: fix MEM_PART_MURAM mode

FromLi Yang <leoli@freescale.com>
Date2017-02-10 00:30 +0100
SubjectRe: [PATCH 1/2] net: ethernet: ucc_geth: fix MEM_PART_MURAM mode
Message-ID<t96k1-465-9@gated-at.bofh.it>
In reply to#1575496
On Tue, Feb 7, 2017 at 3:05 AM, Christophe Leroy
<christophe.leroy@c-s.fr> wrote:
> Since commit 5093bb965a163 ("powerpc/QE: switch to the cpm_muram
> implementation"), muram area is not part of immrbar mapping anymore
> so immrbar_virt_to_phys() is not usable anymore.
>
> Fixes: 5093bb965a163 ("powerpc/QE: switch to the cpm_muram implementation)
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>

Acked-by: Li Yang <pku.leo@gmail.com>

Regards,
Leo

[toc] | [prev] | [next] | [standalone]


#1576797

FromDavid Miller <davem@davemloft.net>
Date2017-02-08 19:20 +0100
Message-ID<t8F0u-3Hv-9@gated-at.bofh.it>
In reply to#1575494
From: Christophe Leroy <christophe.leroy@c-s.fr>
Date: Tue,  7 Feb 2017 10:05:07 +0100 (CET)

> ucc_geth ethernet driver is the only driver using immrbar_virt_to_phys() and it uses it incorrectly.
> 
> This patch fixes ucc_geth driver then removes immrbar_virt_to_phys()

Feel free to merge this via whatever tree handles that SOC fsl driver.

Acked-by: David S. Miller <davem@davemloft.net>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web