27 Sep, 2022

1 commit

  • This is the 5.15.70 stable release

    * tag 'v5.15.70': (2444 commits)
    Linux 5.15.70
    ALSA: hda/sigmatel: Fix unused variable warning for beep power change
    cgroup: Add missing cpus_read_lock() to cgroup_attach_task_all()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm/boot/dts/imx6ul.dtsi
    arch/arm/mm/mmu.c
    arch/arm64/boot/dts/freescale/imx8mp-evk.dts
    drivers/gpu/drm/imx/dcss/dcss-kms.c
    drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
    drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h
    drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    drivers/soc/fsl/Kconfig
    drivers/soc/imx/gpcv2.c
    drivers/usb/dwc3/host.c
    net/dsa/slave.c
    sound/soc/fsl/imx-card.c

    Jason Liu
     

12 Jul, 2022

1 commit

  • [ Upstream commit 1869023e24c0de73a160a424dac4621cefd628ae ]

    HyperFlash devices in Renesas SoCs use 2-bytes addressing, according
    to HW manual paragraph 62.3.3 (which officially describes Serial Flash
    access, but seems to be applicable to HyperFlash too). And 1-byte bus
    read operations to 2-bytes unaligned addresses in external address space
    read mode work incorrectly (returns the other byte from the same word).

    Function memcpy_fromio(), used by the driver to read data from the bus,
    in ARM64 architecture (to which Renesas cores belong) uses 8-bytes
    bus accesses for appropriate aligned addresses, and 1-bytes accesses
    for other addresses. This results in incorrect data read from HyperFlash
    in unaligned cases.

    This issue can be reproduced using something like the following commands
    (where mtd1 is a parition on Hyperflash storage, defined properly
    in a device tree):

    [Correct fragment, read from Hyperflash]

    root@rcar-gen3:~# dd if=/dev/mtd1 of=/tmp/zz bs=32 count=1
    root@rcar-gen3:~# hexdump -C /tmp/zz
    00000000 f4 03 00 aa f5 03 01 aa f6 03 02 aa f7 03 03 aa |................|
    00000010 00 00 80 d2 40 20 18 d5 00 06 81 d2 a0 18 a6 f2 |....@ ..........|
    00000020

    [Incorrect read of the same fragment: see the difference at offsets 8-11]

    root@rcar-gen3:~# dd if=/dev/mtd1 of=/tmp/zz bs=12 count=1
    root@rcar-gen3:~# hexdump -C /tmp/zz
    00000000 f4 03 00 aa f5 03 01 aa 03 03 aa aa |............|
    0000000c

    Fix this issue by creating a local replacement of the copying function,
    that performs only properly aligned bus accesses, and is used for reading
    from HyperFlash.

    Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver")
    Cc:
    Signed-off-by: Andrew Gabbasov
    Link: https://lore.kernel.org/r/20210922184830.29147-1-andrew_gabbasov@mentor.com
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Sasha Levin

    Andrew Gabbasov
     

30 Jun, 2022

3 commits

  • This is the 5.15.51 stable release

    * tag 'v5.15.51': (136 commits)
    Linux 5.15.51
    powerpc/pseries: wire up rng during setup_arch()
    kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS (2nd attempt)
    ...

    Signed-off-by: Jason Liu

    Jason Liu
     
  • This is the 5.15.50 stable release

    * tag 'v5.15.50': (1395 commits)
    Linux 5.15.50
    arm64: mm: Don't invalidate FROM_DEVICE buffers at start of DMA transfer
    serial: core: Initialize rs485 RTS polarity already on probe
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    drivers/bus/fsl-mc/fsl-mc-bus.c
    drivers/crypto/caam/ctrl.c
    drivers/pci/controller/dwc/pci-imx6.c
    drivers/spi/spi-fsl-qspi.c
    drivers/tty/serial/fsl_lpuart.c
    include/uapi/linux/dma-buf.h

    Jason Liu
     
  • This is the 5.15.41 stable release

    * tag 'v5.15.41': (1977 commits)
    Linux 5.15.41
    usb: gadget: uvc: allow for application to cleanly shutdown
    usb: gadget: uvc: rename function to be more consistent
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
    arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
    arch/arm64/configs/defconfig
    drivers/clk/imx/clk-imx8qxp-lpcg.c
    drivers/dma/imx-sdma.c
    drivers/gpu/drm/bridge/nwl-dsi.c
    drivers/mailbox/imx-mailbox.c
    drivers/net/phy/at803x.c
    drivers/tty/serial/fsl_lpuart.c
    security/keys/trusted-keys/trusted_core.c

    Jason Liu
     

