android_kernel_samsung_a7y1.../drivers
Douglas Anderson 4774c97d80 clk: rockchip: Turn on "aclk_dmac1" for suspend on rk3288
[ Upstream commit 57a20248ef3e429dc822f0774bc4e00136c46c83 ]

Experimentally it can be seen that going into deep sleep (specifically
setting PMU_CLR_DMA and PMU_CLR_BUS in RK3288_PMU_PWRMODE_CON1)
appears to fail unless "aclk_dmac1" is on.  The failure is that the
system never signals that it made it into suspend on the GLOBAL_PWROFF
pin and it just hangs.

NOTE that it's confirmed that it's the actual suspend that fails, not
one of the earlier calls to read/write registers.  Specifically if you
comment out the "PMU_GLOBAL_INT_DISABLE" setting in
rk3288_slp_mode_set() and then comment out the "cpu_do_idle()" call in
rockchip_lpmode_enter() then you can exercise the whole suspend path
without any crashing.

This is currently not a problem with suspend upstream because there is
no current way to exercise the deep suspend code.  However, anyone
trying to make it work will run into this issue.

This was not a problem on shipping rk3288-based Chromebooks because
those devices all ran on an old kernel based on 3.14.  On that kernel
"aclk_dmac1" appears to be left on all the time.

There are several ways to skin this problem.

A) We could add "aclk_dmac1" to the list of critical clocks and that
apperas to work, but presumably that wastes power.

B) We could keep a list of "struct clk" objects to enable at suspend
time in clk-rk3288.c and use the standard clock APIs.

C) We could make the rk3288-pmu driver keep a list of clocks to enable
at suspend time.  Presumably this would require a dts and bindings
change.

D) We could just whack the clock on in the existing syscore suspend
function where we whack a bunch of other clocks.  This is particularly
easy because we know for sure that the clock's only parent
("aclk_cpu") is a critical clock so we don't need to do anything more
than ungate it.

