During RTC-only suspend, power is lost to the wkup domain, so we need to
save and restore the state of that domain. We also need to store some
information within the RTC registers so that u-boot can do the right thing
at powerup.
The state is entered by getting the RTC to bring the pmic_power_en line low
which will instruct the PMIC to disable the appropriate power rails after
putting DDR into self-refresh mode. To bring pmic_power_en low, we need to
get an ALARM2 event. Since we are running from SRAM at that point, it means
calculating what the next second is (via ASM) and programming that into the
RTC. This patch also adds support for wake up source detection.
Signed-off-by: Keerthy <[email protected]>
Signed-off-by: Dave Gerlach <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
Move the am33xx_push_sram_idle function to the top as a preparation
for rtc+ddr mode as the function will be called by multiple functions
currently present before it.
No functional changes.
Signed-off-by: Keerthy <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
Add support for rtc+ddr in self refresh mode. Add addtional
pm hooks for save/restore and rtc suspend/resume.
Signed-off-by: Keerthy <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c: In function 'vmw_fb_init':
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c:645:29: warning:
variable 'fb_offset' set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c:645:19: warning:
variable 'fb_depth' set but not used [-Wunused-but-set-variable]
They're not used any more, so can be removed.
Signed-off-by: YueHaibing <[email protected]>
Reviewed-by: Deepak Rawat <[email protected]>
Signed-off-by: Deepak Rawat <[email protected]>
When building with -Wsometimes-uninitialized, Clang warns:
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:3964:7: warning: variable
'handle' is used uninitialized whenever '?:' condition is false
[-Wsometimes-uninitialized]
It's not wrong; however, in practice, this is never an issue because
the value of handle isn't used when user_fence_rep is NULL because
vmw_execbuf_copy_fence_user returns immediately when that is the case.
Just zero initialize this variable so that Clang no longer warns.
Link: https://github.com/ClangBuiltLinux/linux/issues/397
Signed-off-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Signed-off-by: Deepak Rawat <[email protected]>
Whenever FIFO allocation fails an error message is printed to dmesg.
Since this is common operation a lot of similar messages are scattered
everywhere. Use preprocessor macro to remove this cluttering.
Signed-off-by: Deepak Rawat <[email protected]>
Reviewed-by: Thomas Hellstrom <[email protected]>
No functional change with this change, just fixing formatting and
spaces.
v2: Rebase.
Signed-off-by: Deepak Rawat <[email protected]>
Reviewed-by: Thomas Hellstrom <[email protected]>
DRM_ERROR overwhelms dmesgi so use VMW_DEBUG_USER instead. Any malformed
command should not really go to device so WARN_ONCE to spot this.
Signed-off-by: Deepak Rawat <[email protected]>
Reviewed-by: Thomas Hellstrom <[email protected]>
Now that vmw_cmd_check prints debug message whenever a command verifier
fails, some of debug statements are unnecessary. Also rearranged some
debug print-out with this patch.
Signed-off-by: Deepak Rawat <[email protected]>
Reviewed-by: Thomas Hellstrom <[email protected]>
Whenever command verifier function returns with an error, print a debug
message using VMW_DEBUG_USER. This will make sure failing commands can
be easily tracked for debugging purpose.
Signed-off-by: Deepak Rawat <[email protected]>
Reviewed-by: Thomas Hellstrom <[email protected]>
Error messages or debugging message reported during user-space command
submission should not be printed to dmesg by default. So add a new
preprocessor define called VMW_DEBUG_USER which translates to
DRM_DEBUG_DRIVER.
v2: Use VMW_DEBUG_USER instead of using DRM_DEBUG_DRIVER directly.
Signed-off-by: Deepak Rawat <[email protected]>
Reviewed-by: Thomas Hellstrom <[email protected]>
Use preprocessor macro for repetitive device command struct format.
v2: Name-space distinction for preprocessor macro.
v3: Struct name as macro parameter and rebase.
Signed-off-by: Deepak Rawat <[email protected]>
Reviewed-by: Thomas Hellstrom <[email protected]>
Several command verifier function check if context node is present or
not and if not present print an error and return. Use a preprocessor
macro to print the message.
v2: Name-space distinction for preprocessor macro
Signed-off-by: Deepak Rawat <[email protected]>
Reviewed-by: Thomas Hellstrom <[email protected]>
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c: In function 'vmw_cmdbuf_work_func':
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:514:7: warning:
variable 'restart' set but not used [-Wunused-but-set-variable]
It not used any more after commit dc366364c4 ("drm/vmwgfx: Fix multiple
command buffer context use")
Signed-off-by: YueHaibing <[email protected]>
Reviewed-by: Deepak Rawat <[email protected]>
Signed-off-by: Deepak Rawat <[email protected]>
Fixes: dc366364c4 ("drm/vmwgfx: Fix multiple command buffer context use")
Currently we flag resources as dirty (GPU contents not yet read back to
the backing MOB) whenever they have been part of a command stream.
Obviously many resources can't be dirty and others can only be dirty when
written to by the GPU. That is when they are either bound to the context as
render-targets, depth-stencil, copy / clear destinations and
stream-output targets, or similarly when there are corresponding views into
them.
So mark resources dirty only in these special cases. Context- and cotable
resources are always marked dirty when referenced.
This is important for upcoming emulated coherent memory, since we can avoid
issuing automatic readbacks to non-dirty resources when the CPU tries to
access part of the backing MOB.
Testing: Unigine Heaven with max GPU memory set to 256MB resulting in
heavy resource thrashing.
---
v2: Addressed review comments by Deepak Rawat.
v3: Added some documentation
Signed-off-by: Thomas Hellstrom <[email protected]>
Reviewed-by: Deepak Rawat <[email protected]>
Prepare rtc driver for rtc-only with DDR in self-refresh mode.
omap_rtc_power_off now should cater to two features:
1) RTC plus DDR in self-refresh is power a saving mode where in the
entire system including the different voltage rails from PMIC are
shutdown except the ones feeding on to RTC and DDR. DDR is kept in
self-refresh hence the contents are preserved. RTC ALARM2 is connected
to PMIC_EN line once we the ALARM2 is triggered we enter the mode with
DDR in self-refresh and RTC Ticking. After a predetermined time an RTC
ALARM1 triggers waking up the system[1]. The control goes to bootloader.
The bootloader then checks RTC scratchpad registers to confirm it was an
rtc_only wakeup and follows a different path, configure bare minimal
clocks for ddr and then jumps to the resume address in another RTC
scratchpad registers and transfers the control to Kernel. Kernel then
restores the saved context. omap_rtc_power_off_program does the ALARM2
programming part.
[1] http://www.ti.com/lit/ug/spruhl7h/spruhl7h.pdf Page 2884
2) Power-off: This is usual poweroff mode. omap_rtc_power_off calls the
above omap_rtc_power_off_program function and in addition to that
programs the OMAP_RTC_PMIC_REG for any external wake ups for PMIC like
the pushbutton and shuts off the PMIC.
Hence the split in omap_rtc_power_off.
Signed-off-by: Keerthy <[email protected]>
Acked-by: Alexandre Belloni <[email protected]>
[[email protected]: folded in a fix for compile warning]
Signed-off-by: Tony Lindgren <[email protected]>
Newer ThinkPads have a totally different EC program information DMI
table. And thermal subdriver can't work without correct EC version.
Read from this entry if the old method failed to get EC information.
Signed-off-by: Jiaxun Yang <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Some AMD based ThinkPads have a firmware bug that calling
"GBDC" will cause Bluetooth on Intel wireless cards blocked.
Probe these models by DMI match and disable Bluetooth subdriver
if specified Intel wireless card exist.
Cc: stable <[email protected]> # 4.14+
Signed-off-by: Jiaxun Yang <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Add touchscreen platform data for the Myrya MY8307 2-in-1 laptop.
Signed-off-by: Gabriel Lazar <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Building with W=1 complains:
CC [M] drivers/platform/x86/dell-rbtn.o
drivers/platform/x86/dell-rbtn.c:345:5: warning: no previous prototype for 'dell_rbtn_notifier_register' [-Wmissing-prototypes]
345 | int dell_rbtn_notifier_register(struct notifier_block *nb)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/dell-rbtn.c:371:5: warning: no previous prototype for 'dell_rbtn_notifier_unregister' [-Wmissing-prototypes]
371 | int dell_rbtn_notifier_unregister(struct notifier_block *nb)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The real problem is a missing include. Add it to keep dell-rbtn.c and .h in sync.
Fixes: b05ffc95f9 ("dell-rbtn: Export notifier for other kernel modules")
Signed-off-by: Valdis Kletnieks <[email protected]>
[andy: massaged commit message, added Fixes tag]
Signed-off-by: Andy Shevchenko <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.
Signed-off-by: Tony Lindgren <[email protected]>
When moving the documentation for the ieee802154 subsystem from
plain text to rst the file pattern in the MAINTAINERS file got wrong.
Updating it here to fix scripts using this file.
Reported-by: Joe Perches <[email protected]>
Signed-off-by: Stefan Schmidt <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Calling dump_backtrace() with a pt_regs argument corresponding to
userspace doesn't make any sense and our unwinder will simply print
"Call trace:" before unwinding the stack looking for user frames.
Rather than go through this song and dance, just return early if we're
passed a user register state.
Cc: <[email protected]>
Fixes: 1149aad10b ("arm64: Add dump_backtrace() in show_regs")
Reported-by: Kefeng Wang <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
The defines are taken from dt-bindings/pinctrl/am33xx.h
Signed-off-by: Christina Quast <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
The defines are taken from dt-bindings/pinctrl/am33xx.h
Signed-off-by: Christina Quast <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
The defines are taken from dt-bindings/pinctrl/am33xx.h
Signed-off-by: Christina Quast <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
The defines are taken from dt-bindings/pinctrl/am33xx.h
Signed-off-by: Christina Quast <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
AM33XX_PADCONF takes three instead of two parameters, to make
future changes to #pinctrl-cells easier.
For old boards which are not mainlined, we left the AM33XX_IOPAD
macro.
Signed-off-by: Christina Quast <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
During hash filter programming, driver needs to return ENOSPC error
intead of EAGAIN when TCAM is full.
Signed-off-by: Vishal Kulkarni <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
The values are extraced from the "AM335x SitaraTM Processors Technical
Reference Manual", Section 9.3.1 CONTROL_MODULE Registers, based on the
file autogenerated by TI PinMux.
Signed-off-by: Christina Quast <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
This hook only implements a minimal set of ioctl hooks to be able to access
MII regs by using phytool.
When using this simple MAC controller, it's pretty difficult to do
debugging of the PHY chip without checking MII regs.
Signed-off-by: Alexandru Ardelean <[email protected]>
Reviewed-by: Radhey Shyam Pandey <[email protected]>
Signed-off-by: David S. Miller <[email protected]>