~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/sh/include/asm/suspend.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _ASM_SH_SUSPEND_H
  3 #define _ASM_SH_SUSPEND_H
  4 
  5 #ifndef __ASSEMBLY__
  6 #include <linux/notifier.h>
  7 
  8 #include <asm/ptrace.h>
  9 
 10 struct swsusp_arch_regs {
 11         struct pt_regs user_regs;
 12         unsigned long bank1_regs[8];
 13 };
 14 
 15 void sh_mobile_call_standby(unsigned long mode);
 16 
 17 #ifdef CONFIG_CPU_IDLE
 18 int sh_mobile_setup_cpuidle(void);
 19 #else
 20 static inline int sh_mobile_setup_cpuidle(void) { return 0; }
 21 #endif
 22 
 23 /* notifier chains for pre/post sleep hooks */
 24 extern struct atomic_notifier_head sh_mobile_pre_sleep_notifier_list;
 25 extern struct atomic_notifier_head sh_mobile_post_sleep_notifier_list;
 26 
 27 /* priority levels for notifiers */
 28 #define SH_MOBILE_SLEEP_BOARD   0
 29 #define SH_MOBILE_SLEEP_CPU     1
 30 #define SH_MOBILE_PRE(x)        (x)
 31 #define SH_MOBILE_POST(x)       (-(x))
 32 
 33 /* board code registration function for self-refresh assembly snippets */
 34 void sh_mobile_register_self_refresh(unsigned long flags,
 35                                      void *pre_start, void *pre_end,
 36                                      void *post_start, void *post_end);
 37 
 38 /* register structure for address/data information */
 39 struct sh_sleep_regs {
 40         unsigned long stbcr;
 41         unsigned long bar;
 42 
 43         /* MMU */
 44         unsigned long pteh;
 45         unsigned long ptel;
 46         unsigned long ttb;
 47         unsigned long tea;
 48         unsigned long mmucr;
 49         unsigned long ptea;
 50         unsigned long pascr;
 51         unsigned long irmcr;
 52 
 53         /* Cache */
 54         unsigned long ccr;
 55         unsigned long ramcr;
 56 };
 57 
 58 /* data area for low-level sleep code */
 59 struct sh_sleep_data {
 60         /* current sleep mode (SUSP_SH_...) */
 61         unsigned long mode;
 62 
 63         /* addresses of board specific self-refresh snippets */
 64         unsigned long sf_pre;
 65         unsigned long sf_post;
 66 
 67         /* address of resume code */
 68         unsigned long resume;
 69 
 70         /* register state saved and restored by the assembly code */
 71         unsigned long vbr;
 72         unsigned long spc;
 73         unsigned long sr;
 74         unsigned long sp;
 75 
 76         /* structure for keeping register addresses */
 77         struct sh_sleep_regs addr;
 78 
 79         /* structure for saving/restoring register state */
 80         struct sh_sleep_regs data;
 81 };
 82 
 83 /* a bitmap of supported sleep modes (SUSP_SH..) */
 84 extern unsigned long sh_mobile_sleep_supported;
 85 
 86 #endif
 87 
 88 /* flags passed to assembly suspend code */
 89 #define SUSP_SH_SLEEP           (1 << 0) /* Regular sleep mode */
 90 #define SUSP_SH_STANDBY         (1 << 1) /* SH-Mobile Software standby mode */
 91 #define SUSP_SH_RSTANDBY        (1 << 2) /* SH-Mobile R-standby mode */
 92 #define SUSP_SH_USTANDBY        (1 << 3) /* SH-Mobile U-standby mode */
 93 #define SUSP_SH_SF              (1 << 4) /* Enable self-refresh */
 94 #define SUSP_SH_MMU             (1 << 5) /* Save/restore MMU and cache */
 95 #define SUSP_SH_REGS            (1 << 6) /* Save/restore registers */
 96 
 97 #endif /* _ASM_SH_SUSPEND_H */
 98 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php