Skip to content
Snippets Groups Projects
  1. Jan 25, 2019
  2. Jan 16, 2019
  3. Jan 11, 2019
  4. Jan 09, 2019
  5. Jan 08, 2019
    • Ioana Ciornei's avatar
      soc: fsl: dpio: use a cpumask to identify which cpus are unused · 991e8732
      Ioana Ciornei authored
      
      The current implementation of the dpio driver uses a static next_cpu
      variable to keep track of the index of the next cpu available. This
      approach does not handle well unbinding and binding dpio devices in a
      random order. For example, unbinding a dpio and then binding it again
      with the driver, will generate the below error:
      
      $ echo dpio.5 > /sys/bus/fsl-mc/drivers/fsl_mc_dpio/unbind
      $ echo dpio.5 > /sys/bus/fsl-mc/drivers/fsl_mc_dpio/bind
      [  103.946380] fsl_mc_dpio dpio.5: probe failed. Number of DPIOs exceeds
      NR_CPUS.
      [  103.955157] fsl_mc_dpio dpio.5: fsl_mc_driver_probe failed: -34
      -bash: echo: write error: No such device
      
      Fix this error by keeping a global cpumask of unused cpus that will be
      updated at every dpaa2_dpio_[probe,remove].
      
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarLi Yang <leoyang.li@nxp.com>
      991e8732
  6. Dec 19, 2018
  7. Dec 14, 2018
    • Jon Hunter's avatar
      soc/tegra: pmc: Drop SMP dependency from CPU APIs · f9c380ef
      Jon Hunter authored
      
      When CONFIG_SMP is disabled, the tegra clk driver now fails to build:
      
      drivers/clk/tegra/clk-tegra30.c: In function ‘tegra30_cpu_rail_off_ready’:
      drivers/clk/tegra/clk-tegra30.c:1151:2: error: implicit declaration of function ‘tegra_pmc_cpu_is_powered’ [-Werror=implicit-function-declaration]
        cpu_pwr_status = tegra_pmc_cpu_is_powered(1) ||
          ^
      Fix the above error by removing the CONFIG_SMP ifdef around the
      declaration around the PMC CPU APIs because although these are not
      needed for non-SMP configurations, there is no harm in including these
      for non-SMP builds either.
      
      Fixes: 61866523ed6e ("clk: tegra30: Use Tegra CPU powergate helper function")
      Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
      Acked-by: default avatarThierry Reding <treding@nvidia.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      f9c380ef
  8. Nov 28, 2018
  9. Nov 23, 2018
  10. Nov 21, 2018
  11. Nov 14, 2018
    • Stephen Boyd's avatar
      soc: qcom: cmd-db: Stop memcpy()ing in cmd_db_read_aux_data() · ed3cafa7
      Stephen Boyd authored
      
      Let's change the function signature to return the pointer to memory or
      an error pointer on failure, and take an argument that lets us return
      the size of the aux data read. This way we can remove the
      cmd_db_read_aux_data_len() API entirely and also get rid of the memcpy
      operation from cmd_db to the caller. Updating the only user of this code
      shows that making this change allows us to remove a function and put the
      lookup where the user is.
      
      Cc: Mahesh Sivasubramanian <msivasub@codeaurora.org>
      Cc: Lina Iyer <ilina@codeaurora.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Evan Green <evgreen@chromium.org>
      Cc: Jordan Crouse <jcrouse@codeaurora.org>
      Cc: Rob Clark <robdclark@gmail.com>
      Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Signed-off-by: default avatarAndy Gross <andy.gross@linaro.org>
      ed3cafa7
  12. Nov 13, 2018
  13. Nov 08, 2018
  14. Oct 23, 2018
  15. Oct 05, 2018
  16. Sep 27, 2018
    • Laurentiu Tudor's avatar
      soc: fsl: qbman: add APIs to retrieve the probing status · 853dc104
      Laurentiu Tudor authored
      
      Add a couple of new APIs to check the probing status of qman and bman:
       'int bman_is_probed()' and 'int qman_is_probed()'.
      They return the following values.
       *  1 if qman/bman were probed correctly
       *  0 if qman/bman were not yet probed
       * -1 if probing of qman/bman failed
      Drivers that use qman/bman driver services are required to use these
      APIs before calling any functions exported by qman or bman drivers
      or otherwise they will crash the kernel.
      The APIs will be used in the following couple of qbman portal patches
      and later in the series in the dpaa1 ethernet driver.
      
      Signed-off-by: default avatarLaurentiu Tudor <laurentiu.tudor@nxp.com>
      Signed-off-by: default avatarLi Yang <leoyang.li@nxp.com>
      853dc104
  17. Sep 21, 2018
  18. Aug 27, 2018
  19. Jul 24, 2018
  20. Jul 21, 2018
    • Lina Iyer's avatar
      drivers: qcom: rpmh: add support for batch RPMH request · c8790cb6
      Lina Iyer authored
      
      Platform drivers need make a lot of resource state requests at the same
      time, say, at the start or end of an usecase. It can be quite
      inefficient to send each request separately. Instead they can give the
      RPMH library a batch of requests to be sent and wait on the whole
      transaction to be complete.
      
      rpmh_write_batch() is a blocking call that can be used to send multiple
      RPMH command sets. Each RPMH command set is set asynchronously and the
      API blocks until all the command sets are complete and receive their
      tx_done callbacks.
      
      Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
      Signed-off-by: default avatarRaju P.L.S.S.S.N <rplsssn@codeaurora.org>
      Reviewed-by: default avatarMatthias Kaehlcke <mka@chromium.org>
      Signed-off-by: default avatarAndy Gross <andy.gross@linaro.org>
      c8790cb6
    • Lina Iyer's avatar
      drivers: qcom: rpmh: allow requests to be sent asynchronously · 564b5e24
      Lina Iyer authored
      
      Platform drivers that want to send a request but do not want to block
      until the RPMH request completes have now a new API -
      rpmh_write_async().
      
      The API allocates memory and send the requests and returns the control
      back to the platform driver. The tx_done callback from the controller is
      handled in the context of the controller's thread and frees the
      allocated memory. This API allows RPMH requests from atomic contexts as
      well.
      
      Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
      Signed-off-by: default avatarRaju P.L.S.S.S.N <rplsssn@codeaurora.org>
      Signed-off-by: default avatarAndy Gross <andy.gross@linaro.org>
      564b5e24
    • Lina Iyer's avatar
      drivers: qcom: rpmh: cache sleep/wake state requests · 600513df
      Lina Iyer authored
      
      Active state requests are sent immediately to the RSC controller, while
      sleep and wake state requests are cached in this driver to avoid taxing
      the RSC controller repeatedly. The cached values will be sent to the
      controller when the rpmh_flush() is called.
      
      Generally, flushing is a system PM activity and may be called from the
      system PM drivers when the system is entering suspend or deeper sleep
      modes during cpuidle.
      
      Also allow invalidating the cached requests, so they may be re-populated
      again.
      
      Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
      [rplsssn: remove unneeded semicolon, address line over 80chars error]
      Signed-off-by: default avatarRaju P.L.S.S.S.N <rplsssn@codeaurora.org>
      Reviewed-by: default avatarEvan Green <evgreen@chromium.org>
      Reviewed-by: default avatarMatthias Kaehlcke <mka@chromium.org>
      Signed-off-by: default avatarAndy Gross <andy.gross@linaro.org>
      600513df
    • Lina Iyer's avatar
      drivers: qcom: rpmh: add RPMH helper functions · c1038456
      Lina Iyer authored
      
      Sending RPMH requests and waiting for response from the controller
      through a callback is common functionality across all platform drivers.
      To simplify drivers, add a library functions to create RPMH client and
      send resource state requests.
      
      rpmh_write() is a synchronous blocking call that can be used to send
      active state requests.
      
      Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
      Signed-off-by: default avatarRaju P.L.S.S.S.N <rplsssn@codeaurora.org>
      Signed-off-by: default avatarAndy Gross <andy.gross@linaro.org>
      c1038456
    • Lina Iyer's avatar
      drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs · 658628e7
      Lina Iyer authored
      
      Add controller driver for QCOM SoCs that have hardware based shared
      resource management. The hardware IP known as RSC (Resource State
      Coordinator) houses multiple Direct Resource Voter (DRV) for different
      execution levels. A DRV is a unique voter on the state of a shared
      resource. A Trigger Control Set (TCS) is a bunch of slots that can house
      multiple resource state requests, that when triggered will issue those
      requests through an internal bus to the Resource Power Manager Hardened
      (RPMH) blocks. These hardware blocks are capable of adjusting clocks,
      voltages, etc. The resource state request from a DRV are aggregated
      along with state requests from other processors in the SoC and the
      aggregate value is applied on the resource.
      
      Some important aspects of the RPMH communication -
      - Requests are <addr, value> with some header information
      - Multiple requests (upto 16) may be sent through a TCS, at a time
      - Requests in a TCS are sent in sequence
      - Requests may be fire-n-forget or completion (response expected)
      - Multiple TCS from the same DRV may be triggered simultaneously
      - Cannot send a request if another request for the same addr is in
        progress from the same DRV
      - When all the requests from a TCS are complete, an IRQ is raised
      - The IRQ handler needs to clear the TCS before it is available for
        reuse
      - TCS configuration is specific to a DRV
      - Platform drivers may use DRV from different RSCs to make requests
      
      Resource state requests made when CPUs are active are called 'active'
      state requests. Requests made when all the CPUs are powered down (idle
      state) are called 'sleep' state requests. They are matched by a
      corresponding 'wake' state requests which puts the resources back in to
      previously requested active state before resuming any CPU. TCSes are
      dedicated for each type of requests. Active mode TCSes (AMC) are used to
      send requests immediately to the resource, while control TCS are used to
      provide specific information to the controller. Sleep and Wake TCS send
      sleep and wake requests, after and before the system halt respectively.
      
      Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
      Signed-off-by: default avatarRaju P.L.S.S.S.N <rplsssn@codeaurora.org>
      Signed-off-by: default avatarAndy Gross <andy.gross@linaro.org>
      658628e7
  21. Jun 22, 2018
  22. Jun 02, 2018
    • Arnd Bergmann's avatar
      ARM: tegra: fix compile-testing PCI host driver · 32561354
      Arnd Bergmann authored
      
      The tegra_cpuidle_pcie_irqs_in_use() function is stubbed out for non-ARM
      builds, but now we can compile-test the Tegra pci driver on non-Tegra
      ARM platforms as well, which results in a new link error:
      
      drivers/pci/host/pci-tegra.o: In function `tegra_pcie_map_irq':
      pci-tegra.c:(.text+0x288): undefined reference to `tegra_cpuidle_pcie_irqs_in_use'
      drivers/pci/host/pci-tegra.o: In function `tegra_msi_map':
      pci-tegra.c:(.text+0xba0): undefined reference to `tegra_cpuidle_pcie_irqs_in_use'
      
      This adapts the #ifdef statement to match the exact condition under which
      the function can be called.
      
      Fixes: 51bc085d ("PCI: Improve host drivers compile test coverage")
      Cc: Rob Herring <robh@kernel.org>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Acked-by: default avatarThierry Reding <treding@nvidia.com>
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      32561354
  23. May 25, 2018
  24. Apr 30, 2018
Loading