1. 27 Aug, 2014 6 commits
  2. 19 Aug, 2014 3 commits
    • Stephen Warren's avatar
      regmap: of_regmap_get_endian() cleanup · 45e1a279
      Stephen Warren authored
      Commit d647c199 ("regmap: add DT endianness binding support") had
      some issues. Commit ba1b53fe ("regmap: Fix DT endianess parsing
      logic") fixed the main problem. This patch fixes the other.
      
      Specifically, restore the overall default of REGMAP_ENDIAN_BIG if none of
      the config, DT, or the bus specify any endianness. Without this,
      of_regmap_get_endian() could return REGMAP_ENDIAN_DEFAULT, which the
      calling code can't handle. Since all busses do specify an endianness in
      the current code, this makes no difference right now, but I saw no
      justification in the patch description for removing this final default.
      
      Also, clean up the code a bit:
      
      * s/of_regmap_get_endian/regmap_get_endian/ since the function isn't DT-
        specific, even if the reason it was originally added was to add some
        DT-specific features.
      * After potentially reading an endianess specification from DT, the code
        checks whether DT did specify an endianness, and if so, returns it. Move
        this test outside the whole switch statement so that if the
        REGMAP_ENDIAN_REG case ever modifies *endian, this check will pick that
        up. This partially reverts part of commit ba1b53fe ("regmap: Fix DT
        endianess parsing logic"), while maintaining the bug-fix that commit
        made to this code.
      * Make the comments briefer, and only refer to the specific action taken
        at their location. This makes most of the comments independent of DT,
        and easier to follow.
      
      Cc: Xiubo Li <Li.Xiubo@freescale.com>
      Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
      Cc: Thierry Reding <treding@nvidia.com>
      Fixes: d647c199 ("regmap: add DT endianness binding support")
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      45e1a279
    • Shengjiu Wang's avatar
      ASoC: fsl-asoc-card: move 'config SND_SOC_FSL_ASOC_CARD' to 'if SND_IMX_SOC' · 38c6e4bb
      Shengjiu Wang authored
      Build kernel with SND_SOC_FSL_ASOC_CARD=m && SND_SOC_FSL_{SSI,SAI,ESAI}=y
      leads the following error:
      
         sound/built-in.o: In function `fsl_sai_probe':
      >> fsl_sai.c:(.text+0x5f662): undefined reference to `imx_pcm_dma_init'
         sound/built-in.o: In function `fsl_esai_probe':
      >> fsl_esai.c:(.text+0x6044b): undefined reference to `imx_pcm_dma_init'
      
      The config SND_SOC_FSL_ASOC_CARD is for IMX SOC, So move it under condition
      of 'if SND_IMX_SOC'.
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@freescale.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      38c6e4bb
    • Sean Cross's avatar
      ASoC: fsl: Fix building of imx-es8328 on PPC · cdec7297
      Sean Cross authored
      The imx-es8328 driver fails to build on PPC because it explicitly depends on
      SND_SOC_IMX_PCM_FIQ, which itself doesn't build on PPC.  Instead, rely on
      the SND_SOC_FSL_SSI config option to pull in the necessary libraries.
      
      While we're at it, remove SND_SOC_FSL_UTILS, which also is not needed.
      Signed-off-by: default avatarSean Cross <xobs@kosagi.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      cdec7297
  3. 18 Aug, 2014 3 commits
    • Javier Martinez Canillas's avatar
      regmap: Fix DT endianess parsing logic · ba1b53fe
      Javier Martinez Canillas authored
      Commit d647c199 ("regmap: add DT endianness binding support.")
      added support to parse the device endianness from the device tree
      but unfortunately the added logic doesn't have the same semantics
      than the old code. This leads to a NULL dereference pointer error
      when these properties are not provided by the Device Tree:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000044
      pgd = c0004000
      [00000044] *pgd=00000000
      Internal error: Oops: 5 [#1] PREEMPT SMP ARM
      Modules linked in:
      CPU: 5 PID: 1 Comm: swapper/0 Not tainted 3.17.0-rc1-next-20140818ccu #671
      task: ea412800 ti: ea484000 task.ti: ea484000
      PC is at regmap_update_bits+0xc/0x5c
      
      The problem is that platforms that rely on the default value now
      gets different values due two related issues in the current code:
      
      a) It only parses the endianness from DT for the regmap registers
         and not for the regmap values but it checks unconditionally in
         both cases if the resulting endiannes is REGMAP_ENDIAN_NATIVE.
      
      b) REGMAP_ENDIAN_NATIVE is not even a valid DT property according
         to the regmap DT binding documentation so it shouldn't be set.
      Signed-off-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      ba1b53fe
    • Shengjiu Wang's avatar
      ASoC: fsl: fsl-asoc-card: Select SND_SOC_IMX_AUDMUX · 499898d6
      Shengjiu Wang authored
      Building kernel with SND_SOC_IMX_AUDMUX=n leads to the following error:
      
         sound/built-in.o: In function `fsl_asoc_card_probe':
      >> fsl-asoc-card.c:(.text+0x1467b5): undefined reference to `imx_audmux_v2_configure_port'
      >> fsl-asoc-card.c:(.text+0x1467d0): undefined reference to `imx_audmux_v2_configure_port'
      >> fsl-asoc-card.c:(.text+0x1467ed): undefined reference to `imx_audmux_v2_configure_port'
      >> fsl-asoc-card.c:(.text+0x146807): undefined reference to `imx_audmux_v2_configure_port'
      
      Update Kconfig to select SND_SOC_IMX_AUDMUX when SND_SOC_FSL_ASOC_CARD=y.
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@freescale.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      499898d6
    • Shengjiu Wang's avatar
      ASoC: fsl-asoc-card: Fix build warning for maybe-uninitialized · 5f37671e
      Shengjiu Wang authored
      When build fsl-asoc-card as module, there is following error:
      
      sound/soc/fsl/fsl-asoc-card.c: In function 'fsl_asoc_card_probe':
      >> sound/soc/fsl/fsl-asoc-card.c:547:13: warning: 'asrc_np' may be used uninitialized in this function [-Wmaybe-uninitialized]
           of_node_put(asrc_np);
                      ^
      
      vim +/asrc_np +547 sound/soc/fsl/fsl-asoc-card.c
      
         531                  if (width == 24)
         532                          priv->asrc_format = SNDRV_PCM_FORMAT_S24_LE;
         533                  else
         534                          priv->asrc_format = SNDRV_PCM_FORMAT_S16_LE;
         535          }
         536
         537          /* Finish card registering */
         538          platform_set_drvdata(pdev, priv);
         539          snd_soc_card_set_drvdata(&priv->card, priv);
         540
         541          ret = devm_snd_soc_register_card(&pdev->dev, &priv->card);
         542          if (ret)
         543                  dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
         544
         545  fail:
         546          of_node_put(codec_np);
       > 547          of_node_put(asrc_np);
         548          of_node_put(cpu_np);
         549
         550          return ret;
         551  }
         552
         553  static const struct of_device_id fsl_asoc_card_dt_ids[] = {
         554          { .compatible = "fsl,imx-audio-cs42888", },
         555          { .compatible = "fsl,imx-audio-sgtl5000", },
      
      Add 'asrc_fail' branch for error jump after asrc_np initialized.
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@freescale.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      5f37671e
  4. 16 Aug, 2014 28 commits