22 Jul, 2020

1 commit

  • commit 8bdd79dae1ff5397351b95e249abcae126572617 upstream.

    The watchdog counter consists of WDG_LOAD_LOW and WDG_LOAD_HIGH,
    which would be loaded to watchdog counter once writing WDG_LOAD_LOW.

    Fixes: ac1775012058 ("spi: sprd: Add the support of restarting the system")
    Signed-off-by: Lingling Xu
    Signed-off-by: Chunyan Zhang
    Link: https://lore.kernel.org/r/20200602082415.5848-1-zhang.lyra@gmail.com
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Lingling Xu
     

31 Dec, 2019

1 commit

  • [ Upstream commit 91ea1d70607e374b014b4b9bea771ce661f9f64b ]

    When rebooting the system, we should lock the watchdog after
    configuration to make sure the watchdog can reboot the system
    successfully.

    Signed-off-by: Lingling Xu
    Signed-off-by: Baolin Wang
    Link: https://lore.kernel.org/r/7b04711127434555e3a1a86bc6be99860cd86668.1572257085.git.baolin.wang@linaro.org
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Lingling Xu
     

26 Jul, 2019

5 commits

  • Now Spreadtrum ADI controller supplies multiple master accessing channel
    to support multiple subsystems accessing, instead of using a hardware
    spinlock to synchronize between the multiple subsystems.

    To keep backward compatibility, we should change the hardware spinlock
    to be optional. Moreover change to use of_hwspin_lock_get_id() function
    which return -ENOENT error number to indicate no hwlock support.

    Signed-off-by: Baolin Wang
    Link: https://lore.kernel.org/r/2abe7dcf210e4197f8c5ece7fc6d6cc1eda8c655.1564125131.git.baolin.wang@linaro.org
    Signed-off-by: Mark Brown

    Baolin Wang
     
  • When the system was rebooted by watchdog, now we did not save the watchdog
    reset mode which will make system enter a incorrect mode after rebooting.

    Thus we should set the watchdog reset mode as default when opening the
    watchdog configuration, that means if the system was rebooted by other
    reason through the restart_handler(), then we will clear the default
    watchdog reset mode to save the correct reset mode.

    Signed-off-by: Sherry Zong
    Signed-off-by: Baolin Wang
    Link: https://lore.kernel.org/r/1563f3de43c6c2262d597a25d6138b5de61ea23d.1564125131.git.baolin.wang@linaro.org
    Signed-off-by: Mark Brown

    Sherry Zong
     
  • Add a new reset flag to indicate that the system need enter factory test
    mode after restarting system.

    Signed-off-by: Sherry Zong
    Signed-off-by: Baolin Wang
    Link: https://lore.kernel.org/r/8ae5651e876b527920ff878721a8a8ef47b099ac.1564125131.git.baolin.wang@linaro.org
    Signed-off-by: Mark Brown

    Sherry Zong
     
  • Add a new reset flag to indicate the reset reason is caused by TOS.

    Signed-off-by: Chenxu Wei
    Signed-off-by: Baolin Wang
    Link: https://lore.kernel.org/r/97583aad1f2b849d69b4e76e8d29113da72a9fff.1564125131.git.baolin.wang@linaro.org
    Signed-off-by: Mark Brown

    Chenxu Wei
     
  • The ADI default transfer address bits is 12bit on Spreadtrum SC9860
    platform, thus there is no need to set again, remove it.

    Signed-off-by: Baolin Wang
    Link: https://lore.kernel.org/r/3cb57b8aadb7747a9f833e9b4fe8596ba738d9f6.1564125131.git.baolin.wang@linaro.org
    Signed-off-by: Mark Brown

    Baolin Wang
     

27 Jun, 2018

2 commits


21 Mar, 2018

2 commits

  • On Spreadtrum platform, we use one PMIC watchdog to reset the whole system
    with loading one suitable timeout value (usually 50ms) for the watchdog.

    In theory, we should implement the restart function in drivers/power/reset
    subsystem to access the PMIC watchdog with regmap. When restart the system,
    other cores will be stopped by IPI, but if other cores were accessing PMIC
    with holding the regmap mutex lock, that will cause dead-lock issue if we
    try to access the PMIC watchdog with regmap to restart the whole system.
    Thus we can implement the restart function in ADI driver to avoid this
    issue.

    Signed-off-by: Baolin Wang
    Signed-off-by: Mark Brown

    Baolin Wang
     
  • We can move the hardware spinlock protection into the ADI read/write
    functions to simplify the sprd_adi_transfer_one() function. Moreover
    this optimization can also help to access PMIC without considering
    the hardware spinlock using sprd_adi_read/write() functions.

    Signed-off-by: Baolin Wang
    Signed-off-by: Mark Brown

    Baolin Wang
     

25 Oct, 2017

1 commit

  • When enabling the ADI hardware channels, if the channel id is 31,
    then we will get one negative value -1 for BIT() macro, which will
    write incorrect value to register.

    Fixes: 7e2903cb91df ("spi: Add ADI driver for Spreadtrum platform")
    Reported-by: Dan Carpenter
    Signed-off-by: Baolin Wang
    Signed-off-by: Mark Brown

    Baolin Wang
     

14 Oct, 2017

1 commit

  • drivers/spi/spi-sprd-adi.c:409:3-8: No need to set .owner here. The core will do it.

    Remove .owner field if calls are used which set it automatically

    Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

    Fixes: 7e2903cb91df ("spi: Add ADI driver for Spreadtrum platform")
    Signed-off-by: Fengguang Wu
    Signed-off-by: Mark Brown

    Wu Fengguang
     

26 Sep, 2017

2 commits


19 Sep, 2017

1 commit