xref: /openbmc/linux/arch/arm/mach-at91/pm.h (revision 762f99f4f3cb41a775b5157dd761217beba65873)
12874c5fdSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
2fa50ae9cSDaniel Lezcano /*
3fa50ae9cSDaniel Lezcano  * AT91 Power Management
4fa50ae9cSDaniel Lezcano  *
5fa50ae9cSDaniel Lezcano  * Copyright (C) 2005 David Brownell
6fa50ae9cSDaniel Lezcano  */
7fa50ae9cSDaniel Lezcano #ifndef __ARCH_ARM_MACH_AT91_PM
8fa50ae9cSDaniel Lezcano #define __ARCH_ARM_MACH_AT91_PM
9fa50ae9cSDaniel Lezcano 
105ad945eaSDaniel Lezcano #include <asm/proc-fns.h>
115ad945eaSDaniel Lezcano 
1209099f19SAlexandre Belloni #include <linux/mfd/syscon/atmel-mc.h>
1309099f19SAlexandre Belloni #include <soc/at91/at91sam9_ddrsdr.h>
1409099f19SAlexandre Belloni #include <soc/at91/at91sam9_sdramc.h>
15f0bbf179SClaudiu Beznea #include <soc/at91/sama7-ddr.h>
16*475be50fSClaudiu Beznea #include <soc/at91/sama7-sfrbu.h>
1709099f19SAlexandre Belloni 
182e57dc08SAlexandre Belloni #define AT91_MEMCTRL_MC		0
192e57dc08SAlexandre Belloni #define AT91_MEMCTRL_SDRAMC	1
202e57dc08SAlexandre Belloni #define AT91_MEMCTRL_DDRSDR	2
212e57dc08SAlexandre Belloni 
22514e2a29SClaudiu Beznea #define	AT91_PM_STANDBY		0x00
23514e2a29SClaudiu Beznea #define AT91_PM_ULP0		0x01
24e70bfc2fSClaudiu Beznea #define AT91_PM_ULP0_FAST	0x02
25e70bfc2fSClaudiu Beznea #define AT91_PM_ULP1		0x03
26e70bfc2fSClaudiu Beznea #define	AT91_PM_BACKUP		0x04
2723be4be5SWenyou Yang 
2865cc1a59SAlexandre Belloni #ifndef __ASSEMBLY__
2965cc1a59SAlexandre Belloni struct at91_pm_data {
3065cc1a59SAlexandre Belloni 	void __iomem *pmc;
3165cc1a59SAlexandre Belloni 	void __iomem *ramc[2];
32f0bbf179SClaudiu Beznea 	void __iomem *ramc_phy;
3365cc1a59SAlexandre Belloni 	unsigned long uhp_udp_mask;
3465cc1a59SAlexandre Belloni 	unsigned int memctrl;
3565cc1a59SAlexandre Belloni 	unsigned int mode;
3624a0f5c5SAlexandre Belloni 	void __iomem *shdwc;
3724a0f5c5SAlexandre Belloni 	void __iomem *sfrbu;
387693e18eSAlexandre Belloni 	unsigned int standby_mode;
397693e18eSAlexandre Belloni 	unsigned int suspend_mode;
406ec1587bSClaudiu Beznea 	unsigned int pmc_mckr_offset;
410be298a9SClaudiu Beznea 	unsigned int pmc_version;
4265cc1a59SAlexandre Belloni };
4365cc1a59SAlexandre Belloni #endif
4465cc1a59SAlexandre Belloni 
4523be4be5SWenyou Yang #endif
46