1/* 2 * _tiomap_pwr.h 3 * 4 * DSP-BIOS Bridge driver support functions for TI OMAP processors. 5 * 6 * Definitions and types for the DSP wake/sleep routines. 7 * 8 * Copyright (C) 2005-2006 Texas Instruments, Inc. 9 * 10 * This package is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License version 2 as 12 * published by the Free Software Foundation. 13 * 14 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 17 */ 18 19#ifndef _TIOMAP_PWR_ 20#define _TIOMAP_PWR_ 21 22#ifdef CONFIG_PM 23extern s32 dsp_test_sleepstate; 24#endif 25 26extern struct mailbox_context mboxsetting; 27 28/* 29 * ======== wake_dsp ========= 30 * Wakes up the DSP from DeepSleep 31 */ 32extern int wake_dsp(struct bridge_dev_context *dev_context, 33 void *pargs); 34 35/* 36 * ======== sleep_dsp ========= 37 * Places the DSP in DeepSleep. 38 */ 39extern int sleep_dsp(struct bridge_dev_context *dev_context, 40 u32 dw_cmd, void *pargs); 41/* 42 * ========interrupt_dsp======== 43 * Sends an interrupt to DSP unconditionally. 44 */ 45extern void interrupt_dsp(struct bridge_dev_context *dev_context, 46 u16 mb_val); 47 48/* 49 * ======== wake_dsp ========= 50 * Wakes up the DSP from DeepSleep 51 */ 52extern int dsp_peripheral_clk_ctrl(struct bridge_dev_context 53 *dev_context, void *pargs); 54/* 55 * ======== handle_hibernation_from_dsp ======== 56 * Handle Hibernation requested from DSP 57 */ 58int handle_hibernation_from_dsp(struct bridge_dev_context *dev_context); 59/* 60 * ======== post_scale_dsp ======== 61 * Handle Post Scale notification to DSP 62 */ 63int post_scale_dsp(struct bridge_dev_context *dev_context, 64 void *pargs); 65/* 66 * ======== pre_scale_dsp ======== 67 * Handle Pre Scale notification to DSP 68 */ 69int pre_scale_dsp(struct bridge_dev_context *dev_context, 70 void *pargs); 71/* 72 * ======== handle_constraints_set ======== 73 * Handle constraints request from DSP 74 */ 75int handle_constraints_set(struct bridge_dev_context *dev_context, 76 void *pargs); 77 78/* 79 * ======== dsp_clk_wakeup_event_ctrl ======== 80 * This function sets the group selction bits for while 81 * enabling/disabling. 82 */ 83void dsp_clk_wakeup_event_ctrl(u32 clock_id, bool enable); 84 85#endif /* _TIOMAP_PWR_ */ 86