blob: bfb260be371e2ede9ff5213fef403c9c793b0d90 [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Daniel Lezcanofa50ae92012-01-25 00:56:06 +01002/*
3 * AT91 Power Management
4 *
5 * Copyright (C) 2005 David Brownell
Daniel Lezcanofa50ae92012-01-25 00:56:06 +01006 */
7#ifndef __ARCH_ARM_MACH_AT91_PM
8#define __ARCH_ARM_MACH_AT91_PM
9
Daniel Lezcano5ad945e2013-09-22 22:29:57 +020010#include <asm/proc-fns.h>
11
Alexandre Belloni09099f12015-03-16 15:13:39 +010012#include <linux/mfd/syscon/atmel-mc.h>
13#include <soc/at91/at91sam9_ddrsdr.h>
14#include <soc/at91/at91sam9_sdramc.h>
15
Alexandre Belloni2e57dc02015-03-16 23:44:38 +010016#define AT91_MEMCTRL_MC 0
17#define AT91_MEMCTRL_SDRAMC 1
18#define AT91_MEMCTRL_DDRSDR 2
19
Claudiu Beznea514e2a22018-07-17 11:26:54 +030020#define AT91_PM_STANDBY 0x00
21#define AT91_PM_ULP0 0x01
Claudiu Bezneae70bfc22020-08-05 11:36:48 +030022#define AT91_PM_ULP0_FAST 0x02
23#define AT91_PM_ULP1 0x03
24#define AT91_PM_BACKUP 0x04
Wenyou Yang23be4be2015-03-09 11:49:46 +080025
Alexandre Belloni65cc1a52017-01-31 18:12:57 +010026#ifndef __ASSEMBLY__
27struct 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 Belloni24a0f5c2016-09-27 12:29:50 +020033 void __iomem *shdwc;
34 void __iomem *sfrbu;
Alexandre Belloni7693e182017-04-26 16:31:03 +020035 unsigned int standby_mode;
36 unsigned int suspend_mode;
Claudiu Beznea6ec15872020-01-20 14:10:01 +020037 unsigned int pmc_mckr_offset;
Claudiu Beznea0be298a2020-01-20 14:10:04 +020038 unsigned int pmc_version;
Alexandre Belloni65cc1a52017-01-31 18:12:57 +010039};
40#endif
41
Wenyou Yang23be4be2015-03-09 11:49:46 +080042#endif