[PATCH 5/5] Don't use relaxed io access

Eugene Krasnikov k.eugene.e at gmail.com
Wed Apr 17 06:36:25 EDT 2013


Nice catch. Will merge those fixes.

2013/4/17  <pontus.fuchs at gmail.com>:
> From: Pontus Fuchs <pontus.fuchs at gmail.com>
>
> No need to use _relaxed versions of readl/writel. The read
> func even got the barrier wrong.
> ---
>  dxe.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/dxe.c b/dxe.c
> index 74ec43e..4033eb8 100644
> --- a/dxe.c
> +++ b/dxe.c
> @@ -50,16 +50,14 @@ static void * wcn36xx_dma_alloc(size_t size, void **paddr)
>
>  static void wcn36xx_dxe_write_register(struct wcn36xx *wcn, int addr, int data)
>  {
> -       wmb();
>         wcn36xx_dbg("wcn36xx_dxe_write_register: addr=%x, data=%x", addr, data);
> -       writel_relaxed(data, wcn->mmio + addr);
> +       writel(data, wcn->mmio + addr);
>  }
>
>  static void wcn36xx_dxe_read_register(struct wcn36xx *wcn, int addr, int* data)
>  {
> -       *data = readl_relaxed(wcn->mmio + addr);
> +       *data = readl(wcn->mmio + addr);
>         wcn36xx_dbg("wcn36xx_dxe_read_register: addr=%x, data=%x", addr, *data);
> -       wmb();
>  }
>
>  static int wcn36xx_dxe_allocate_ctl_block(struct wcn36xx_dxe_ch *ch)
> --
> 1.7.10.4
>
>
> _______________________________________________
> wcn36xx mailing list
> wcn36xx at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/wcn36xx



-- 
Best regards,
Eugene



More information about the wcn36xx mailing list