Commit graph

890,561 commits

Author SHA1 Message Date
Deepak Kumar
c67bc4a391 msm: kgsl: Add gpu_frequency tracepoint to power trace system
Add a tracepoint to the power trace system to report GPU
frequency change. Format for this is identical to cpu_frequency
event and compatible with Android tools such as Perfetto.

Change-Id: I6207f45f506ab595bd261a297abdd8f40990c8de
Signed-off-by: Deepak Kumar <[email protected]>
Signed-off-by: Indira Biruduraju <[email protected]>
2020-08-31 21:29:42 +05:30
Deepak Kumar
4f125084c0 msm: kgsl: Drive FAL QACTIVE signal high before GMU boot
Drive FAL QACTIVE signal high before GMU boot to make sure
path to DDR accepts transactions from GMU/GPU and comes out
of low power state if it was in a low power state.

Change-Id: I238a39c5b9dbd10a8c9b2c6437aaf48df410802f
Signed-off-by: Deepak Kumar <[email protected]>
2020-08-31 20:05:42 +05:30
Saurabh Sahu
95b0663968 clk: qcom: debugcc: Update clk measure for gcc clocks for HOLI
Add the debug mux offset for getting clk_measure for
csi3phytimer and camss_mclk4 clk in HOLI.

Change-Id: I8b88223b0fa0036ea83c36523da85b7f190d3009
Signed-off-by: Saurabh Sahu <[email protected]>
2020-08-31 16:46:31 +05:30
qctecmdr
488de2480d Merge "defconfig: gki: Enable power delivery on Holi" 2020-08-31 03:20:23 -07:00
qctecmdr
95e456f7f9 Merge "arm64: defconfig: Remove SDCARD_FS for holi" 2020-08-31 03:20:23 -07:00
qctecmdr
94278fcf6e Merge "Revert "dwc3-msm: Add support to vote USB FORCE_MEM_CORE_ON"" 2020-08-31 03:20:23 -07:00
qctecmdr
dd24581938 Merge "sched/preemptirq: Use restricted trace hooks" 2020-08-31 03:20:22 -07:00
qctecmdr
7a0011a3d2 Merge "ABI: Add regmap_mmio_detach_clk API to QCOM whitelist" 2020-08-31 03:20:22 -07:00
qctecmdr
1fc44890fe Merge "clk: qcom: gcc-shima: Update CPUSS AHB clock frequency to 19.2MHz" 2020-08-31 03:20:22 -07:00
qctecmdr
56d2c7fe39 Merge "arm64: defconfig: Enable panic on corruption for holi" 2020-08-31 03:20:22 -07:00
Amar Singhal
77c45270a6 BACKPORT: cfg80211: Adjust 6 GHz frequency to channel conversion
Adjust the 6 GHz frequency to channel conversion function,
the other way around was previously handled.

Signed-off-by: Amar Singhal <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[rewrite commit message, hard-code channel 2]
Signed-off-by: Johannes Berg <[email protected]>

Bug: 167126230
(cherry picked from commit 2d9b55508556ccee6410310fb9ea2482fd3328eb)
Change-Id: Ieb788ea5a5ad614651c1a2c83d2c0fc16a98e00f
Signed-off-by: Vamsi Krishna <[email protected]>
2020-08-31 13:40:45 +05:30
Anirudh Ghayal
208e1c5457 power: smb5-lib: Use the unlocked version votable for FV
Float voltage is read in the batt_health() callback.
batt_health() is called from batt_status() and batt_status()
is also called from the FV callback leading to a deadlock.
Fix it by using the unlocked version of votable while reading FV.

Change-Id: Ie6f9f683c048a2a1c64d46716433bcff359dc3b0
Signed-off-by: Anirudh Ghayal <[email protected]>
2020-08-31 12:00:56 +05:30
Raghavendra Kakarla
cd5a2ae207 drivers: coresight: Add interrupt service routine for apss tgu
Add the interrupt service routine for apss tgu to handle tgu
interrupt.

Change-Id: Ic0128e41ed7a8e837ebab12a28c744af85109bda
Signed-off-by: Raghavendra Kakarla <[email protected]>
2020-08-31 10:44:07 +05:30
Sriharsha Allenki
4aef53cef6 defconfig: gki: Enable power delivery on Holi
Enable policy_engine and pd phy drivers to support
power delivery feature on Holi.

