22 Jan, 2021

1 commit


20 Jan, 2021

1 commit

  • The implementation was limiting the size of a message which can be
    received to 4 but soem response can be bigger. For example the
    response of the 'sc_seco_secvio_config' API is 6 words.

    This patch removes this limitation relying on the count of word
    received instead of the index of the chan.
    It does so by duplicating imx_scu_call_rpc as imx_scu_call_big_rpc
    in order to cahnge the RX method using imx_scu_big_rx_callback
    instead of imx_scu_rx_callback.

    Signed-off-by: Franck LENORMAND

    Franck LENORMAND
     

14 Dec, 2020

9 commits

  • The Security Violation module requires SC API for the SECO, RM, MISC
    and IRQ.

    This patch does:
    - imx-scu-irq: Allow reuse of imx_scu_irq_get_status
    - seco:
    - Add imx_sc_seco_secvio_enable
    - Add imx_sc_seco_secvio_config
    - Add imx_sc_seco_secvio_dgo_config

    Signed-off-by: Franck LENORMAND

    Franck LENORMAND
     
  • Export imx_sc_pm_cpu_start for all to avoid build error

    Acked-by: Richard Zhu
    Signed-off-by: Peng Fan

    Peng Fan
     
  • In order to save power, we only need to request a channel
    when the communication with the DSP active.

    For this we export the following functions:
    - imx_dsp_request_channel, gets a channel with a given index
    - imx_dsp_free_channel, frees a channel with a given index

    Notice that we still request channels at probe to support devices
    that do not have PM callbacks implemented.

    More explanations about why requesting a channel has an effect
    on power savings:
    - requesting an mailbox channel will call mailbox's startup
    function.
    - startup function calls pm_runtime_get_sync which increments device
    usage count and will keep the device active. Specifically, mailbox
    clock will be always ON when a mailbox channel is requested.

    Signed-off-by: Daniel Baluta

    Daniel Baluta
     
  • Linux kernel does not define ENOTSUP, let's use EOPNOTSUPP

    The patch fixes the following build break when use imx_v7_defconfig

    include/linux/firmware/imx/svc/rm.h: In function ‘imx_sc_rm_find_memreg’:
    include/linux/firmware/imx/svc/rm.h:79:10: error: ‘ENOTSUP’ undeclared (first use in this function)
    return -ENOTSUP;
    ^
    include/linux/firmware/imx/svc/rm.h:79:10: note: each undeclared identifier is reported only once for each function it appears in
    include/linux/firmware/imx/svc/rm.h: In function ‘imx_sc_rm_get_resource_owner’:
    include/linux/firmware/imx/svc/rm.h:85:10: error: ‘ENOTSUP’ undeclared (first use in this function)
    return -ENOTSUP;
    ^
    include/linux/firmware/imx/svc/rm.h: In function ‘imx_sc_rm_set_memreg_permissions’:
    include/linux/firmware/imx/svc/rm.h:92:10: error: ‘ENOTSUP’ undeclared (first use in this function)
    return -ENOTSUP;
    ^
    include/linux/firmware/imx/svc/rm.h: In function ‘imx_sc_rm_get_did’:
    include/linux/firmware/imx/svc/rm.h:98:10: error: ‘ENOTSUP’ undeclared (first use in this function)
    return -ENOTSUP;
    ^

    include/linux/firmware/imx/svc/seco.h: In function ‘imx_sc_seco_build_info’:
    include/linux/firmware/imx/svc/seco.h:37:10: error: ‘ENOTSUP’ undeclared (first use in this function)
    return -ENOTSUP;
    ^
    include/linux/firmware/imx/svc/seco.h: In function ‘imx_sc_seco_sab_msg’:
    include/linux/firmware/imx/svc/seco.h:43:10: error: ‘ENOTSUP’ undeclared (first use in this function)
    return -ENOTSUP;

    Fixes: 10237c7bcb174bcc("LF-824: fw: imx: scu: Add missing APIs") and
    Fixes: 9edf1255f89b9351("LF-824: fw: imx: scu: Add SECO API")

    Reviewed-by: Dong Aisheng
    Signed-off-by: Jason Liu

    Jason Liu
     
  • This patch adds the driver to interact with the different
    APIs exposed by the SECO using a shared Messaging Unit.

    The driver exposes some char devices in user space allowing
    a user to send message to the SECO and read its response.

    The driver uses the mailbox framework instead of directly
    configuring the MU.

    Signed-off-by: Silvano di Ninno
    Signed-off-by: Franck LENORMAND
    Acked-by: Dong Aisheng
    Acked-by: Leonard Crestez

    Silvano di Ninno
     
  • Add APIS:
    - IMX_SC_SECO_FUNC_BUILD_INFO
    - IMX_SC_SECO_FUNC_SAB_MSG

    Signed-off-by: Franck LENORMAND
    Acked-by: Dong Aisheng
    Acked-by: Leonard Crestez

    Franck LENORMAND
     
  • APIs added:
    - IMX_SC_RM_FUNC_FIND_MEMREG
    - IMX_SC_RM_FUNC_GET_RESOURCE_OWNER
    - IMX_SC_RM_FUNC_SET_MEMREG_PERMISSIONS
    - IMX_SC_RM_FUNC_GET_DID

    Signed-off-by: Franck LENORMAND
    Acked-by: Dong Aisheng
    Acked-by: Leonard Crestez

    Franck LENORMAND
     
  • Add imx_sc_rm_get_partition to get the runtime partition number.

    Reviewed-by: zhang sanshan
    Signed-off-by: Peng Fan

    Peng Fan
     
  • Liu Ying
     

