_tiomap_pwr.h 2.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
/*
 * _tiomap_pwr.h
 *
 * DSP-BIOS Bridge driver support functions for TI OMAP processors.
 *
 * Definitions and types for the DSP wake/sleep routines.
 *
 * Copyright (C) 2005-2006 Texas Instruments, Inc.
 *
 * This package is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#ifndef _TIOMAP_PWR_
#define _TIOMAP_PWR_

#ifdef CONFIG_PM
extern s32 dsp_test_sleepstate;
#endif

extern struct mailbox_context mboxsetting;

/*
 * ======== wake_dsp =========
 * Wakes up the DSP from DeepSleep
 */
extern int wake_dsp(struct bridge_dev_context *dev_context,
33
							void *pargs);
34 35 36 37 38 39

/*
 * ======== sleep_dsp =========
 * Places the DSP in DeepSleep.
 */
extern 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 45
 */
extern void interrupt_dsp(struct bridge_dev_context *dev_context,
46
							u16 mb_val);
47 48 49 50 51 52

/*
 * ======== wake_dsp =========
 * Wakes up the DSP from DeepSleep
 */
extern 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 58 59 60
 */
int handle_hibernation_from_dsp(struct bridge_dev_context *dev_context);
/*
 *  ======== post_scale_dsp ========
61
 *	Handle Post Scale notification to DSP
62 63
 */
int 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 69
 */
int pre_scale_dsp(struct bridge_dev_context *dev_context,
70
							void *pargs);
71 72
/*
 *  ======== handle_constraints_set ========
73
 *	Handle constraints request from DSP
74 75
 */
int handle_constraints_set(struct bridge_dev_context *dev_context,
76
				  void *pargs);
77 78 79 80 81 82

/*
 *  ======== dsp_clk_wakeup_event_ctrl ========
 *     This function sets the group selction bits for while
 *     enabling/disabling.
 */
83
void dsp_clk_wakeup_event_ctrl(u32 clock_id, bool enable);
84 85

#endif /* _TIOMAP_PWR_ */