29 Jun, 2022

1 commit

  • commit 1332661e09304b7b8e84e5edc11811ba08d12abe upstream.

    of_parse_phandle() returns a node pointer with refcount
    incremented, we should use of_node_put() on it when not need anymore.
    This function doesn't call of_node_put() in some error paths.
    To unify the structure, Add put_node label and goto it on errors.

    Fixes: 6e7674c3c6df ("memory: Add DMC driver for Exynos5422")
    Signed-off-by: Miaoqian Lin
    Reviewed-by: Lukasz Luba
    Link: https://lore.kernel.org/r/20220602041721.64348-1-linmq006@gmail.com
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Greg Kroah-Hartman

    Miaoqian Lin
     

09 Jun, 2022

1 commit

  • [ Upstream commit 56653827f0d7bc7c2d8bac0e119fd1521fa9990a ]

    'dmc->counter' is a 'struct devfreq_event_dev **', so there is some
    over memory allocation. 'counters_size' should be computed with
    'sizeof(struct devfreq_event_dev *)'.

    Use 'sizeof(*dmc->counter)' instead to fix it.

    While at it, use devm_kcalloc() instead of devm_kzalloc()+open coded
    multiplication.

    Fixes: 6e7674c3c6df ("memory: Add DMC driver for Exynos5422")
    Signed-off-by: Christophe JAILLET
    Link: https://lore.kernel.org/r/69d7e69346986e2fdb994d4382954c932f9f0993.1647760213.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Sasha Levin

    Christophe JAILLET
     

09 May, 2022

1 commit

  • [ Upstream commit 7e842d70fe599bc13594b650b2144c4b6e6d6bf1 ]

    HyperFlash devices fail to probe:

    rpc-if-hyperflash rpc-if-hyperflash: probing of hyperbus device failed

    In HyperFlash or Octal-SPI Flash mode, the Transfer Data Enable bits
    (SPIDE) in the Manual Mode Enable Setting Register (SMENR) are derived
    from half of the transfer size, cfr. the rpcif_bits_set() helper
    function. However, rpcif_reg_{read,write}() does not take the bus size
    into account, and does not double all Manual Mode Data Register access
    sizes when communicating with a HyperFlash or Octal-SPI Flash device.

    Fix this, and avoid the back-and-forth conversion between transfer size
    and Transfer Data Enable bits, by explicitly storing the transfer size
    in struct rpcif, and using that value to determine access size in
    rpcif_reg_{read,write}().

    Enforce that the "high" Manual Mode Read/Write Data Registers
    (SM[RW]DR1) are only used for 8-byte data accesses.
    While at it, forbid writing to the Manual Mode Read Data Registers,
    as they are read-only.

    Fixes: fff53a551db50f5e ("memory: renesas-rpc-if: Correct QSPI data transfer in Manual mode")
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Krzysztof Kozlowski
    Tested-by: Lad Prabhakar
    Tested-by: Wolfram Sang
    Reviewed-by: Wolfram Sang
    Link: https://lore.kernel.org/r/cde9bfacf704c81865f57b15d1b48a4793da4286.1649681476.git.geert+renesas@glider.be
    Link: https://lore.kernel.org/r/20220420070526.9367-1-krzysztof.kozlowski@linaro.org'
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Sasha Levin

    Geert Uytterhoeven
     

20 Apr, 2022

2 commits

  • commit b452dbf24d7d9a990d70118462925f6ee287d135 upstream.

    Make sure to free the flash platform device in the event that
    registration fails during probe.

    Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver")
    Cc: stable@vger.kernel.org # 5.8
    Cc: Sergei Shtylyov
    Signed-off-by: Johan Hovold
    Link: https://lore.kernel.org/r/20220303180632.3194-1-johan@kernel.org
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • [ Upstream commit 6f296a9665ba5ac68937bf11f96214eb9de81baa ]

    The device_node pointer is returned by of_parse_phandle() with refcount
    incremented. We should use of_node_put() on it when done.

    Fixes: 87108dc78eb8 ("memory: atmel-ebi: Enable the SMC clock if specified")
    Signed-off-by: Miaoqian Lin
    Reviewed-by: Claudiu Beznea
    Link: https://lore.kernel.org/r/20220309110144.22412-1-linmq006@gmail.com
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Sasha Levin

    Miaoqian Lin
     