24 Nov, 2020

1 commit

  • Currently array of fix length PM_API_MAX is used to cache
    the pm_api version (valid or invalid). However ATF based
    PM APIs values are much higher then PM_API_MAX.
    So to include ATF based PM APIs also, use hash-table to
    store the pm_api version status.

    Signed-off-by: Amit Sunil Dhamne
    Reported-by: Arnd Bergmann 
    Signed-off-by: Ravi Patel
    Signed-off-by: Rajan Vaja
    Reviewed-by: Arnd Bergmann
    Tested-by: Michal Simek
    Fixes: f3217d6f2f7a ("firmware: xilinx: fix out-of-bounds access")
    Cc: stable
    Link: https://lore.kernel.org/r/1606197161-25976-1-git-send-email-rajan.vaja@xilinx.com
    Signed-off-by: Michal Simek

    Amit Sunil Dhamne
     

06 Aug, 2020

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the large set of char and misc and other driver subsystem
    patches for 5.9-rc1. Lots of new driver submissions in here, and
    cleanups and features for existing drivers.

    Highlights are:
    - habanalabs driver updates
    - coresight driver updates
    - nvmem driver updates
    - huge number of "W=1" build warning cleanups from Lee Jones
    - dyndbg updates
    - virtbox driver fixes and updates
    - soundwire driver updates
    - mei driver updates
    - phy driver updates
    - fpga driver updates
    - lots of smaller individual misc/char driver cleanups and fixes

    Full details are in the shortlog.

    All of these have been in linux-next with no reported issues"

    * tag 'char-misc-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (322 commits)
    habanalabs: remove unused but set variable 'ctx_asid'
    nvmem: qcom-spmi-sdam: Enable multiple devices
    dt-bindings: nvmem: SID: add binding for A100's SID controller
    nvmem: update Kconfig description
    nvmem: qfprom: Add fuse blowing support
    dt-bindings: nvmem: Add properties needed for blowing fuses
    dt-bindings: nvmem: qfprom: Convert to yaml
    nvmem: qfprom: use NVMEM_DEVID_AUTO for multiple instances
    nvmem: core: add support to auto devid
    nvmem: core: Add nvmem_cell_read_u8()
    nvmem: core: Grammar fixes for help text
    nvmem: sc27xx: add sc2730 efuse support
    nvmem: Enforce nvmem stride in the sysfs interface
    MAINTAINERS: Add git tree for NVMEM FRAMEWORK
    nvmem: sprd: Fix return value of sprd_efuse_probe()
    drivers: android: Fix the SPDX comment style
    drivers: android: Fix a variable declaration coding style issue
    drivers: android: Remove braces for a single statement if-else block
    drivers: android: Remove the use of else after return
    drivers: android: Fix a variable declaration coding style issue
    ...

    Linus Torvalds
     

