1. 02 10月, 2014 1 次提交
  2. 28 8月, 2014 6 次提交
  3. 20 8月, 2014 2 次提交
    • S
      regmap: of_regmap_get_endian() cleanup · 45e1a279
      Stephen Warren 提交于
      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: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      45e1a279
    • S
      ASoC: fsl-asoc-card: move 'config SND_SOC_FSL_ASOC_CARD' to 'if SND_IMX_SOC' · 38c6e4bb
      Shengjiu Wang 提交于
      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: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NShengjiu Wang <shengjiu.wang@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      38c6e4bb
  4. 19 8月, 2014 2 次提交
    • S
      ASoC: fsl: Fix building of imx-es8328 on PPC · cdec7297
      Sean Cross 提交于
      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: NSean Cross <xobs@kosagi.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      cdec7297
    • J
      regmap: Fix DT endianess parsing logic · ba1b53fe
      Javier Martinez Canillas 提交于
      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: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      ba1b53fe
  5. 18 8月, 2014 2 次提交
    • S
      ASoC: fsl: fsl-asoc-card: Select SND_SOC_IMX_AUDMUX · 499898d6
      Shengjiu Wang 提交于
      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: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NShengjiu Wang <shengjiu.wang@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      499898d6
    • S
      ASoC: fsl-asoc-card: Fix build warning for maybe-uninitialized · 5f37671e
      Shengjiu Wang 提交于
      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: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NShengjiu Wang <shengjiu.wang@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      5f37671e
  6. 17 8月, 2014 8 次提交
    • S
      ASoC: fsl: add imx-es8328 machine driver · 7e7292db
      Sean Cross 提交于
      This adds an initial machine driver for the ES8328 audio codec on Freescale
      boards.  The driver supports headphones and an audio regulator for an onboard
      speaker amp.
      Signed-off-by: NSean Cross <xobs@kosagi.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      7e7292db
    • M
      Merge branch 'topic/es8328' of... · e1a65374
      Mark Brown 提交于
      Merge branch 'topic/es8328' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fsl
      e1a65374
    • S
      ASoC: add es8328 codec driver · 567e4f98
      Sean Cross 提交于
      Add a codec driver for the Everest ES8328.  It supports two separate audio
      outputs and two separate audio inputs.
      Signed-off-by: NSean Cross <xobs@kosagi.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      567e4f98
    • S
      devicetree: bindings: Add Everest Semicodunctor · d4f7facd
      Sean Cross 提交于
      Everest Semiconductor makes audio codecs.
      Signed-off-by: NSean Cross <xobs@kosagi.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      d4f7facd
    • N
      ASoC: fsl: Add Freescale Generic ASoC Sound Card with ASRC support · 708b4351
      Nicolin Chen 提交于
      The Freescale Generic ASoC Sound Card is a general ASoC DAI Link driver that
      can be used, ideally, for all Freescale CPU DAI drivers and external CODECs.
      
      The idea of this generic sound card is a bit like ASoC Simple Card. However,
      for Freescale SoCs (especially those released in recent years), most of them
      have ASRC (Documentation/devicetree/bindings/sound/fsl,asrc.txt) inside. And
      this is a specific feature that might be painstakingly controlled and merged
      into the Simple Card driver.
      
      So having this driver will allow all Freescale SoC users to benefit from the
      simplification to support a new card and the capability of wide sample rates
      support through ASRC.
      
      The driver is initially designed for sound card using I2S or PCM DAI formats.
      However, it's also possible to merge those non-I2S/PCM type sound cards, such
      as S/PDIF audio and HDMI audio, into this card as long as the merge will not
      break the original function and as long as there is something redundant that
      can be abstracted along with I2S type sound cards.
      
      As an initial version, it only supports three cards that I can test:
      imx-audio-cs42888, a new card that links ESAI with CS42888 CODEC
      imx-audio-sgtl5000, just like the old imx-sgtl5000.c driver
      imx-audio-wm8962, just like the old imx-wm8962.c driver
      
      The driver is also compatible with the old Device Tree bindings of WM8962 and
      SGTL5000. So we may consider to remove those two drivers after this driver is
      totally enabled. (It needs to be added into defconfig)
      Signed-off-by: NNicolin Chen <nicoleotsuka@gmail.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      708b4351
    • X
      regmap: Add the DT binding documentation for endianness · 275876e2
      Xiubo Li 提交于
      Device-Tree binding for device endianness
      Index     Device     Endianness properties
      ---------------------------------------------------
      1         BE         'big-endian'
      2         LE         'little-endian'
      
      For one device driver, which will run in different scenarios above
      on different SoCs using the devicetree, we need one way to simplify
      this.
      Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      275876e2
    • X
      regmap: add DT endianness binding support. · d647c199
      Xiubo Li 提交于
      For many drivers which will support rich endianness of Devices
      need define DT properties by itself with the binding support.
      
      The endianness using regmap:
      Index      Device     Properties if needs bytes-swap,
                            or just ignore it
      -------------------------------------------------------------
      1          BE         'big-endian'
      2          LE         'little-endian'
      
      The properties include all the register values and the buffers.
      And these properties are very usful for the MMIO devices:
      
      Such as: a memory-mapped device, on one SoC is in BE mode, while
      in another SoC will be in LE mode, and the CPU will always in LE
      mode.
      
      For the first case, we must use cpu_to_be32/be32_to_cpu for
      32-bit registers accessing, so the 'big-endian' property is needed.
      
      For the second case, we can just ignore the bytes-swap
      functions like cpu_to_le32/le32_to_cpu, so the 'little-endian'
      property could be abscent.
      
      And vice versa...
      Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      d647c199
    • L
      Linux 3.17-rc1 · 7d1311b9
      Linus Torvalds 提交于
      7d1311b9
  7. 16 8月, 2014 19 次提交