Change-Id: I5048292c5b486a8801c9be6996ef3bff61d6f15a
Signed-off-by: Sriharsha Allenki <[email protected]>
2020-08-30 13:56:37 +05:30
Sriharsha Allenki
7faa8ad616 usb: pd: Fix cyclic dependency of pd modules
The compilation of policy_engine.c and qpnp-pdphy.c as
loadble modules leads to the circular symbol dependency
of one module on the other.
Fix this by serializing this dependency and ensures that
no symbols from the qpnp-pdphy are directly used in
policy_engine driver.
Also, add the dependency of IIO for policy_engine driver.

Change-Id: I965f887e5c0b5a0cd372cc83353380bad5d8c839
Signed-off-by: Sriharsha Allenki <[email protected]>
2020-08-30 13:55:57 +05:30
Odelu Kukatla
823b12bb9b build.config: Add qnoc-qos.ko module for Lahaina
qnoc-qos.c needs to be built as module, so add qnoc-qos.ko to
build infra.

Change-Id: I86ace45e2259fc382ed478c6456d55701bf974d4
Signed-off-by: Odelu Kukatla <[email protected]>
2020-08-30 01:12:35 -07:00
Odelu Kukatla
c54d9f7b06 interconnect: qcom: Build qnoc-qos as module
Build qnoc-qos.c as a module to make the symbols
available and avoid build warnings.

