Thomas Gleixner | 2874c5f | 2019-05-27 08:55:01 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Daniel Lezcano | fa50ae9 | 2012-01-25 00:56:06 +0100 | [diff] [blame] | 2 | /* |
| 3 | * AT91 Power Management |
| 4 | * |
| 5 | * Copyright (C) 2005 David Brownell |
Daniel Lezcano | fa50ae9 | 2012-01-25 00:56:06 +0100 | [diff] [blame] | 6 | */ |
| 7 | #ifndef __ARCH_ARM_MACH_AT91_PM |
| 8 | #define __ARCH_ARM_MACH_AT91_PM |
| 9 | |
Daniel Lezcano | 5ad945e | 2013-09-22 22:29:57 +0200 | [diff] [blame] | 10 | #include <asm/proc-fns.h> |
| 11 | |
Alexandre Belloni | 09099f1 | 2015-03-16 15:13:39 +0100 | [diff] [blame] | 12 | #include <linux/mfd/syscon/atmel-mc.h> |
| 13 | #include <soc/at91/at91sam9_ddrsdr.h> |
| 14 | #include <soc/at91/at91sam9_sdramc.h> |
| 15 | |
Alexandre Belloni | 2e57dc0 | 2015-03-16 23:44:38 +0100 | [diff] [blame] | 16 | #define AT91_MEMCTRL_MC 0 |
| 17 | #define AT91_MEMCTRL_SDRAMC 1 |
| 18 | #define AT91_MEMCTRL_DDRSDR 2 |
| 19 | |
Claudiu Beznea | 514e2a2 | 2018-07-17 11:26:54 +0300 | [diff] [blame] | 20 | #define AT91_PM_STANDBY 0x00 |
| 21 | #define AT91_PM_ULP0 0x01 |
Claudiu Beznea | e70bfc2 | 2020-08-05 11:36:48 +0300 | [diff] [blame] | 22 | #define AT91_PM_ULP0_FAST 0x02 |
| 23 | #define AT91_PM_ULP1 0x03 |
| 24 | #define AT91_PM_BACKUP 0x04 |
Wenyou Yang | 23be4be | 2015-03-09 11:49:46 +0800 | [diff] [blame] | 25 | |
Alexandre Belloni | 65cc1a5 | 2017-01-31 18:12:57 +0100 | [diff] [blame] | 26 | #ifndef __ASSEMBLY__ |
| 27 | struct at91_pm_data { |
| 28 | void __iomem *pmc; |
| 29 | void __iomem *ramc[2]; |
| 30 | unsigned long uhp_udp_mask; |
| 31 | unsigned int memctrl; |
| 32 | unsigned int mode; |
Alexandre Belloni | 24a0f5c | 2016-09-27 12:29:50 +0200 | [diff] [blame] | 33 | void __iomem *shdwc; |
| 34 | void __iomem *sfrbu; |
Alexandre Belloni | 7693e18 | 2017-04-26 16:31:03 +0200 | [diff] [blame] | 35 | unsigned int standby_mode; |
| 36 | unsigned int suspend_mode; |
Claudiu Beznea | 6ec1587 | 2020-01-20 14:10:01 +0200 | [diff] [blame] | 37 | unsigned int pmc_mckr_offset; |
Claudiu Beznea | 0be298a | 2020-01-20 14:10:04 +0200 | [diff] [blame] | 38 | unsigned int pmc_version; |
Alexandre Belloni | 65cc1a5 | 2017-01-31 18:12:57 +0100 | [diff] [blame] | 39 | }; |
| 40 | #endif |
| 41 | |
Wenyou Yang | 23be4be | 2015-03-09 11:49:46 +0800 | [diff] [blame] | 42 | #endif |