1. 06 9月, 2018 1 次提交
    • K
      ASoC: rsnd: don't fallback to PIO mode when -EPROBE_DEFER · 6c92d5a2
      Kuninori Morimoto 提交于
      Current rsnd driver will fallback to PIO mode if it can't get DMA
      handler. But, DMA might return -EPROBE_DEFER when probe timing.
      This driver always fallback to PIO mode especially from
      commit ac6bbf0c ("iommu: Remove IOMMU_OF_DECLARE") because
      of this reason.
      
      The DMA driver will be probed later, but sound driver might be
      probed as PIO mode in such case. This patch fixup this issue.
      Then, -EPROBE_DEFER is not error. Thus, let's don't indicate error
      message in such case.
      And it needs to call rsnd_adg_remove() individually if probe failed,
      because it registers clk which should be unregister.
      
      Maybe PIO fallback feature itself is not needed,
      but let's keep it so far.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      6c92d5a2
  2. 18 6月, 2018 1 次提交
  3. 16 4月, 2018 2 次提交
  4. 29 11月, 2017 1 次提交
  5. 16 11月, 2017 1 次提交
  6. 06 11月, 2017 1 次提交
  7. 01 11月, 2017 1 次提交
    • K
      ASoC: rsnd: remove NULL check from rsnd_mod_name()/rsnd_mod_id() · 9b6ea250
      Kuninori Morimoto 提交于
      Current rsnd driver has rsnd_mod_id() which returns mod ID,
      and it returns -1 if mod was NULL.
      In the same time, this driver has rsnd_mod_name() which returns mod
      name, and it returns "unknown" if mod or mod->ops was NULL.
      
      Basically these "mod" never be NULL, but the reason why rsnd driver
      has such behavior is that DMA path finder is assuming memory as
      "mod == NULL".
      Thus, current DMA path debug code prints like below.
      Here "unknown[-1]" means it was memory.
      
      	...
      	rcar_sound ec500000.sound:   unknown[-1] from
      	rcar_sound ec500000.sound:   src[0] to
      	rcar_sound ec500000.sound:   ctu[2]
      	rcar_sound ec500000.sound:   mix[0]
      	rcar_sound ec500000.sound:   dvc[0]
      	rcar_sound ec500000.sound:   ssi[0]
      	rcar_sound ec500000.sound: audmac[0] unknown[-1] -> src[0]
      	...
      
      1st issue is that it is confusable for user.
      2nd issue is rsnd driver has something like below code.
      
      	mask |= 1 << rsnd_mod_id(mod);
      
      Because of this kind of code, some statically code checker will
      reports "Shifting by a negative value is undefined behaviour".
      
      But this "mod" never be NULL, thus negative shift never happen.
      To avoid these issues, this patch adds new dummy "mem" to
      indicate memory, and use it to indicate debug information,
      and, remove unneeded "NULL mod" behavior from rsnd_mod_id() and
      rsnd_mod_name().
      
      The debug information will be like below by this patch
      	...
      	rcar_sound ec500000.sound:   mem[0] from
      	rcar_sound ec500000.sound:   src[0] to
      	rcar_sound ec500000.sound:   ctu[2]
      	rcar_sound ec500000.sound:   mix[0]
      	rcar_sound ec500000.sound:   dvc[0]
      	rcar_sound ec500000.sound:   ssi[0]
      	rcar_sound ec500000.sound: audmac[0] mem[0] -> src[0]
      	...
      Reported-by: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      9b6ea250
  8. 22 9月, 2017 1 次提交
    • K
      ASoC: rsnd: add rsnd_dma_alloc() · 81cb7124
      Kuninori Morimoto 提交于
      R-Car sound DMA will be used from SSI/SRC.
      dma.c doesn't alloc DMA handler in .probe timing, because we don't
      know what kind of DMA transfer will be used then.
      Thus, SSI/SRC have *rsnd_mod for DMA. rsnd_dma_attach() will allocate
      it and attach it to system.
      It will be PIO mode if it can't alloc DMA handler.
      
      In case of MIX is used, rsnd_dma_attach() will be called twice from SSI.
      To avoid duplicate allocation, current rsnd_dma_attach() is checking
      allocated DMA handler. This DMA related operation is a little bit
      difficult to understand.
      This patch adds new rsnd_dma_alloc() and separates allocation and attach
      for readable code.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      81cb7124
  9. 21 8月, 2017 1 次提交
  10. 08 6月, 2017 2 次提交
  11. 16 3月, 2017 2 次提交
    • K
      ASoC: rcar: dma: remove unnecessary "volatile" · 9986943e
      Kuninori Morimoto 提交于
      commit 2a3af642eb20("ASoC: rcar: clear DE bit only in PDMACHCR...")
      added rsnd_dmapp_bset(), but it used copy-paste. Thus, it had
      unnecessary "volatile", and had below warning on x86.
      This patch fix it.
      
         sound/soc/sh/rcar/dma.c: In function 'rsnd_dmapp_bset':
      >> sound/soc/sh/rcar/dma.c:463:21: warning: passing argument 1 of \
         'ioread32' discards 'volatile' qualifier from pointer target \
         type [-Wdiscarded-qualifiers]
           u32 val = ioread32(addr);
                              ^~~~
         In file included from arch/x86/include/asm/io.h:203:0,
                          from arch/x86/include/asm/realmode.h:5,
                          from arch/x86/include/asm/acpi.h:33,
                          from arch/x86/include/asm/fixmap.h:19,
                          from arch/x86/include/asm/apic.h:10,
                          from arch/x86/include/asm/smp.h:12,
                          from include/linux/smp.h:59,
                          from include/linux/topology.h:33,
                          from include/linux/gfp.h:8,
                          from include/linux/idr.h:16,
                          from include/linux/kernfs.h:14,
                          from include/linux/sysfs.h:15,
                          from include/linux/kobject.h:21,
                          from include/linux/of.h:21,
                          from include/linux/of_dma.h:16,
                          from sound/soc/sh/rcar/dma.c:12:
         include/asm-generic/iomap.h:31:21: note: expected 'void *' \
         but argument is of type 'volatile void *'
          extern unsigned int ioread32(void __iomem *);
                              ^~~~~~~~
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      9986943e
    • K
      ASoC: rcar: clear DE bit only in PDMACHCR when it stops · 62a10498
      Kuninori Morimoto 提交于
      R-Car datasheet indicates "Clear DE in PDMACHCR" for transfer stop,
      but current code clears all bits in PDMACHCR.
      Because of this, DE bit might never been cleared,
      and it causes CMD overflow. This patch fixes this issue.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Tested-by: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      62a10498
  12. 23 11月, 2016 2 次提交
  13. 25 10月, 2016 4 次提交
  14. 11 5月, 2016 1 次提交
  15. 23 1月, 2016 2 次提交
  16. 18 12月, 2015 1 次提交
  17. 19 11月, 2015 2 次提交
  18. 16 11月, 2015 8 次提交
  19. 22 10月, 2015 1 次提交
  20. 12 8月, 2015 1 次提交
  21. 18 7月, 2015 3 次提交
  22. 17 7月, 2015 1 次提交