Change-Id: I62ab7a04225d71c036cd78f38259a98f099632ed
Signed-off-by: Odelu Kukatla <[email protected]>
2020-08-29 23:15:05 +05:30
Mayank Rana
14bd7f0a99 Revert "dwc3-msm: Add support to vote USB FORCE_MEM_CORE_ON"
This change reverts commit ("f1984dceeb dwc3-msm: Add support to vote
USB FORCE_MEM_CORE_ON") which is using dummy clock to update USB
master clock for keeping USB controller CSR retain while going into
CXPC. There is new API qcom_clk_set_flags() propose which supports
same functionality without USB dummy clock.

Change-Id: I0e35e4dac265a22eac2c3e95946cc9171c309508
Signed-off-by: Mayank Rana <[email protected]>
2020-08-29 09:44:04 -07:00
Jagadeesh Kona
b5fef2d563 ABI: Add regmap_mmio_detach_clk API to QCOM whitelist
Add regmap_mmio_detach_clk API to QCOM whitelist.

Change-Id: I3eb6e4f0f96f20c41b8f2354712ec79389049aa7
Signed-off-by: Jagadeesh Kona <[email protected]>
2020-08-29 20:46:07 +05:30
qctecmdr
99e8c41675 Merge "usb: dwc3: Set FORCE_MEM_CORE_ON bit of GCC_USB30_MASTER_CLK" 2020-08-29 00:51:30 -07:00
Anirudh Ghayal
960615c328 mfd: qcom-i2c-pmic: Reduce the stat-toggle delay
Reduce the stat-toggle delays to 50ms (overall) to
optimize boot time.

Change-Id: I58027cb94500cf93eb42b44dcec9a5e68670b5e0
Signed-off-by: Anirudh Ghayal <[email protected]>
2020-08-29 11:45:19 +05:30
Anirudh Ghayal
c4c94b5f55 mfd: qcom-i2c-pmic: Toggle STAT pin at init
Logic to toggle STAT pin during init.

Change-Id: I269b0be18b56d56c0ab0e68ee1d7194d09824dd5
Signed-off-by: Anirudh Ghayal <[email protected]>
2020-08-29 11:43:39 +05:30
qctecmdr
fe2aa494de Merge "interconnect: qcom: sdxlemur: Remove stub functions" 2020-08-28 21:18:09 -07:00
qctecmdr
39074278cc Merge "arm: defconfig: Enable gcc clock driver for sdxlemur" 2020-08-28 21:18:08 -07:00
qctecmdr
d89ce61309 Merge "byte-cntr: Add mutex_unlock when rwp_offset is invalid" 2020-08-28 21:18:08 -07:00
qctecmdr
b58d44d0c6 Merge "Merge android11-5.4.58+ (33cc3e7) into msm-5.4" 2020-08-28 21:18:07 -07:00
Lina Iyer
e888d93a58 arm64: defconfig: enable debugging of cpuidle governor in SVM
Enable idle state failure statistics and tracing in menu governor to
debug cpuidle related issues in SVM. Enable FTRACE dependency for the
config items.

Change-Id: I635a1c06db528358113672daa1ccb78078c79bf3
Signed-off-by: Lina Iyer <[email protected]>
2020-08-28 21:40:54 -06:00
qctecmdr
8c8fbafeba Merge "pci: msm: Configure L23 ready poll timeout using sysfs" 2020-08-28 17:56:37 -07:00
qctecmdr
39b229314c Merge "cnss2: Disable LPASS full power collapse on DRV suspend" 2020-08-28 17:56:37 -07:00
qctecmdr
df5fbccdc6 Merge "power: supply: qcom: Update SMB5 charger properties for GKI compliance" 2020-08-28 17:56:36 -07:00
qctecmdr
54dded298e Merge "mhi: core: Check for RDDM cookie set by device to indicate readiness" 2020-08-28 17:56:36 -07:00
John Stultz
62b6e96e16 ANDROID: db845c_gki.fragment: Remove CONFIG_USB_NET_AX88*
Commit 55adb91acc ("ANDROID: GKI: enable some USB_NET_ config
options") implicitly enabled the CONFIG_USB_NET_AX88* options
which was causing trouble with the db845C_gki.fragment, since
we try to load these (along with PHYLIB) as modules.

So drop these, and it should work out.

Fixes: 55adb91acc ("ANDROID: GKI: enable some USB_NET_ config options")
Signed-off-by: John Stultz <[email protected]>
Change-Id: Ia7e69d7030842f5136aafc064e1ba8a70bad2bb6
2020-08-28 22:30:13 +00:00
Chun-Hung Wu
ea9b3d7e6b ANDROID: GKI: enable CONFIG_MTK_TIMER
It's needed by MTK board for reasons below:
After working with built-in mtk timer(timer-mediatek) as
tick-broadcast devices for few weeks, we found some issues caused
by linux timer framework:
1. tick broadcast installed by insmod cannot switch to oneshot
   mode correctly (BUG: 161822795)
2. rcu warning will be shown if we force to re-enabled tick-broadcast
for each cpu when new tick broadcast device is added by insmod
(timer-mediatek.c in our case)

Bug: 161675989
Change-Id: If3056df11d8256f2af4a6928820faed9f690b3db
Signed-off-by: Freddy Hsin <[email protected]>
Signed-off-by: Chun-Hung Wu <[email protected]>
2020-08-28 22:28:50 +00:00
Todd Kjos
e54e1caec3 ANDROID: ABI: Update ABI description after symbol list updates
Leaf changes summary: 53 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 51 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 2 Added variables

51 Added functions:

  [A] 'function int __irq_alloc_domain_generic_chips(irq_domain*, int, int, const char*, irq_flow_handler_t, unsigned int, unsigned int, irq_gc_flags)'
  [A] 'function int __srcu_read_lock(srcu_struct*)'
  [A] 'function void __srcu_read_unlock(srcu_struct*, int)'
  [A] 'function void bt_err(const char*, ...)'
  [A] 'function void bt_info(const char*, ...)'
  [A] 'function void clk_unregister_fixed_factor(clk*)'
  [A] 'function void clk_unregister_fixed_rate(clk*)'
  [A] 'function void clk_unregister_gate(clk*)'
  [A] 'function void cpufreq_dbs_governor_exit(cpufreq_policy*)'
  [A] 'function int cpufreq_dbs_governor_init(cpufreq_policy*)'
  [A] 'function void cpufreq_dbs_governor_limits(cpufreq_policy*)'
  [A] 'function int cpufreq_dbs_governor_start(cpufreq_policy*)'
  [A] 'function void cpufreq_dbs_governor_stop(cpufreq_policy*)'
  [A] 'function unsigned short int crc16(unsigned short int, const unsigned char*, unsigned long int)'
  [A] 'function unsigned int dbs_update(cpufreq_policy*)'
  [A] 'function int device_move(device*, device*, dpm_order)'
  [A] 'function dma_chan* dma_get_any_slave_channel(dma_device*)'
  [A] 'function void ehci_init_driver(hc_driver*, const ehci_driver_overrides*)'
  [A] 'function int ehci_resume(usb_hcd*, bool)'
  [A] 'function int ehci_setup(usb_hcd*)'
  [A] 'function int ehci_suspend(usb_hcd*, bool)'
  [A] 'function void ethtool_convert_legacy_u32_to_link_mode(unsigned long int*, u32)'
  [A] 'function int filp_close(file*, void*)'
  [A] 'function long long unsigned int get_cpu_idle_time_us(int, long long unsigned int*)'
  [A] 'function void gov_update_cpu_data(dbs_data*)'
  [A] 'function int gpiochip_generic_config(gpio_chip*, unsigned int, unsigned long int)'
  [A] 'function int iio_map_array_register(iio_dev*, iio_map*)'
  [A] 'function int iio_map_array_unregister(iio_dev*)'
  [A] 'function void interval_tree_insert(interval_tree_node*, rb_root_cached*)'
  [A] 'function interval_tree_node* interval_tree_iter_first(rb_root_cached*, unsigned long int, unsigned long int)'
  [A] 'function interval_tree_node* interval_tree_iter_next(interval_tree_node*, unsigned long int, unsigned long int)'
  [A] 'function void interval_tree_remove(interval_tree_node*, rb_root_cached*)'
  [A] 'function void irq_gc_ack_set_bit(irq_data*)'
  [A] 'function void irq_gc_mask_clr_bit(irq_data*)'
  [A] 'function void irq_gc_mask_set_bit(irq_data*)'
  [A] 'function irq_chip_generic* irq_get_domain_generic_chip(irq_domain*, unsigned int)'
  [A] 'function int irq_setup_alt_chip(irq_data*, unsigned int)'
  [A] 'function int memblock_free(long long unsigned int, long long unsigned int)'
  [A] 'function void netdev_update_features(net_device*)'
  [A] 'function void* of_get_mac_address(device_node*)'
  [A] 'function int pinctrl_gpio_direction_input(unsigned int)'
  [A] 'function int pinctrl_gpio_direction_output(unsigned int)'
  [A] 'function void rfkill_set_states(rfkill*, bool, bool)'
  [A] 'function int snd_dmaengine_pcm_open(snd_pcm_substream*, dma_chan*)'
  [A] 'function ssize_t store_sampling_rate(gov_attr_set*, const char*, size_t)'
  [A] 'function int usb_alloc_streams(usb_interface*, usb_host_endpoint**, unsigned int, unsigned int, unsigned int)'
  [A] 'function int usb_free_streams(usb_interface*, usb_host_endpoint**, unsigned int, unsigned int)'
  [A] 'function int usb_wait_anchor_empty_timeout(usb_anchor*, unsigned int)'
  [A] 'function void usbnet_defer_kevent(usbnet*, int)'
  [A] 'function void vb2_dma_contig_clear_max_seg_size(device*)'
  [A] 'function int vb2_dma_contig_set_max_seg_size(device*, unsigned int)'

2 Added variables:

  [A] 'irq_domain_ops irq_generic_chip_ops'
  [A] 'const vb2_mem_ops vb2_dma_contig_memops'

Bug: 166748000
Signed-off-by: Todd Kjos <[email protected]>
Change-Id: Ideb6eaf46f5a7cf3fa2de1f673ce60767ec8fe19
2020-08-28 22:22:28 +00:00
huangshuosheng
1278a5bf16 ANDROID: ABI: Added symbols for allwinner
Leaf changes summary: 45 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 43 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 2 Added variables

43 Added functions:

  [A] 'function int __irq_alloc_domain_generic_chips(irq_domain*, int, int, const char*, irq_flow_handler_t, unsigned int, unsigned int, irq_gc_flags)'
  [A] 'function void bt_err(const char*, ...)'
  [A] 'function void bt_info(const char*, ...)'
  [A] 'function void clk_unregister_fixed_factor(clk*)'
  [A] 'function void clk_unregister_fixed_rate(clk*)'
  [A] 'function void clk_unregister_gate(clk*)'
  [A] 'function void cpufreq_dbs_governor_exit(cpufreq_policy*)'
  [A] 'function int cpufreq_dbs_governor_init(cpufreq_policy*)'
  [A] 'function void cpufreq_dbs_governor_limits(cpufreq_policy*)'
  [A] 'function int cpufreq_dbs_governor_start(cpufreq_policy*)'
  [A] 'function void cpufreq_dbs_governor_stop(cpufreq_policy*)'
  [A] 'function unsigned short int crc16(unsigned short int, const unsigned char*, unsigned long int)'
  [A] 'function unsigned int dbs_update(cpufreq_policy*)'
  [A] 'function int device_move(device*, device*, dpm_order)'
  [A] 'function dma_chan* dma_get_any_slave_channel(dma_device*)'
  [A] 'function void ehci_init_driver(hc_driver*, const ehci_driver_overrides*)'
  [A] 'function int ehci_resume(usb_hcd*, bool)'
  [A] 'function int ehci_setup(usb_hcd*)'
  [A] 'function int ehci_suspend(usb_hcd*, bool)'
  [A] 'function void ethtool_convert_legacy_u32_to_link_mode(unsigned long int*, u32)'
  [A] 'function int filp_close(file*, void*)'
  [A] 'function long long unsigned int get_cpu_idle_time_us(int, long long unsigned int*)'
  [A] 'function void gov_update_cpu_data(dbs_data*)'
  [A] 'function int gpiochip_generic_config(gpio_chip*, unsigned int, unsigned long int)'
  [A] 'function int iio_map_array_register(iio_dev*, iio_map*)'
  [A] 'function int iio_map_array_unregister(iio_dev*)'
  [A] 'function void irq_gc_ack_set_bit(irq_data*)'
  [A] 'function void irq_gc_mask_clr_bit(irq_data*)'
  [A] 'function void irq_gc_mask_set_bit(irq_data*)'
  [A] 'function irq_chip_generic* irq_get_domain_generic_chip(irq_domain*, unsigned int)'
  [A] 'function int irq_setup_alt_chip(irq_data*, unsigned int)'
  [A] 'function void* of_get_mac_address(device_node*)'
  [A] 'function int pinctrl_gpio_direction_input(unsigned int)'
  [A] 'function int pinctrl_gpio_direction_output(unsigned int)'
  [A] 'function void rfkill_set_states(rfkill*, bool, bool)'
  [A] 'function int snd_dmaengine_pcm_open(snd_pcm_substream*, dma_chan*)'
  [A] 'function ssize_t store_sampling_rate(gov_attr_set*, const char*, size_t)'
  [A] 'function int usb_alloc_streams(usb_interface*, usb_host_endpoint**, unsigned int, unsigned int, unsigned int)'
  [A] 'function int usb_free_streams(usb_interface*, usb_host_endpoint**, unsigned int, unsigned int)'
  [A] 'function int usb_wait_anchor_empty_timeout(usb_anchor*, unsigned int)'
  [A] 'function void usbnet_defer_kevent(usbnet*, int)'
  [A] 'function void vb2_dma_contig_clear_max_seg_size(device*)'
  [A] 'function int vb2_dma_contig_set_max_seg_size(device*, unsigned int)'

2 Added variables:

  [A] 'irq_domain_ops irq_generic_chip_ops'
  [A] 'const vb2_mem_ops vb2_dma_contig_memops'

Bug: 154880035
Change-Id: I7df6cc6200ea10565608cf7c9b7a089734805c8f
Signed-off-by: huangshuosheng <[email protected]>
2020-08-28 22:21:13 +00:00
Subbaraman Narayanamurthy
cf157b6b02 power: supply: qti_battery_charger: Change wireless power supply type
Now that the power supply framework has POWER_SUPPLY_TYPE_WIRELESS
change the wireless power supply type from MAINS to WIRELESS. This
would help android healthd to show "chg=w" rather than "chg=a" in
logs when a wireless charger is connected.

Change-Id: I871779aa806f775e2cdf1e0994593fc991fe77f9
Signed-off-by: Subbaraman Narayanamurthy <[email protected]>
2020-08-28 15:20:32 -07:00
Raghavendra Rao Ananta
042f9c9a34 ANDROID: ABI: Update allowed list for QCOM
Leaf changes summary: 8 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 8 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

8 Added functions:

  [A] 'function int __srcu_read_lock(srcu_struct*)'
  [A] 'function void __srcu_read_unlock(srcu_struct*, int)'
  [A] 'function void interval_tree_insert(interval_tree_node*, rb_root_cached*)'
  [A] 'function interval_tree_node* interval_tree_iter_first(rb_root_cached*, unsigned long int, unsigned long int)'
  [A] 'function interval_tree_node* interval_tree_iter_next(interval_tree_node*, unsigned long int, unsigned long int)'
  [A] 'function void interval_tree_remove(interval_tree_node*, rb_root_cached*)'
  [A] 'function int memblock_free(long long unsigned int, long long unsigned int)'
  [A] 'function void netdev_update_features(net_device*)'

Bug: 166748000
Change-Id: I1683cce8238bf533d379a2d034f5640d1299859a
Signed-off-by: Raghavendra Rao Ananta <[email protected]>
2020-08-28 15:12:00 -07:00
Bhaumik Bhatt
0e5a6b80ff mhi: core: Check for RDDM cookie set by device to indicate readiness
If the device is unable to send the mission mode execution
environment change event but has already entered mission mode
with the ability to allow ramdump collection, it can set a unique
cookie pattern to indicate the availability of ramdumps. Allow
the controller to query for this unique pattern upon any bootup
failure or timeout.

Change-Id: Id1f58b75d3f22e9e21b142cbea74d61cc65615b4
Signed-off-by: Bhaumik Bhatt <[email protected]>
2020-08-28 14:53:32 -07:00
Bhaumik Bhatt
739281396c mhi: core: Move to error state if firmware could not be loaded
Move MHI to a firmware download error state for any bootup
failures such as unable to find firmware files or load images via
BHI/BHIe. This helps detect an error state sooner and shortens
the wait for a synchronous power up timeout. It also negates the
need to provide additional callbacks due to any intermediate
bootup failures.

Change-Id: I3307e432063f59e978f1e055453155803a6475b2
Signed-off-by: Bhaumik Bhatt <[email protected]>
2020-08-28 14:52:01 -07:00
qctecmdr
16a14a1745 Merge "i2c-msm-geni: Add log to print the i2c bus frequency" 2020-08-28 14:21:55 -07:00
qctecmdr
a29a3d5721 Merge "serial: msm_geni_serial: Log CTS and RX IO line status" 2020-08-28 14:21:54 -07:00
qctecmdr
98b3301eae Merge "msm: kgsl: Make ACD QMP message sending failure non fatal" 2020-08-28 14:21:54 -07:00
qctecmdr
8d1b5f677b Merge "defconfig: Avoid disabling temp_alarm driver for holi" 2020-08-28 14:21:54 -07:00
qctecmdr
7212d14052 Merge "regulator: rpm-smd: Update sync_state call" 2020-08-28 14:21:53 -07:00
qctecmdr
2d3abc765c Merge "kernel: crypto: Possible null pointer dereference" 2020-08-28 14:21:53 -07:00
qctecmdr
6278f1358d Merge "cnss2: Add support to use new ramdump APIs" 2020-08-28 14:21:52 -07:00
qctecmdr
ba4ba78525 Merge "msm: cvp: enable cache op by default" 2020-08-28 14:21:51 -07:00
qctecmdr
8356a39a60 Merge "Merge android11-5.4.58 (3a9b53b) into msm-5.4" 2020-08-28 14:21:51 -07:00
Andy Teng
55bbca30d4 UPSTREAM: scsi: ufs: ufs-mediatek: Modify the minimum RX/TX lane count to 2
MediaTek UFS host now supports 2 lanes. Modify the lane count to 2.

This modification shall not impact old 1-lane host because
PA_CONNECTEDRXDATALANES and PA_CONNECTEDTXDATALANES will limit the target
lanes properly during power mode change. So we could relax the limitation
in ufs_dev_params.

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Stanley Chu <[email protected]>
Reviewed-by: Avri Altman <[email protected]>
Signed-off-by: Andy Teng <[email protected]>
Signed-off-by: Stanley Chu <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>

Bug: 166747994
(cherry picked from commit 460d74a0911c562f56148519a2467271271a73aa)
Change-Id: Ia3cb46d691f4498829565a70ba332cd246dc98a2
Signed-off-by: Stanley Chu <[email protected]>
2020-08-28 20:54:00 +00:00
Stanley Chu
48eafd42bd UPSTREAM: scsi: ufs: Fix possible infinite loop in ufshcd_hold
In ufshcd_suspend(), after clk-gating is suspended and link is set
as Hibern8 state, ufshcd_hold() is still possibly invoked before
ufshcd_suspend() returns. For example, MediaTek's suspend vops may
issue UIC commands which would call ufshcd_hold() during the command
issuing flow.

Now if UFSHCD_CAP_HIBERN8_WITH_CLK_GATING capability is enabled,
then ufshcd_hold() may enter infinite loops because there is no
clk-ungating work scheduled or pending. In this case, ufshcd_hold()
shall just bypass, and keep the link as Hibern8 state.

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Avri Altman <[email protected]>
Co-developed-by: Andy Teng <[email protected]>
Signed-off-by: Andy Teng <[email protected]>
Signed-off-by: Stanley Chu <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>

Bug: 166747994
(cherry picked from commit 93b6c5db06028a3b55122bbb74d0715dd8ca4ae0)
Change-Id: I595ee3f0da3b89e11cbe5d6d31ba7ce58b1757bc
Signed-off-by: Stanley Chu <[email protected]>
2020-08-28 20:53:45 +00:00