08 Apr, 2022

2 commits

  • [ Upstream commit 5b5ab1bfa1898c6d52936a57c25c5ceba2cb2f87 ]

    The pointer temp is allocated by devm_kzalloc(), so it should be
    checked for error handling.

    Fixes: 7ec944538dde ("memory: emif: add basic infrastructure for EMIF driver")
    Signed-off-by: Jia-Ju Bai
    Link: https://lore.kernel.org/r/20220225132552.27894-1-baijiaju1990@gmail.com
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Sasha Levin

    Jia-Ju Bai
     
  • [ Upstream commit fd7bd80b46373887b390852f490f21b07e209498 ]

    As the potential failure of the devm_request_threaded_irq(),
    it should be better to check the return value of the
    setup_interrupts() and return error if fails.

    Fixes: 68b4aee35d1f ("memory: emif: add interrupt and temperature handling")
    Signed-off-by: Jiasheng Jiang
    Link: https://lore.kernel.org/r/20220224025444.3256530-1-jiasheng@iscas.ac.cn
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Sasha Levin

    Jiasheng Jiang
     

11 Mar, 2022

1 commit

  • This is the 5.15.27 stable release

    * tag 'v5.15.27': (3069 commits)
    Linux 5.15.27
    hamradio: fix macro redefine warning
    KVM: x86/mmu: Passing up the error state of mmu_alloc_shadow_roots()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm/boot/dts/imx7ulp.dtsi
    arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
    arch/arm64/boot/dts/freescale/imx8mq.dtsi
    drivers/dma-buf/heaps/cma_heap.c
    drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
    drivers/gpu/drm/mxsfb/mxsfb_kms.c
    drivers/mmc/host/sdhci-esdhc-imx.c
    drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    drivers/rpmsg/rpmsg_char.c
    drivers/soc/imx/gpcv2.c
    drivers/thermal/imx_thermal.c

    Jason Liu
     

08 Mar, 2022

1 commit

  • Commit 257e9d2663d4 was trying to replace the "simple-bus" compatible
    with explicit bus populate in the driver. But of_platform_populate()
    only populates child nodes of ifc without populating child buses and
    child mfd devices residing under ifc. Change it to
    of_platform_default_populate() to fix the problem.

    Fixes: 257e9d2663d4 ("memory: fsl_ifc: populate child devices without relying on simple-bus")

    Signed-off-by: Li Yang

    Li Yang
     

27 Jan, 2022

1 commit

  • [ Upstream commit 818fdfa89baac77a8df5a2c30f4fb798cc937aa0 ]

    Make sure we return error in case devm_ioremap_resource() fails for dirmap
    resource.

    Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver")
    Signed-off-by: Lad Prabhakar
    Reviewed-by: Biju Das
    Reviewed-by: Wolfram Sang
    Reviewed-by: Geert Uytterhoeven
    Link: https://lore.kernel.org/r/20211025205631.21151-6-prabhakar.mahadev-lad.rj@bp.renesas.com
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Sasha Levin

    Lad Prabhakar
     

01 Dec, 2021

1 commit

  • This is the 5.15.5 stable release

    * tag 'v5.15.5': (1261 commits)
    Linux 5.15.5
    ALSA: hda: hdac_stream: fix potential locking issue in snd_hdac_stream_assign()
    ALSA: hda: hdac_ext_stream: fix potential locking issues
    ...

    Conflicts:
    arch/powerpc/platforms/85xx/Makefile
    drivers/crypto/caam/caampkc.c
    drivers/gpu/drm/bridge/nwl-dsi.c
    drivers/gpu/drm/imx/imx-drm-core.c
    drivers/remoteproc/imx_rproc.c
    drivers/soc/imx/gpcv2.c
    include/linux/rpmsg.h

    Jason Liu
     

30 Nov, 2021

1 commit

  • * nand/next: (18 commits)
    LF-3626: mtd: nand: gpmi: fix the explicit null dereference issue
    LF-3622: mtd: nand: gpmi: fix the unintentional integer overflow issue
    LF-2439: mtd: nand: raw: gpmi: fix the build error due to upstream change
    MLK-23693-3: mtd: rawnand: gpmi: add imx8dxl nand support
    LF-1977: mtd: rawnand: gpmi: gpmi clock setting workaround for imx6sx
    ...

    Dong Aisheng
     

25 Nov, 2021

2 commits


19 Nov, 2021

