21 Aug, 2020

1 commit


19 Jun, 2020

1 commit

  • * tag 'v5.4.47': (2193 commits)
    Linux 5.4.47
    KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
    KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception
    ...

    Conflicts:
    arch/arm/boot/dts/imx6qdl.dtsi
    arch/arm/mach-imx/Kconfig
    arch/arm/mach-imx/common.h
    arch/arm/mach-imx/suspend-imx6.S
    arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
    arch/powerpc/include/asm/cacheflush.h
    drivers/cpufreq/imx6q-cpufreq.c
    drivers/dma/imx-sdma.c
    drivers/edac/synopsys_edac.c
    drivers/firmware/imx/imx-scu.c
    drivers/net/ethernet/freescale/fec.h
    drivers/net/ethernet/freescale/fec_main.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
    drivers/net/phy/phy_device.c
    drivers/perf/fsl_imx8_ddr_perf.c
    drivers/usb/cdns3/gadget.c
    drivers/usb/dwc3/gadget.c
    include/uapi/linux/dma-buf.h

    Signed-off-by: Jason Liu

    Jason Liu
     

11 Jun, 2020

1 commit

  • commit 8d9eb0d6d59a5d7028c80a30831143d3e75515a7 upstream.

    qfprom has different address spaces for read and write. Reads are
    always done from corrected address space, where as writes are done
    on raw address space.
    Writing to corrected address space is invalid and ignored, so it
    does not make sense to have this support in the driver which only
    supports corrected address space regions at the moment.

    Fixes: 4ab11996b489 ("nvmem: qfprom: Add Qualcomm QFPROM support.")
    Signed-off-by: Srinivas Kandagatla
    Reviewed-by: Douglas Anderson
    Cc: stable
    Link: https://lore.kernel.org/r/20200522113341.7728-1-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla
     

08 Apr, 2020