In this case I have chosen D) because it seemed like the least work,
but any of the other options would presumably also work fine.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-06 19:02:15 +02:00
..
accessibility
acpi ACPI / SBS: Fix GPE storm on recent MacBookPro's 2020-04-06 15:20:26 +02:00
amba
android Revert "binder: Replace "%p" with "%pK" for stable" 2020-04-06 18:52:40 +02:00
ata libata: fix using DMA buffers on stack 2020-04-06 16:41:42 +02:00
atm
auxdisplay
base PM / core: Propagate dev->power.wakeup_path when no callbacks 2020-04-06 18:19:21 +02:00
battery
battery_v2
bcma
block xsysace: Fix error handling in ace_setup 2020-04-06 16:42:28 +02:00
bluetooth
bts
bus
ccic
cdrom cdrom: Fix race condition in cdrom_sysctl_register 2020-04-06 14:51:44 +02:00
char virtio_console: initialize vtermno value for ports 2020-04-06 18:20:12 +02:00
clk clk: rockchip: Turn on "aclk_dmac1" for suspend on rk3288 2020-04-06 19:02:15 +02:00
clocksource
connector
cpufreq cpufreq: pmac32: fix possible object reference leak 2020-04-06 18:19:31 +02:00
cpuidle
crypto crypto: vmx - ghash: do nosimd fallback manually 2020-04-06 18:20:52 +02:00
dca
devfreq
dio
dma dmaengine: at_xdmac: remove BUG_ON macro in tasklet 2020-04-06 18:18:35 +02:00
dma-buf
edac
eisa
extcon extcon: arizona: Disable mic detect if running when driver is removed 2020-04-06 18:19:23 +02:00
fingerprint
firewire
firmware
five
fmc
fpga
gator
gpio gpio: gpio-omap: fix level interrupt idling 2020-04-06 14:22:12 +02:00
gps
gpu drm/bridge: adv7511: Fix low refresh rate selection 2020-04-06 19:01:51 +02:00
gud
hid HID: core: move Usage Page concatenation to Main item 2020-04-06 18:20:00 +02:00
hsi
hv
hwmon hwmon: (f71805f) Use request_muxed_region for Super-IO accesses 2020-04-06 18:19:12 +02:00
hwspinlock
hwtracing intel_th: msu: Fix single mode with IOMMU 2020-04-06 18:13:40 +02:00
i2c i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA 2020-04-06 14:02:20 +02:00
ide
idle
iio iio: common: ssp_sensors: Initialize calculated_time in ssp_common_process_data 2020-04-06 18:19:39 +02:00
infiniband RDMA/cxgb4: Fix null pointer dereference on alloc_skb failure 2020-04-06 18:19:02 +02:00
input Input: snvs_pwrkey - initialize necessary driver data before enabling IRQ 2020-04-06 16:42:41 +02:00
iommu iommu/vt-d: Set intel_iommu_gfx_mapped correctly 2020-04-06 19:01:59 +02:00
ipack
irqchip
isdn mISDN: hfcpci: Test both vendor & device ID for Digium HFC4S 2020-04-06 12:57:02 +02:00
leds leds: lp55xx: fix null deref on firmware load failure 2020-04-06 14:51:15 +02:00
lguest
lightnvm
macintosh
mailbox
mcb
md bcache: avoid clang -Wunintialized warning 2020-04-06 18:18:21 +02:00
media media: uvcvideo: Fix uvc_alloc_entity() allocation alignment 2020-04-06 18:44:58 +02:00
memory memory: tegra: Fix integer overflow on tick value calculation 2020-04-06 18:14:02 +02:00
memstick
message
mfd mfd: twl6040: Fix device init errors for ACCCTL register 2020-04-06 19:01:47 +02:00
misc genwqe: Prevent an integer overflow in the ioctl 2020-04-06 18:45:18 +02:00
mmc mmc: sdhci-of-esdhc: add erratum eSDHC-A001 and A-008358 support 2020-04-06 18:19:19 +02:00
motor
mtd
muic
net net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages query 2020-04-06 18:45:04 +02:00
nfc
ntb
nubus
nvdimm libnvdimm/btt: Fix a kmemdup failure check 2020-04-06 16:43:30 +02:00
nvme
nvmem nvmem: core: fix read buffer in place 2020-04-06 19:02:03 +02:00
of
oprofile
parisc parisc: Use implicit space register selection for loading the coherence index of I/O pdirs 2020-04-06 18:45:12 +02:00
parport
pci PCI: Mark Atheros AR9462 to avoid bus reset 2020-04-06 18:14:25 +02:00
pcmcia
perf
phy
pinctrl pinctrl: pistachio: fix leaked of_node references 2020-04-06 18:18:33 +02:00
platform platform/chrome: cros_ec_proto: check for NULL transfer function 2020-04-06 19:02:11 +02:00
pnp
power power: supply: sysfs: prevent endless uevent loop with CONFIG_POWER_SUPPLY_DEBUG 2020-04-06 18:14:39 +02:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting 2020-04-06 14:52:33 +02:00
remoteproc
reset
rpmsg
rtc rtc: 88pm860x: prevent use-after-free on device remove 2020-04-06 18:15:42 +02:00
s390 scsi: zfcp: fix to prevent port_remove with pure auto scan LUNs (only sdevs) 2020-04-06 18:21:26 +02:00
sbus
scsi scsi: lpfc: Fix SLI3 commands being issued on SLI4 devices 2020-04-06 18:20:27 +02:00
security/samsung/icdrv
sensorhub
sensors
sfi
sh
sn
soc soc: mediatek: pwrap: Zero initialize rdata in pwrap_init_cipher 2020-04-06 19:02:13 +02:00
spi spi: Fix zero length xfer bug 2020-04-06 18:20:33 +02:00
spmi
ssb ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit 2020-04-06 18:15:20 +02:00
staging iio: hmc5843: fix potential NULL pointer dereferences 2020-04-06 18:19:37 +02:00
switch
target
tc
tee
thermal thermal/int340x_thermal: fix mode setting 2020-04-06 15:17:09 +02:00
thunderbolt
trace
tty tty: max310x: Fix external crystal register setup 2020-04-06 18:21:35 +02:00
uh
uio
usb USB: rio500: fix memory leak in close after disconnect 2020-04-06 18:21:16 +02:00
uwb
vfio vfio/pci: use correct format characters 2020-04-06 16:42:19 +02:00
vhost
video fbdev: fix WARNING in __alloc_pages_nodemask bug 2020-04-06 18:15:14 +02:00
virt drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl 2020-04-06 17:01:49 +02:00
virtio
vision
vlynq
vme
w1 w1: fix the resume command API 2020-04-06 18:15:45 +02:00
watchdog
xen fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock 2020-04-06 18:47:45 +02:00
zorro
Kconfig
Makefile