Linux Audio

Check our new training course

Loading...
v6.9.4
 1/* SPDX-License-Identifier: GPL-2.0-or-later */
 2/*
 3 * Support Power Management
 4 *
 5 * Copyright 2014-2015 Freescale Semiconductor Inc.
 
 
 
 
 
 6 */
 7#ifndef __PPC_FSL_PM_H
 8#define __PPC_FSL_PM_H
 9
10#define E500_PM_PH10	1
11#define E500_PM_PH15	2
12#define E500_PM_PH20	3
13#define E500_PM_PH30	4
14#define E500_PM_DOZE	E500_PM_PH10
15#define E500_PM_NAP	E500_PM_PH15
16
17#define PLAT_PM_SLEEP	20
18#define PLAT_PM_LPM20	30
19
20#define FSL_PM_SLEEP		(1 << 0)
21#define FSL_PM_DEEP_SLEEP	(1 << 1)
22
23struct fsl_pm_ops {
24	/* mask pending interrupts to the RCPM from MPIC */
25	void (*irq_mask)(int cpu);
26
27	/* unmask pending interrupts to the RCPM from MPIC */
28	void (*irq_unmask)(int cpu);
29	void (*cpu_enter_state)(int cpu, int state);
30	void (*cpu_exit_state)(int cpu, int state);
31	void (*cpu_up_prepare)(int cpu);
32	void (*cpu_die)(int cpu);
33	int (*plat_enter_sleep)(void);
34	void (*freeze_time_base)(bool freeze);
35
36	/* keep the power of IP blocks during sleep/deep sleep */
37	void (*set_ip_power)(bool enable, u32 mask);
38
39	/* get platform supported power management modes */
40	unsigned int (*get_pm_modes)(void);
41};
42
43extern const struct fsl_pm_ops *qoriq_pm_ops;
44
45int __init fsl_rcpm_init(void);
46
47#endif /* __PPC_FSL_PM_H */
v4.10.11
 
 1/*
 2 * Support Power Management
 3 *
 4 * Copyright 2014-2015 Freescale Semiconductor Inc.
 5 *
 6 * This program is free software; you can redistribute  it and/or modify it
 7 * under  the terms of  the GNU General  Public License as published by the
 8 * Free Software Foundation;  either version 2 of the  License, or (at your
 9 * option) any later version.
10 */
11#ifndef __PPC_FSL_PM_H
12#define __PPC_FSL_PM_H
13
14#define E500_PM_PH10	1
15#define E500_PM_PH15	2
16#define E500_PM_PH20	3
17#define E500_PM_PH30	4
18#define E500_PM_DOZE	E500_PM_PH10
19#define E500_PM_NAP	E500_PM_PH15
20
21#define PLAT_PM_SLEEP	20
22#define PLAT_PM_LPM20	30
23
24#define FSL_PM_SLEEP		(1 << 0)
25#define FSL_PM_DEEP_SLEEP	(1 << 1)
26
27struct fsl_pm_ops {
28	/* mask pending interrupts to the RCPM from MPIC */
29	void (*irq_mask)(int cpu);
30
31	/* unmask pending interrupts to the RCPM from MPIC */
32	void (*irq_unmask)(int cpu);
33	void (*cpu_enter_state)(int cpu, int state);
34	void (*cpu_exit_state)(int cpu, int state);
35	void (*cpu_up_prepare)(int cpu);
36	void (*cpu_die)(int cpu);
37	int (*plat_enter_sleep)(void);
38	void (*freeze_time_base)(bool freeze);
39
40	/* keep the power of IP blocks during sleep/deep sleep */
41	void (*set_ip_power)(bool enable, u32 mask);
42
43	/* get platform supported power management modes */
44	unsigned int (*get_pm_modes)(void);
45};
46
47extern const struct fsl_pm_ops *qoriq_pm_ops;
48
49int __init fsl_rcpm_init(void);
50
51#endif /* __PPC_FSL_PM_H */