/* SPDX-License-Identifier: GPL-2.0-only */1/*2* TI DaVinci platform support for power management.3*4* Copyright (C) 2009 Texas Instruments, Inc. https://www.ti.com/5*/6#ifndef _MACH_DAVINCI_PM_H7#define _MACH_DAVINCI_PM_H89/*10* Caution: Assembly code in sleep.S makes assumtion on the order11* of the members of this structure.12*/13struct davinci_pm_config {14void __iomem *ddr2_ctlr_base;15void __iomem *ddrpsc_reg_base;16int ddrpsc_num;17void __iomem *ddrpll_reg_base;18void __iomem *deepsleep_reg;19void __iomem *cpupll_reg_base;20/*21* Note on SLEEPCOUNT:22* The SLEEPCOUNT feature is mainly intended for cases in which23* the internal oscillator is used. The internal oscillator is24* fully disabled in deep sleep mode. When you exist deep sleep25* mode, the oscillator will be turned on and will generate very26* small oscillations which will not be detected by the deep sleep27* counter. Eventually those oscillations will grow to an amplitude28* large enough to start incrementing the deep sleep counter.29* In this case recommendation from hardware engineers is that the30* SLEEPCOUNT be set to 4096. This means that 4096 valid clock cycles31* must be detected before the clock is passed to the rest of the32* system.33* In the case that the internal oscillator is not used and the34* clock is generated externally, the SLEEPCOUNT value can be very35* small since the clock input is assumed to be stable before SoC36* is taken out of deepsleep mode. A value of 128 would be more than37* adequate.38*/39int sleepcount;40};4142extern unsigned int davinci_cpu_suspend_sz;43extern void davinci_cpu_suspend(struct davinci_pm_config *);4445#endif464748