2 commits

  • [ Upstream commit 4ed2f3545c2e5acfbccd7f85fea5b1a82e9862d7 ]

    The error handling code of fsl_ifc_ctrl_probe is problematic. When
    fsl_ifc_ctrl_init fails or request_irq of fsl_ifc_ctrl_dev->irq fails,
    it forgets to free the irq and nand_irq. Meanwhile, if request_irq of
    fsl_ifc_ctrl_dev->nand_irq fails, it will still free nand_irq even if
    the request_irq is not successful.

    Fix this by refactoring the error handling code.

    Fixes: d2ae2e20fbdd ("driver/memory:Move Freescale IFC driver to a common driver")
    Signed-off-by: Dongliang Mu
    Link: https://lore.kernel.org/r/20210925151434.8170-1-mudongliangabcd@gmail.com
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Sasha Levin

    Dongliang Mu
     
  • commit fff53a551db50f5edecaa0b29a64056ab8d2bbca upstream.

    This patch fixes 2 problems:
    [1] The output warning logs and data loss when performing
    mount/umount then remount the device with jffs2 format.
    [2] The access width of SMWDR[0:1]/SMRDR[0:1] register is wrong.

    This is the sample warning logs when performing mount/umount then
    remount the device with jffs2 format:
    jffs2: jffs2_scan_inode_node(): CRC failed on node at 0x031c51d4:
    Read 0x00034e00, calculated 0xadb272a7

    The reason for issue [1] is that the writing data seems to
    get messed up.
    Data is only completed when the number of bytes is divisible by 4.
    If you only have 3 bytes of data left to write, 1 garbage byte
    is inserted after the end of the write stream.
    If you only have 2 bytes of data left to write, 2 bytes of '00'
    are added into the write stream.
    If you only have 1 byte of data left to write, 2 bytes of '00'
    are added into the write stream. 1 garbage byte is inserted after
    the end of the write stream.

    To solve problem [1], data must be written continuously in serial
    and the write stream ends when data is out.

    Following HW manual 62.2.15, access to SMWDR0 register should be
    in the same size as the transfer size specified in the SPIDE[3:0]
    bits in the manual mode enable setting register (SMENR).
    Be sure to access from address 0.

    So, in 16-bit transfer (SPIDE[3:0]=b'1100), SMWDR0 should be
    accessed by 16-bit width.
    Similar to SMWDR1, SMDDR0/1 registers.
    In current code, SMWDR0 register is accessed by regmap_write()
    that only set up to do 32-bit width.

    To solve problem [2], data must be written 16-bit or 8-bit when
    transferring 1-byte or 2-byte.

    Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver")
    Cc:
    Signed-off-by: Duc Nguyen
    [wsa: refactored to use regmap only via reg_read/reg_write]
    Signed-off-by: Wolfram Sang
    Tested-by: Lad Prabhakar
    Link: https://lore.kernel.org/r/20210922091007.5516-1-wsa+renesas@sang-engineering.com
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Greg Kroah-Hartman

    Wolfram Sang
     

02 Nov, 2021

1 commit


29 Jul, 2021

3 commits


23 Jul, 2021

1 commit

  • The tegra186_mc_client_sid_override() is only called from
    an #ifdef block:

    drivers/memory/tegra/tegra186.c:74:13: error: 'tegra186_mc_client_sid_override' defined but not used [-Werror=unused-function]
    74 | static void tegra186_mc_client_sid_override(struct tegra_mc *mc,
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Add another #ifdef around the called function.

    Fixes: 393d66fd2cac ("memory: tegra: Implement SID override programming")
    Signed-off-by: Arnd Bergmann
    Acked-by: Jon Hunter
    Link: https://lore.kernel.org/r/20210722090748.1157470-1-arnd@kernel.org
    Signed-off-by: Krzysztof Kozlowski

    Arnd Bergmann
     

17 Jun, 2021

1 commit

  • …/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

    Memory controller drivers for v5.14 - Tegra SoC, part two

    Second set of changes for Tegra SoC memory controller drivers,
    containing patchset from Thierry Reding:

    "The goal here is to avoid early identity mappings altogether and instead
    postpone the need for the identity mappings to when devices are attached
    to the SMMU. This works by making the SMMU driver coordinate with the
    memory controller driver on when to start enforcing SMMU translations.
    This makes Tegra behave in a more standard way and pushes the code to
    deal with the Tegra-specific programming into the NVIDIA SMMU
    implementation."

    This pulls a dependency from Will Deacon (ARM SMMU driver) and contains
    further ARM SMMU driver patches to resolve complex dependencies between
    different patchsets. The pull from Will contains only one patch
    ("Implement ->probe_finalize()"). Further work in Will's tree might
    depend on this patch, therefore patch was applied there.

    On the other hand, this ("Implement ->probe_finalize()") patch is also a
    dependency for ARM SMMU driver changes for Tegra. These changes,
    bringing seamless transition from the firmware framebuffer to the OS
    framebuffer, depend on earlier Tegra memory controller driver patches.

    * tag 'memory-controller-drv-tegra-5.14-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: (37 commits)
    iommu/arm-smmu: Use Tegra implementation on Tegra186
    iommu/arm-smmu: tegra: Implement SID override programming
    iommu/arm-smmu: tegra: Detect number of instances at runtime
    dt-bindings: arm-smmu: Add Tegra186 compatible string
    memory: tegra: Delete dead debugfs checking code
    iommu/arm-smmu: Implement ->probe_finalize()
    memory: tegra: Implement SID override programming
    memory: tegra: Split Tegra194 data into separate file
    memory: tegra: Add memory client IDs to tables
    memory: tegra: Unify drivers
    memory: tegra: Only initialize reset controller if available
    memory: tegra: Make IRQ support opitonal
    memory: tegra: Parameterize interrupt handler
    memory: tegra: Extract setup code into callback
    memory: tegra: Make per-SoC setup more generic
    memory: tegra: Push suspend/resume into SoC drivers
    memory: tegra: Introduce struct tegra_mc_ops
    memory: tegra: Unify struct tegra_mc across SoC generations
    memory: tegra: Consolidate register fields
    memory: tegra30-emc: Use devm_tegra_core_dev_init_opp_table()
    ...

    Link: https://lore.kernel.org/r/20210614195200.21657-1-krzysztof.kozlowski@canonical.com
    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     

12 Jun, 2021

1 commit

  • …inux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

    Memory controller drivers for v5.14 - PL353

    Bigger work around ARM Primecell PL35x SMC memory controller driver by
    Miquel Raynal built on previous series from Naga Sureshkumar Relli.

    This includes bindings cleanup and correction, converting these to
    dtschema and several cleanyps in pl353-smc driver.

    * tag 'memory-controller-drv-pl353-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
    dt-binding: memory: pl353-smc: Convert to yaml
    MAINTAINERS: Add PL353 SMC entry
    memory: pl353-smc: Declare variables following a reverse christmas tree order
    memory: pl353-smc: Avoid useless acronyms in descriptions
    memory: pl353-smc: Let lower level controller drivers handle inits
    memory: pl353-smc: Rename goto labels
    memory: pl353-smc: Fix style
    dt-binding: memory: pl353-smc: Fix the NAND controller node in the example
    dt-binding: memory: pl353-smc: Drop unsupported nodes from the example
    dt-binding: memory: pl353-smc: Fix the example syntax and style
    dt-binding: memory: pl353-smc: Describe the child reg property
    dt-binding: memory: pl353-smc: Drop the partitioning section
    dt-binding: memory: pl353-smc: Document the range property
    dt-binding: memory: pl353-smc: Rephrase the binding

    Link: https://lore.kernel.org/r/20210611140659.61980-2-krzysztof.kozlowski@canonical.com
    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     

10 Jun, 2021

9 commits

  • This is a purely cosmetic change.

    Signed-off-by: Miquel Raynal
    Link: https://lore.kernel.org/r/20210610082040.2075611-15-miquel.raynal@bootlin.com
    Signed-off-by: Krzysztof Kozlowski

    Miquel Raynal
     
  • APER does not mean anything, while it seems legitimate to call this
    clock the AXI peripheral clock.

    Signed-off-by: Miquel Raynal
    Link: https://lore.kernel.org/r/20210610082040.2075611-14-miquel.raynal@bootlin.com
    Signed-off-by: Krzysztof Kozlowski

    Miquel Raynal
     
  • There is no point in having all these definitions at the SMC bus level,
    these are extremely tight to the NAND controller driver implementation,
    are not particularly generic, imply more boilerplate than needed, do
    not really follow the device model by receiving no argument and some of
    them are actually buggy.

    Let's get rid of these right now as there is no current user and keep
    this driver at a simple level: only the SMC bare initializations.

    The NAND controller driver which I am going to introduce will take care
    of redefining properly all these helpers and using them directly.

    Signed-off-by: Miquel Raynal
    Link: https://lore.kernel.org/r/20210610082040.2075611-13-miquel.raynal@bootlin.com
    Signed-off-by: Krzysztof Kozlowski

    Miquel Raynal
     
  • A goto label is better named

    do_something:

    than

    out_something_to_do:

    Use the former wording and really describe what the jump involves.

    Signed-off-by: Miquel Raynal
    Link: https://lore.kernel.org/r/20210610082040.2075611-12-miquel.raynal@bootlin.com
    Signed-off-by: Krzysztof Kozlowski

    Miquel Raynal
     
  • Use proper spacing.

    Signed-off-by: Miquel Raynal
    Link: https://lore.kernel.org/r/20210610082040.2075611-11-miquel.raynal@bootlin.com
    Signed-off-by: Krzysztof Kozlowski

    Miquel Raynal
     
  • The driver defined several functions related to handling of frequency
    and voltage changes:
    - freq_post_notify_handling
    - freq_pre_notify_handling
    - volt_notify_handling

    All these are static, not used inside or outside of driver, and marked
    as unused with comment: "TODO: voltage notify handling should be hooked
    up to regulator framework as soon as the necessary support is available
    in mainline kernel. This function is un-used right now.".

    These have been added with commit a93de288aad3 ("memory: emif: handle
    frequency and voltage change events") in 2012 and are unused since then.
    Additionally mentioned regulator and clock hooking did not happen since
    then. If it did not happen for nine years, let's assume it will not
    happen suddenly now.

    Remove all unused functions which also allows removal of "t_ck" static
    variable "t_ck" and "addressing" member of private structure.

    No functionality is lost.

    Signed-off-by: Krzysztof Kozlowski
    Link: https://lore.kernel.org/r/20210527154101.80556-1-krzysztof.kozlowski@canonical.com

    Krzysztof Kozlowski
     
  • On probe error the driver should free the memory allocated for private
    structure. Fix this by using resource-managed allocation.

    Fixes: a20cbdeffce2 ("powerpc/fsl: Add support for Integrated Flash Controller")
    Signed-off-by: Krzysztof Kozlowski
    Link: https://lore.kernel.org/r/20210527154322.81253-2-krzysztof.kozlowski@canonical.com

    Krzysztof Kozlowski
     
  • On probe error the driver should unmap the IO memory. Smatch reports:

    drivers/memory/fsl_ifc.c:298 fsl_ifc_ctrl_probe() warn: 'fsl_ifc_ctrl_dev->gregs' not released on lines: 298.

    Fixes: a20cbdeffce2 ("powerpc/fsl: Add support for Integrated Flash Controller")
    Reported-by: kernel test robot
    Reported-by: Dan Carpenter
    Signed-off-by: Krzysztof Kozlowski
    Link: https://lore.kernel.org/r/20210527154322.81253-1-krzysztof.kozlowski@canonical.com

    Krzysztof Kozlowski
     
  • The debugfs_create_dir() function does not return NULL, it returns error
    pointers. But in normal situations like this where the caller is not
    dereferencing "emc->debugfs.root" then we are not supposed to check the
    return. So instead of fixing these checks, we should delete them.

    Signed-off-by: Dan Carpenter
    Link: https://lore.kernel.org/r/YMCQDTSyG8UuQoh0@mwanda
    Signed-off-by: Krzysztof Kozlowski

    Dan Carpenter
     

04 Jun, 2021

3 commits

  • Instead of programming all SID overrides during early boot, perform the
    operation on-demand after the SMMU translations have been set up for a
    device. This reuses data from device tree to match memory clients for a
    device and programs the SID specified in device tree, which corresponds
    to the SID used for the SMMU context banks for the device.

    Signed-off-by: Thierry Reding
    Link: https://lore.kernel.org/r/20210603164632.1000458-2-thierry.reding@gmail.com
    Signed-off-by: Krzysztof Kozlowski

    Thierry Reding
     
  • Keep the directory structure consistent by splitting the Tegra194 data
    into a separate file.

    Signed-off-by: Thierry Reding
    Link: https://lore.kernel.org/r/20210602163302.120041-13-thierry.reding@gmail.com
    Signed-off-by: Krzysztof Kozlowski

    Thierry Reding
     
  • The memory client IDs will subsequently be used to program override SIDs
    for the given clients depending on the device tree configuration.

    Signed-off-by: Thierry Reding
    Link: https://lore.kernel.org/r/20210602163302.120041-12-thierry.reding@gmail.com
    Signed-off-by: Krzysztof Kozlowski

    Thierry Reding