1 commit

  • commit 3c91ef69a3e94f78546b246225ed573fbf1735b4 upstream.

    Return -EPERM if reg_read is NULL in bin_attr_nvmem_read() or if
    reg_write is NULL in bin_attr_nvmem_write().

    This prevents NULL dereferences such as the one described in
    03cd45d2e219 ("thunderbolt: Prevent crash if non-active NVMem file is
    read")

    Signed-off-by: Nicholas Johnson
    Cc: stable
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20200310132257.23358-10-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Nicholas Johnson
     

08 Mar, 2020

1 commit

  • Merge Linux stable release v5.4.24 into imx_5.4.y

    * tag 'v5.4.24': (3306 commits)
    Linux 5.4.24
    blktrace: Protect q->blk_trace with RCU
    kvm: nVMX: VMWRITE checks unsupported field before read-only field
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm/boot/dts/imx6sll-evk.dts
    arch/arm/boot/dts/imx7ulp.dtsi
    arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
    drivers/clk/imx/clk-composite-8m.c
    drivers/gpio/gpio-mxc.c
    drivers/irqchip/Kconfig
    drivers/mmc/host/sdhci-of-esdhc.c
    drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
    drivers/net/can/flexcan.c
    drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
    drivers/net/ethernet/mscc/ocelot.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
    drivers/net/phy/realtek.c
    drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
    drivers/perf/fsl_imx8_ddr_perf.c
    drivers/tee/optee/shm_pool.c
    drivers/usb/cdns3/gadget.c
    kernel/sched/cpufreq.c
    net/core/xdp.c
    sound/soc/fsl/fsl_esai.c
    sound/soc/fsl/fsl_sai.c
    sound/soc/sof/core.c
    sound/soc/sof/imx/Kconfig
    sound/soc/sof/loader.c

    Jason Liu
     

11 Feb, 2020

1 commit

  • commit 16bb7abc4a6b9defffa294e4dc28383e62a1dbcf upstream.

    nvmem_cell_info_to_nvmem_cell implementation has static
    allocation of name. nvmem_add_cells_from_of() call may
    return error and kfree name results in memory abort. Use
    kstrdup_const() and kfree_const calls for name alloc and free.

    Unable to handle kernel paging request at virtual address ffffffffffe44888
    Mem abort info:
    ESR = 0x96000006
    EC = 0x25: DABT (current EL), IL = 32 bits
    SET = 0, FnV = 0
    EA = 0, S1PTW = 0
    Data abort info:
    ISV = 0, ISS = 0x00000006
    CM = 0, WnR = 0
    swapper pgtable: 64k pages, 48-bit VAs, pgdp=00000000815d0000
    [ffffffffffe44888] pgd=0000000081d30803, pud=0000000081d30803,
    pmd=0000000000000000
    Internal error: Oops: 96000006 [#1] PREEMPT SMP
    Modules linked in:
    CPU: 2 PID: 43 Comm: kworker/2:1 Tainted
    Hardware name: quill (DT)
    Workqueue: events deferred_probe_work_func
    pstate: a0000005 (NzCv daif -PAN -UAO)
    pc : kfree+0x38/0x278
    lr : nvmem_cell_drop+0x68/0x80
    sp : ffff80001284f9d0
    x29: ffff80001284f9d0 x28: ffff0001f677e830
    x27: ffff800011b0b000 x26: ffff0001c36e1008
    x25: ffff8000112ad000 x24: ffff8000112c9000
    x23: ffffffffffffffea x22: ffff800010adc7f0
    x21: ffffffffffe44880 x20: ffff800011b0b068
    x19: ffff80001122d380 x18: ffffffffffffffff
    x17: 00000000d5cb4756 x16: 0000000070b193b8
    x15: ffff8000119538c8 x14: 0720072007200720
    x13: 07200720076e0772 x12: 07750762072d0765
    x11: 0773077507660765 x10: 072f073007300730
    x9 : 0730073207380733 x8 : 0000000000000151
    x7 : 07660765072f0720 x6 : ffff0001c00e0f00
    x5 : 0000000000000000 x4 : ffff0001c0b43800
    x3 : ffff800011b0b068 x2 : 0000000000000000
    x1 : 0000000000000000 x0 : ffffffdfffe00000
    Call trace:
    kfree+0x38/0x278
    nvmem_cell_drop+0x68/0x80
    nvmem_device_remove_all_cells+0x2c/0x50
    nvmem_register.part.9+0x520/0x628
    devm_nvmem_register+0x48/0xa0
    tegra_fuse_probe+0x140/0x1f0
    platform_drv_probe+0x50/0xa0
    really_probe+0x108/0x348
    driver_probe_device+0x58/0x100
    __device_attach_driver+0x90/0xb0
    bus_for_each_drv+0x64/0xc8
    __device_attach+0xd8/0x138
    device_initial_probe+0x10/0x18
    bus_probe_device+0x90/0x98
    deferred_probe_work_func+0x74/0xb0
    process_one_work+0x1e0/0x358
    worker_thread+0x208/0x488
    kthread+0x118/0x120
    ret_from_fork+0x10/0x18
    Code: d350feb5 f2dffbe0 aa1e03f6 8b151815 (f94006a0)
    ---[ end trace 49b1303c6b83198e ]---

    Fixes: badcdff107cbf ("nvmem: Convert to using %pOFn instead of device_node.name")
    Signed-off-by: Bitan Biswas
    Cc: stable
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20200109104017.6249-5-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Bitan Biswas
     

10 Feb, 2020

3 commits

  • i.MX8MP has 96 banks with each bank 4 words. And it has different
    ctrl register layout, so add new macros for that.

    Reviewed-by: Ye Li
    Signed-off-by: Peng Fan

    Peng Fan
     
  • Introduce ocotp_ctrl_reg to include the low 16bits mask of CTRL
    register.

    i.MX chips will have different layout of the low 16bits of CTRL
    register, so use ocotp_ctrl_reg will make it clean to add new
    chip support.

    Reviewed-by: Ye Li
    Signed-off-by: Peng Fan
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20200109104017.6249-4-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman
    (cherry picked from commit 226c512699ee047b7fae0df297ea0be9e2b629c5)

    Peng Fan
     
  • If software running before the OCOTP driver is loaded left the
    controller with the error status pending, the driver will never
    be able to complete the read timing setup. Reset the error status
    on probe to make sure the controller is in usable state.

    Reviewed-by: Ye Li
    Signed-off-by: Lucas Stach
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20191029114240.14905-6-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman
    (cherry picked from commit c33c585f1b3a99d53920bdac614aca461d8db06f)

    Lucas Stach
     

31 Dec, 2019

1 commit

  • [ Upstream commit c33c585f1b3a99d53920bdac614aca461d8db06f ]

    If software running before the OCOTP driver is loaded left the
    controller with the error status pending, the driver will never
    be able to complete the read timing setup. Reset the error status
    on probe to make sure the controller is in usable state.

    Signed-off-by: Lucas Stach
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20191029114240.14905-6-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Sasha Levin

    Lucas Stach
     

04 Dec, 2019

4 commits

  • The previous offset / 4 maps to fuse map row index, which is
    not friendly for user. So align with the following patch, update
    the write to align with fuse row index exactly

    "
    nvmem: imx: correct the fuse word index

    iMX8 fuse word index represent as one 4-bytes word,
    it should not be divided by 4.

    Exp:
    - MAC0 address layout in fuse:
    offset 708: MAC[3] MAC[2] MAC[1] MAC[0]
    offset 709: XX xx MAC[5] MAC[4]

    Signed-off-by: Fugang Duan
    "

    Reviewed-by: Ye Li
    Signed-off-by: Peng Fan

    Peng Fan
     
  • SIP number 0xC200000A is for reading, 0xC200000B is for writing.
    And the following two args for write are word index, data to write.

    Fixes: 885ce72a09d0 ("nvmem: imx: scu: support write")
    Reviewed-by: Ye Li
    Signed-off-by: Peng Fan

    Peng Fan
     
  • The fuse programming from non-secure world is blocked, so we could
    only use Arm Trusted Firmware SIP call to let ATF program fuse.

    Because there is ECC region that could only be programmed once,
    so add a heler in_ecc to check the ecc region.

    Signed-off-by: Peng Fan
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20191029114240.14905-5-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Peng Fan
     
  • Introduce HOLE/ECC_REGION flag and in_hole helper to ease the check
    of hole region. The ECC_REGION is also introduced here which is
    preparing for programming support. ECC_REGION could only be programmed
    once, so need take care.

    Signed-off-by: Peng Fan
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20191029114240.14905-4-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Peng Fan
     

25 Nov, 2019

2 commits

  • iMX8 fuse word index represent as one 4-bytes word,
    it should not be divided by 4.

    Exp:
    - MAC0 address layout in fuse:
    offset 708: MAC[3] MAC[2] MAC[1] MAC[0]
    offset 709: XX xx MAC[5] MAC[4]

    Signed-off-by: Fugang Duan

    Fugang Duan
     
  • When offset is not 4 bytes aligned, directly shift righty by 2 bits
    will cause reading out wrong data. Since imx ocotp only supports
    4 bytes reading once, we need handle offset is not 4 bytes aligned
    and enlarge the bytes to 4 bytes aligned. After finished reading,
    copy the needed data from buffer to caller and free buffer.

    Signed-off-by: Peng Fan
    Signed-off-by: Fugang Duan

    Peng Fan
     

19 Sep, 2019

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the big char/misc driver pull request for 5.4-rc1.

    As has been happening in previous releases, more and more individual
    driver subsystem trees are ending up in here. Now if that is good or
    bad I can't tell, but hopefully it makes your life easier as it's more
    of an aggregation of trees together to one merge point for you.

    Anyway, lots of stuff in here:
    - habanalabs driver updates
    - thunderbolt driver updates
    - misc driver updates
    - coresight and intel_th hwtracing driver updates
    - fpga driver updates
    - extcon driver updates
    - some dma driver updates
    - char driver updates
    - android binder driver updates
    - nvmem driver updates
    - phy driver updates
    - parport driver fixes
    - pcmcia driver fix
    - uio driver updates
    - w1 driver updates
    - configfs fixes
    - other assorted driver updates

    All of these have been in linux-next for a long time with no reported
    issues"

    * tag 'char-misc-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (200 commits)
    misc: mic: Use PTR_ERR_OR_ZERO rather than its implementation
    habanalabs: correctly cast variable to __le32
    habanalabs: show correct id in error print
    habanalabs: stop using the acronym KMD
    habanalabs: display card name as sensors header
    habanalabs: add uapi to retrieve aggregate H/W events
    habanalabs: add uapi to retrieve device utilization
    habanalabs: Make the Coresight timestamp perpetual
    habanalabs: explicitly set the queue-id enumerated numbers
    habanalabs: print to kernel log when reset is finished
    habanalabs: replace __le32_to_cpu with le32_to_cpu
    habanalabs: replace __cpu_to_le32/64 with cpu_to_le32/64
    habanalabs: Handle HW_IP_INFO if device disabled or in reset
    habanalabs: Expose devices after initialization is done
    habanalabs: improve security in Debug IOCTL
    habanalabs: use default structure for user input in Debug IOCTL
    habanalabs: Add descriptive name to PSOC app status register
    habanalabs: Add descriptive names to PSOC scratch-pad registers
    habanalabs: create two char devices per ASIC
    habanalabs: change device_setup_cdev() to be more generic
    ...

    Linus Torvalds
     

18 Sep, 2019

1 commit

  • …anaszewski/linux-leds

    Pull LED updates from Jacek Anaszewski:
    "In this cycle we've finally managed to contribute the patch set
    sorting out LED naming issues. Besides that there are many changes
    scattered among various LED class drivers and triggers.

    LED naming related improvements:

    - add new 'function' and 'color' fwnode properties and deprecate
    'label' property which has been frequently abused for conveying
    vendor specific names that have been available in sysfs anyway

    - introduce a set of standard LED_FUNCTION* definitions

    - introduce a set of standard LED_COLOR_ID* definitions

    - add a new {devm_}led_classdev_register_ext() API with the
    capability of automatic LED name composition basing on the
    properties available in the passed fwnode; the function is
    backwards compatible in a sense that it uses 'label' data, if
    present in the fwnode, for creating LED name

    - add tools/leds/get_led_device_info.sh script for retrieving LED
    vendor, product and bus names, if applicable; it also performs
    basic validation of an LED name

    - update following drivers and their DT bindings to use the new LED
    registration API:

    - leds-an30259a, leds-gpio, leds-as3645a, leds-aat1290, leds-cr0014114,
    leds-lm3601x, leds-lm3692x, leds-lp8860, leds-lt3593, leds-sc27xx-blt

    Other LED class improvements:

    - replace {devm_}led_classdev_register() macros with inlines

    - allow to call led_classdev_unregister() unconditionally

    - switch to use fwnode instead of be stuck with OF one

    LED triggers improvements:

    - led-triggers:
    - fix dereferencing of null pointer
    - fix a memory leak bug

    - ledtrig-gpio:
    - GPIO 0 is valid

    Drop superseeded apu2/3 support from leds-apu since for apu2+ a newer,
    more complete driver exists, based on a generic driver for the AMD
    SOCs gpio-controller, supporting LEDs as well other devices:

    - drop profile field from priv data

    - drop iosize field from priv data

    - drop enum_apu_led_platform_types

    - drop superseeded apu2/3 led support

    - add pr_fmt prefix for better log output

    - fix error message on probing failure

    Other misc fixes and improvements to existing LED class drivers:

    - leds-ns2, leds-max77650:
    - add of_node_put() before return

    - leds-pwm, leds-is31fl32xx:
    - use struct_size() helper

    - leds-lm3697, leds-lm36274, leds-lm3532:
    - switch to use fwnode_property_count_uXX()

    - leds-lm3532:
    - fix brightness control for i2c mode
    - change the define for the fs current register
    - fixes for the driver for stability
    - add full scale current configuration
    - dt: Add property for full scale current.
    - avoid potentially unpaired regulator calls
    - move static keyword to the front of declarations
    - fix optional led-max-microamp prop error handling

    - leds-max77650:
    - add of_node_put() before return
    - add MODULE_ALIAS()
    - Switch to fwnode property API

    - leds-as3645a:
    - fix misuse of strlcpy

    - leds-netxbig:
    - add of_node_put() in netxbig_leds_get_of_pdata()
    - remove legacy board-file support

    - leds-is31fl319x:
    - simplify getting the adapter of a client

    - leds-ti-lmu-common:
    - fix coccinelle issue
    - move static keyword to the front of declaration

    - leds-syscon:
    - use resource managed variant of device register

    - leds-ktd2692:
    - fix a typo in the name of a constant

    - leds-lp5562:
    - allow firmware files up to the maximum length

    - leds-an30259a:
    - fix typo

    - leds-pca953x:
    - include the right header"

    * tag 'leds-for-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: (72 commits)
    leds: lm3532: Fix optional led-max-microamp prop error handling
    led: triggers: Fix dereferencing of null pointer
    leds: ti-lmu-common: Move static keyword to the front of declaration
    leds: lm3532: Move static keyword to the front of declarations
    leds: trigger: gpio: GPIO 0 is valid
    leds: pwm: Use struct_size() helper
    leds: is31fl32xx: Use struct_size() helper
    leds: ti-lmu-common: Fix coccinelle issue in TI LMU
    leds: lm3532: Avoid potentially unpaired regulator calls
    leds: syscon: Use resource managed variant of device register
    leds: Replace {devm_}led_classdev_register() macros with inlines
    leds: Allow to call led_classdev_unregister() unconditionally
    leds: lm3532: Add full scale current configuration
    dt: lm3532: Add property for full scale current.
    leds: lm3532: Fixes for the driver for stability
    leds: lm3532: Change the define for the fs current register
    leds: lm3532: Fix brightness control for i2c mode
    leds: Switch to use fwnode instead of be stuck with OF one
    leds: max77650: Switch to fwnode property API
    led: triggers: Fix a memory leak bug
    ...

    Linus Torvalds
     

18 Aug, 2019

5 commits

  • i.MX8QM efuse table has some difference with i.MX8QXP platform,
    so add i.MX8QM platform support.

    Signed-off-by: Fugang Duan
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20190818093345.29647-8-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Fugang Duan
     
  • The email address listed in MODULE_AUTHOR() will be disabled in the
    near future. Replace it with my private one.

    Signed-off-by: Stefan Wahren
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20190818093345.29647-6-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Stefan Wahren
     
  • Some Amlogic boards store the Ethernet MAC address inside the eFuse. The
    Ethernet MAC address uses 6 bytes. The existing logic in
    meson_mx_efuse_read() would write beyond the end of the data buffer when
    trying to read data with a size that is not aligned to word_size (4
    bytes on Meson8, Meson8b and Meson8m2).

    Calculate the remaining data to copy inside meson_mx_efuse_read() so
    reading 6 bytes doesn't write beyond the end of the data buffer.

    Signed-off-by: Martin Blumenstingl
    Reviewed-by: Neil Armstrong
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20190818093345.29647-5-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Martin Blumenstingl
     
  • Like in H3, A64 SID controller doesn't return correct data
    when using direct access. It appears that on A64, SID needs
    8 bytes of word_size.

    Workaround is to enable read by registers.

    Signed-off-by: Stefan Mavrodiev
    Acked-by: Chen-Yu Tsai
    Tested-by: Vasily Khoruzhick
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20190818093345.29647-4-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Stefan Mavrodiev
     
  • i.MX8MN is a new SoC of i.MX8M series, it is similar to i.MX8MM
    in terms of addressing and clock setup, add support for its fuse
    read/write.

    Signed-off-by: Anson Huang
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20190818093345.29647-3-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Anson Huang
     

31 Jul, 2019

1 commit

  • The compatibility "eeprom" attribute is currently root-only no
    matter what the configuration says. The "nvmem" attribute does
    respect the setting of the root_only configuration bit, so do the
    same for "eeprom".

    Signed-off-by: Jean Delvare
    Fixes: b6c217ab9be6 ("nvmem: Add backwards compatibility support for older EEPROM drivers.")
    Reviewed-by: Bartosz Golaszewski
    Cc: Andrew Lunn
    Cc: Srinivas Kandagatla
    Cc: Arnd Bergmann
    Link: https://lore.kernel.org/r/20190728184255.563332e6@endymion
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     

30 Jul, 2019

1 commit

  • Introduce wrappers for {bus/driver/class}_find_device() to
    locate devices by its of_node.

    Cc: Maarten Lankhorst
    Cc: Maxime Ripard
    Cc: dri-devel@lists.freedesktop.org
    Cc: David Airlie
    Cc: Daniel Vetter
    Cc: devicetree@vger.kernel.org
    Cc: Florian Fainelli
    Cc: Frank Rowand
    Cc: Heiko Stuebner
    Cc: Liam Girdwood
    Cc: linux-i2c@vger.kernel.org
    Cc: linux-rockchip@lists.infradead.org
    Cc: linux-spi@vger.kernel.org
    Cc: Mathieu Poirier
    Cc: Rob Herring
    Cc: Srinivas Kandagatla
    Cc: Takashi Iwai
    Cc: Alan Tull
    Cc: linux-fpga@vger.kernel.org
    Cc: Peter Rosin
    Cc: Florian Fainelli
    Cc: Heiner Kallweit
    Cc: "David S. Miller"
    Cc: Andrew Lunn
    Cc: Liam Girdwood
    Cc: "Rafael J. Wysocki"
    Cc: Thor Thayer
    Cc: Jiri Slaby
    Cc: Andrew Lunn
    Cc: Peter Rosin
    Signed-off-by: Suzuki K Poulose
    Acked-by: Lee Jones
    Acked-by: Wolfram Sang # I2C part
    Acked-by: Moritz Fischer # For FPGA part
    Acked-by: Mark Brown
    Link: https://lore.kernel.org/r/20190723221838.12024-3-suzuki.poulose@arm.com
    Signed-off-by: Greg Kroah-Hartman

    Suzuki K Poulose
     

13 Jul, 2019

1 commit

  • Pull driver core and debugfs updates from Greg KH:
    "Here is the "big" driver core and debugfs changes for 5.3-rc1

    It's a lot of different patches, all across the tree due to some api
    changes and lots of debugfs cleanups.

    Other than the debugfs cleanups, in this set of changes we have:

    - bus iteration function cleanups

    - scripts/get_abi.pl tool to display and parse Documentation/ABI
    entries in a simple way

    - cleanups to Documenatation/ABI/ entries to make them parse easier
    due to typos and other minor things

    - default_attrs use for some ktype users

    - driver model documentation file conversions to .rst

    - compressed firmware file loading

    - deferred probe fixes

    All of these have been in linux-next for a while, with a bunch of
    merge issues that Stephen has been patient with me for"

    * tag 'driver-core-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (102 commits)
    debugfs: make error message a bit more verbose
    orangefs: fix build warning from debugfs cleanup patch
    ubifs: fix build warning after debugfs cleanup patch
    driver: core: Allow subsystems to continue deferring probe
    drivers: base: cacheinfo: Ensure cpu hotplug work is done before Intel RDT
    arch_topology: Remove error messages on out-of-memory conditions
    lib: notifier-error-inject: no need to check return value of debugfs_create functions
    swiotlb: no need to check return value of debugfs_create functions
    ceph: no need to check return value of debugfs_create functions
    sunrpc: no need to check return value of debugfs_create functions
    ubifs: no need to check return value of debugfs_create functions
    orangefs: no need to check return value of debugfs_create functions
    nfsd: no need to check return value of debugfs_create functions
    lib: 842: no need to check return value of debugfs_create functions
    debugfs: provide pr_fmt() macro
    debugfs: log errors when something goes wrong
    drivers: s390/cio: Fix compilation warning about const qualifiers
    drivers: Add generic helper to match by of_node
    driver_find_device: Unify the match function with class_find_device()
    bus_find_device: Unify the match callback with class_find_device
    ...

    Linus Torvalds
     

26 Jun, 2019

5 commits

  • According to NXP Reference Manuals and uboot/atf sources the OCOTP block
    on imx8m behaves more like imx6 than imx7.

    - Fuses can be read/written 32bits at a time (no imx7-like banking)
    - The OCOTP_HW_OCOTP_TIMING register is like imx6 not imx7

    Since nvmem doesn't support uboot-style "sense" and "override" this
    issue only affected "write" which is very rarely used.

    Fixes: 163c0dbd0cb1 ("nvmem: imx-ocotp: add support for imx8mq")
    Signed-off-by: Leonard Crestez
    Reviewed-by: Peng Fan
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Leonard Crestez
     
  • This patch adds support to burn the fuses on the i.MX8MM.
    https://www.nxp.com/webapp/Download?colCode=IMX8MMRM

    The i.MX8MM is similar to i.MX6 processors in terms of addressing and clock
    setup.

    The documentation specifies 60 discreet OTP registers but, the fusemap
    address space encompasses up to 256 registers. We map the entire putative
    256 OTP registers.

    Signed-off-by: Bryan O'Donoghue
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Bryan O'Donoghue
     
  • The RELAX field of the OCOTP block is turning out as a zero on i.MX8MM.
    This messes up the subsequent re-load of the fuse shadow registers.

    After some discussion with people @ NXP its clear we have missed a trick
    here in Linux.

    The OCOTP fuse programming time has a physical minimum 'burn time' that is
    not related to the ipg_clk.

    We need to define the RELAX, STROBE_READ and STROBE_PROG fields in terms of
    desired timings to allow for the burn-in to safely complete. Right now only
    the RELAX field is calculated in terms of an absolute time and we are
    ending up with a value of zero.

    This patch inherits the u-boot timings for the OCOTP_TIMING calculation on
    the i.MX6 and i.MX8. Those timings are known to work and critically specify
    values such as STROBE_PROG as a minimum timing.

    Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support")

    Signed-off-by: Bryan O'Donoghue
    Suggested-by: Leonard Crestez
    Reviewed-by: Leonard Crestez
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Bryan O'Donoghue
     
  • The i.MX6 and i.MX8 both have a bit-field spanning bits 27:22 called the
    WAIT field.

    The WAIT field according to the documentation for both parts "specifies
    time interval between auto read and write access in one time program. It is
    given in number of ipg_clk periods."

    This patch ensures that the relevant field is read and written back to the
    timing register.

    Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support")

    Signed-off-by: Bryan O'Donoghue
    Reviewed-by: Leonard Crestez
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Bryan O'Donoghue
     
  • i.MX6 defines OCOTP_CTRLn:ADDR as seven bit address-field with a one bit
    RSVD0 field, i.MX7 defines OCOTP_CTRLn:ADDR as a four bit address-field
    with a four bit RSVD0 field.

    i.MX8 defines the OCOTP_CTRLn:ADDR bit-field as a full range eight bits.

    i.MX6 and i.MX7 should return zero for their respective RSVD0 bits and
    ignore a write-back of zero where i.MX8 will make use of the full range.

    This patch expands the bit-field definition for all users to eight bits,
    which is safe due to RSVD0 being a no-op for the i.MX6 and i.MX7.

    Signed-off-by: Bryan O'Donoghue
    Reviewed-by: Leonard Crestez
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Bryan O'Donoghue
     

24 Jun, 2019

1 commit

  • There is an arbitrary difference between the prototypes of
    bus_find_device() and class_find_device() preventing their callers
    from passing the same pair of data and match() arguments to both of
    them, which is the const qualifier used in the prototype of
    class_find_device(). If that qualifier is also used in the
    bus_find_device() prototype, it will be possible to pass the same
    match() callback function to both bus_find_device() and
    class_find_device(), which will allow some optimizations to be made in
    order to avoid code duplication going forward. Also with that, constify
    the "data" parameter as it is passed as a const to the match function.

    For this reason, change the prototype of bus_find_device() to match
    the prototype of class_find_device() and adjust its callers to use the
    const qualifier in accordance with the new prototype of it.

    Cc: Alexander Shishkin
    Cc: Andrew Lunn
    Cc: Andreas Noever
    Cc: Arnd Bergmann
    Cc: Bjorn Helgaas
    Cc: Corey Minyard
    Cc: Christian Borntraeger
    Cc: David Kershner
    Cc: "David S. Miller"
    Cc: David Airlie
    Cc: Felipe Balbi
    Cc: Frank Rowand
    Cc: Grygorii Strashko
    Cc: Harald Freudenberger
    Cc: Hartmut Knaack
    Cc: Heiko Stuebner
    Cc: Jason Gunthorpe
    Cc: Jonathan Cameron
    Cc: "James E.J. Bottomley"
    Cc: Len Brown
    Cc: Mark Brown
    Cc: Michael Ellerman
    Cc: Michael Jamet
    Cc: "Martin K. Petersen"
    Cc: Peter Oberparleiter
    Cc: Sebastian Ott
    Cc: Srinivas Kandagatla
    Cc: Yehezkel Bernat
    Cc: rafael@kernel.org
    Acked-by: Corey Minyard
    Acked-by: David Kershner
    Acked-by: Mark Brown
    Acked-by: Rafael J. Wysocki
    Acked-by: Srinivas Kandagatla
    Acked-by: Wolfram Sang # for the I2C parts
    Acked-by: Rob Herring
    Signed-off-by: Suzuki K Poulose
    Signed-off-by: Greg Kroah-Hartman

    Suzuki K Poulose
     

23 Jun, 2019

1 commit


20 Jun, 2019

2 commits

  • The SNVS LPGR IP block is also found on other i.MX SoCs that
    are not covered by the current SOC_IMX6 || SOC_IMX7D logic.

    One example is the i.MX7ULP.

    To avoid keep expanding the SoC logic selection, make it broader
    by using the more generic ARCH_MXC symbol instead.

    Signed-off-by: Fabio Estevam
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Fabio Estevam
     
  • This patch adds i.MX8 nvmem ocotp driver to access fuse via
    RPC to i.MX8 system controller.

    Cc: Srinivas Kandagatla
    Cc: Shawn Guo
    Cc: Sascha Hauer
    Cc: Pengutronix Kernel Team
    Cc: Fabio Estevam
    Cc: NXP Linux Team
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Peng Fan
    Reviewed-by: Dong Aisheng
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Peng Fan
     

19 Jun, 2019

2 commits

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation http www opensource org
    licenses gpl license html http www gnu org copyleft gpl html

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 3 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081201.897982733@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

05 Jun, 2019

2 commits

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of version 2 of the gnu general public license as
    published by the free software foundation this program is
    distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 64 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Alexios Zavras
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190529141901.894819585@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 and
    only version 2 as published by the free software foundation this
    program is distributed in the hope that it will be useful but
    without any warranty without even the implied warranty of
    merchantability or fitness for a particular purpose see the gnu
    general public license for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 294 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Alexios Zavras
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190529141900.825281744@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation this program is
    distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 655 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner