summaryrefslogtreecommitdiffstats
path: root/include/linux/tegra-camera-rtcpu.h
diff options
context:
space:
mode:
authorPekka Pessi <ppessi@nvidia.com>2017-02-17 08:10:00 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-05-04 04:54:44 -0400
commitf7b35e10839f36b52d3c1ea35c8d3fbfcc617b28 (patch)
treea458f54b4ce1bc93fa9a487d387eb312d749731c /include/linux/tegra-camera-rtcpu.h
parent72c852400e8f036d2192ae1babf8e93f4f2e5d38 (diff)
platform: tegra: rtcpu: refactor pm and probing
Firmware provides now the PM features for suspend and resume. Firmware activates the WDT after boot synchronization and deactivates it when suspended. The boot synchronization and the IVC service synchronization can be redone at any time. The driver requires firmware version SM4 because the earlier firmwares can not resume gracefully from the suspended state. Reorder initialization in order to avoid accessing hardware before it is fully powered. Note that powering HW with the APE power domain during the probe() may happen when pm_runtime_get_sync() is called and both resume and runtime_resume may get invoked in the process. Add checks to avoid any premature resumes. Assert resets in the reverse order they are deasserted. Enable clocks before touching any resources, including getting interrupt resources. Fix the unbalanced early_resume/late_suspend. The power domain does not track the last busy from the children of the rtcpu device. Mark the rtcpu device last busy always when the ivc channel devices are used, too. The IVC channels are now created only after the initial boot sync and version exchange with the firmware. When the IVC sync is done the RTCPU and device are both up and ready. Do not expose boot and halt methods. Instead provide the reboot method, which will only proceed when the rtcpu device is in the active runtime state. Follow suspend procedure from APE TRM. Wait for APE WFI using an interrupt. Wait for APE L2 cache to idle. Allocate an interrupt for APE WFI. Move all register handling to core-specific functions (tegra_ape_cam*(), tegra_sce_cam*()). Do not use the ahub clock. Power off RTCPU and remove the tracer during remove. Tracer can be disabled or enabled in the device tree. Treat it as an optional feature. Jira CRTC-910 Bug 1857548 Jira CRTC-966 Bug 1864505 Bug 200269632 Bug 200292354 Change-Id: I75df878932a4307181a243261f99f0a853d395b1 Signed-off-by: Pekka Pessi <ppessi@nvidia.com> Reviewed-on: http://git-master/r/1298769 Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Mika Liljeberg <mliljeberg@nvidia.com>
Diffstat (limited to 'include/linux/tegra-camera-rtcpu.h')
-rw-r--r--include/linux/tegra-camera-rtcpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/tegra-camera-rtcpu.h b/include/linux/tegra-camera-rtcpu.h
index 73eab094b..76b63ade2 100644
--- a/include/linux/tegra-camera-rtcpu.h
+++ b/include/linux/tegra-camera-rtcpu.h
@@ -20,10 +20,10 @@ struct device;
20 20
21int tegra_camrtc_iovm_setup(struct device *dev, dma_addr_t iova); 21int tegra_camrtc_iovm_setup(struct device *dev, dma_addr_t iova);
22ssize_t tegra_camrtc_print_version(struct device *dev, char *buf, size_t size); 22ssize_t tegra_camrtc_print_version(struct device *dev, char *buf, size_t size);
23int tegra_camrtc_boot(struct device *dev); 23int tegra_camrtc_reboot(struct device *dev);
24int tegra_camrtc_halt(struct device *dev);
25int tegra_camrtc_restore(struct device *dev); 24int tegra_camrtc_restore(struct device *dev);
26bool tegra_camrtc_is_rtcpu_alive(struct device *dev); 25bool tegra_camrtc_is_rtcpu_alive(struct device *dev);
26
27#define TEGRA_CAMRTC_VERSION_LEN 128 27#define TEGRA_CAMRTC_VERSION_LEN 128
28 28
29int tegra_camrtc_command(struct device *dev, u32 command, long timeout); 29int tegra_camrtc_command(struct device *dev, u32 command, long timeout);