13 Jul, 2020

1 commit

  • The i.MX SCU soc driver depends on SCU firmware driver, so it has to
    use platform driver model for proper defer probe operation, since
    it has no device binding in DT file, a simple platform device is
    created together inside the platform driver. To make it more clean,
    we can just move the entire SCU soc driver into imx firmware folder
    and initialized by i.MX SCU firmware driver.

    Signed-off-by: Anson Huang
    Signed-off-by: Shawn Guo

    Anson Huang
     

02 Jul, 2020

2 commits

  • Extend Intel Stratix10 service layer driver to support new RSU DCMF
    versions and max retry parameter.

    DCMF = Decision Configuration Management Firmware. The max retry parameter
    is the maximum times the images is allowed to reload itself before giving
    up and starting RSU failover flow.

    Signed-off-by: Richard Gong
    Link: https://lore.kernel.org/r/1592231348-31334-3-git-send-email-richard.gong@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Richard Gong
     
  • Correct the incorrect flag value for COMMAND_RECONFIG_FLAG_PARTIAL and
    increase FPGA reconfig timeout values so that Intel service layer and
    FPGA manager drivers can work with all versions of firmware.

    Signed-off-by: Richard Gong
    Link: https://lore.kernel.org/r/1592231348-31334-2-git-send-email-richard.gong@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Richard Gong
     

23 Jun, 2020

1 commit

  • Add resource management API, when we have multiple
    partition running together, resources not owned to current
    partition should not be used.

    Reviewed-by: Leonard Crestez
    Reviewed-by: Dong Aisheng
    Signed-off-by: Peng Fan
    Signed-off-by: Shawn Guo

    Peng Fan
     

