forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/arch/arm/mach-imx/common.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved.
34 */
45
5
-/*
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
9
- */
106
117 #ifndef __ASM_ARCH_MXC_COMMON_H__
128 #define __ASM_ARCH_MXC_COMMON_H__
....@@ -21,29 +17,14 @@
2117 enum mxc_cpu_pwr_mode;
2218 struct of_device_id;
2319
24
-void mx21_map_io(void);
25
-void mx27_map_io(void);
2620 void mx31_map_io(void);
2721 void mx35_map_io(void);
2822 void imx21_init_early(void);
29
-void imx27_init_early(void);
3023 void imx31_init_early(void);
3124 void imx35_init_early(void);
3225 void mxc_init_irq(void __iomem *);
33
-void mx21_init_irq(void);
34
-void mx27_init_irq(void);
3526 void mx31_init_irq(void);
3627 void mx35_init_irq(void);
37
-void imx21_soc_init(void);
38
-void imx27_soc_init(void);
39
-void imx31_soc_init(void);
40
-void imx35_soc_init(void);
41
-int mx21_clocks_init(unsigned long lref, unsigned long fref);
42
-int mx27_clocks_init(unsigned long fref);
43
-int mx31_clocks_init(unsigned long fref);
44
-int mx35_clocks_init(void);
45
-struct platform_device *mxc_register_gpio(char *name, int id,
46
- resource_size_t iobase, resource_size_t iosize, int irq, int irq_high);
4728 void mxc_set_cpu_type(unsigned int type);
4829 void mxc_restart(enum reboot_mode, const char *);
4930 void mxc_arch_reset_init(void __iomem *);
....@@ -53,7 +34,6 @@
5334 int mxc_device_init(void);
5435 void imx_set_soc_revision(unsigned int rev);
5536 void imx_init_revision_from_anatop(void);
56
-struct device *imx_soc_device_init(void);
5737 void imx6_enable_rbc(bool enable);
5838 void imx_gpc_check_dt(void);
5939 void imx_gpc_set_arm_power_in_lpm(bool power_off);
....@@ -70,6 +50,15 @@
7050 WAIT_UNCLOCKED_POWER_OFF, /* WAIT + SRPG */
7151 STOP_POWER_ON, /* just STOP */
7252 STOP_POWER_OFF, /* STOP + SRPG */
53
+};
54
+
55
+enum ulp_cpu_pwr_mode {
56
+ ULP_PM_HSRUN, /* High speed run mode */
57
+ ULP_PM_RUN, /* Run mode */
58
+ ULP_PM_WAIT, /* Wait mode */
59
+ ULP_PM_STOP, /* Stop mode */
60
+ ULP_PM_VLPS, /* Very low power stop mode */
61
+ ULP_PM_VLLS, /* very low leakage stop mode */
7362 };
7463
7564 void imx_enable_cpu(int cpu, bool enable);
....@@ -98,6 +87,7 @@
9887 void imx6_set_int_mem_clk_lpm(bool enable);
9988 void imx6sl_set_wait_clk(bool enter);
10089 int imx_mmdc_get_ddr_type(void);
90
+int imx7ulp_set_lpm(enum ulp_cpu_pwr_mode mode);
10191
10292 void imx_cpu_die(unsigned int cpu);
10393 int imx_cpu_kill(unsigned int cpu);
....@@ -120,6 +110,7 @@
120110 void imx6sl_pm_init(void);
121111 void imx6sx_pm_init(void);
122112 void imx6ul_pm_init(void);
113
+void imx7ulp_pm_init(void);
123114
124115 #ifdef CONFIG_PM
125116 void imx51_pm_init(void);