Commits
Suman Anna committed 0db4962a63e
remoteproc/omap: request a timer(s) for remoteproc usage The remote processors in OMAP4+ SoCs are equipped with internal timers, like the internal SysTick timer in a Cortex M3/M4 NVIC or the CTM timer within Unicache in IPU & DSP. However, these timers are gated when the processor subsystem clock is gated, making them rather difficult to use as OS tick sources. They will not be able to wakeup the processor from any processor-sleep induced clock-gating states. This can be avoided by using an external timer as the tick source, which can be controlled independently by the core remoteproc driver code, but still allowing the processor subsystem clock to be auto-gated when the remoteproc cores are idle. This patch adds the support for remote processors to request a timer(s) to be used by the remoteproc. The timers are enabled and disabled in line with the enabling/disabling of the remoteproc. The timer data is not mandatory if the advanced device management features are not required. The current design relies on OMAP DMTimer API, which is limited to only the OMAP machine-specific layers in arch/arm, so the logic is implemented through OMAP rproc specific platform data ops. The OMAP remoteproc driver mainly requires ops to request/free a dmtimer, and to start/stop a timer. The split API helps in controlling the timer state without having to request and release a timer everytime it needs to use the timer. The required pdata ops implementations have also been added along with the core timer support. These functions need to be supplied to the OMAP remoteproc driver through the pdata quirks. This timer support logic needs to be revisited as and when the dmtimer code moves under the /drivers folder. NOTE: If the gptimer is already in use by the time IPU and/or DSP are loaded, the processors will fail to boot. Signed-off-by: Suman Anna <s-anna@ti.com>