08 Jun, 2020

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the large set of char/misc driver patches for 5.8-rc1

    Included in here are:

    - habanalabs driver updates, loads

    - mhi bus driver updates

    - extcon driver updates

    - clk driver updates (approved by the clock maintainer)

    - firmware driver updates

    - fpga driver updates

    - gnss driver updates

    - coresight driver updates

    - interconnect driver updates

    - parport driver updates (it's still alive!)

    - nvmem driver updates

    - soundwire driver updates

    - visorbus driver updates

    - w1 driver updates

    - various misc driver updates

    In short, loads of different driver subsystem updates along with the
    drivers as well.

    All have been in linux-next for a while with no reported issues"

    * tag 'char-misc-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (233 commits)
    habanalabs: correctly cast u64 to void*
    habanalabs: initialize variable to default value
    extcon: arizona: Fix runtime PM imbalance on error
    extcon: max14577: Add proper dt-compatible strings
    extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()'
    extcon: remove redundant assignment to variable idx
    w1: omap-hdq: print dev_err if irq flags are not cleared
    w1: omap-hdq: fix interrupt handling which did show spurious timeouts
    w1: omap-hdq: fix return value to be -1 if there is a timeout
    w1: omap-hdq: cleanup to add missing newline for some dev_dbg
    /dev/mem: Revoke mappings when a driver claims the region
    misc: xilinx-sdfec: convert get_user_pages() --> pin_user_pages()
    misc: xilinx-sdfec: cleanup return value in xsdfec_table_write()
    misc: xilinx-sdfec: improve get_user_pages_fast() error handling
    nvmem: qfprom: remove incorrect write support
    habanalabs: handle MMU cache invalidation timeout
    habanalabs: don't allow hard reset with open processes
    habanalabs: GAUDI does not support soft-reset
    habanalabs: add print for soft reset due to event
    habanalabs: improve MMU cache invalidation code
    ...

    Linus Torvalds
     

26 May, 2020

1 commit

  • …wnguo/linux into arm/drivers

    i.MX drivers update for 5.8:

    - Optimize imx-scu driver to use one TX and one RX instead of four for
    talking to SCU.
    - Fix one possible message header corruption where the response is
    longer than the request.
    - Move System Control defines into dt-bindings header, so that DT can
    use them as well.
    - A couple of small fixups.

    * tag 'imx-drivers-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
    firmware: imx: scu: Fix possible memory leak in imx_scu_probe()
    dt-bindings: firmware: imx: Add more system controls and PM clock types
    dt-bindings: firmware: imx: Move system control into dt-binding headfile
    firmware: imx: scu: Fix corruption of header
    firmware: imx-scu: Support one TX and one RX
    soc: imx8m: No need to put node when of_find_compatible_node() failed

    Link: https://lore.kernel.org/r/20200523032516.11016-1-shawnguo@kernel.org
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>

    Arnd Bergmann
     

13 May, 2020

1 commit


07 May, 2020

1 commit

  • ASUS TF300T device may not work properly if firmware is asked to fully
    re-initialize L2 cache after resume from LP2 suspend. The downstream
    kernel of TF300T uses different opcode to enable cache after resuming
    from LP2, this opcode also works fine on Nexus 7 and Ouya devices.
    Supposedly, this may be needed by an older firmware versions.

    Reported-by: Michał Mirosław
    Tested-by: Michał Mirosław
    Tested-by: Jasper Korten
    Tested-by: David Heidelberg
    Tested-by: Peter Geis
    Signed-off-by: Dmitry Osipenko
    Signed-off-by: Thierry Reding

    Dmitry Osipenko
     

28 Apr, 2020

19 commits

  • Add sysfs interface to set boot health status from user space.
    Add API used by this interface to communicate with firmware.

    If PMUFW is compiled with CHECK_HEALTHY_BOOT, it will check the
    healthy bit on FPD WDT expiration. If healthy bit is set by a user
    application running in Linux, PMUFW will do APU only restart. If
    healthy bit is not set during FPD WDT expiration, PMUFW will do
    system restart.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Michal Simek
    Signed-off-by: Tejas Patel
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-26-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • The Linux shutdown functionality implemented via PSCI system_off does
    not include an option to set a scope, i.e. which parts of the system to
    shut down.

    This patch creates sysfs that allows to set the shutdown scope for the
    next shutdown request. When the next shutdown is performed, the platform
    specific portion of PSCI-system_off can use the chosen shutdown scope.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Stefan Krsmanovic
    Signed-off-by: Michal Simek
    Signed-off-by: Tejas Patel
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-25-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Add system shutdown API interface which asks firmware to
    perform system shutdown/restart.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Michal Simek
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-24-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Add firmware-ggs sysfs interface which provides read/write
    interface to global storage registers.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Michal Simek
    Signed-off-by: Tejas Patel
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-23-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Add APIs to read/write PGGS and GGS registers.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-22-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Use direct function call instead of using eemi ops for fpga related
    APIs. Also remove eemi ops structure.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-21-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Use direct function call for aes engine instead of using eemi ops.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-20-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Use direct function call instead of using eemi ops for
    set_requirement.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-19-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Use direct function call instead of using eemi ops for release_node.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-18-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Use direct function call instead of using eemi ops for request_node.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-17-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Use direct function call instead of eemi ops for set_suspend_mode.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-16-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Use direct function call instead of eemi ops for init_finalize.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-15-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Use direct function call instead of using eemi ops for
    reset_get_status.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-14-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Use direct function call instead of using eemi ops for
    reset_assert.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-13-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Remove IOCTL API and use individual APIs for better readability.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-12-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Use direct function call instead of eemi ops for clock set/get parent.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-11-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Use direct function call instead of eemi ops for clock set/get rate.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-10-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Use direct function call instead of using eemi ops for
    clock_getdivider.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-9-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja
     
  • Use direct function call instead of using eemi ops for
    clock_setdivider.

    Signed-off-by: Rajan Vaja
    Signed-off-by: Jolly Shah
    Link: https://lore.kernel.org/r/1587761887-4279-8-git-send-email-jolly.shah@xilinx.com
    Signed-off-by: Greg Kroah-Hartman

    Rajan Vaja