82eba12440
We remove the checks to allow the function to be used anyway. ../drivers/soc/samsung/exynos-pm/exynos-pm.c:107:10: error: declaration of 'struct wakeup_stat_name' will not be visible outside of this function [-Werror,-Wvisibility] 107 | struct wakeup_stat_name *ws_names) | ^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:114:18: error: incomplete definition of type 'struct wakeup_stat_name' 114 | name = ws_names->name[bit]; | ~~~~~~~~^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:107:10: note: forward declaration of 'struct wakeup_stat_name' 107 | struct wakeup_stat_name *ws_names) | ^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:131:25: error: no member named 'ws_names' in 'struct exynos_pm_info' 131 | if (unlikely(!pm_info->ws_names)) | ~~~~~~~ ^ ../include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:143:51: error: no member named 'ws_names' in 'struct exynos_pm_info' 143 | exynos_show_wakeup_reason_sysint(wss, &pm_info->ws_names[i]); | ~~~~~~~ ^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:465:11: error: no member named 'ws_names' in 'struct exynos_pm_info' 465 | pm_info->ws_names = kzalloc(sizeof(*pm_info->ws_names) * n, GFP_KERNEL); | ~~~~~~~ ^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:465:47: error: no member named 'ws_names' in 'struct exynos_pm_info' 465 | pm_info->ws_names = kzalloc(sizeof(*pm_info->ws_names) * n, GFP_KERNEL); | ~~~~~~~ ^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:466:16: error: no member named 'ws_names' in 'struct exynos_pm_info' 466 | if (!pm_info->ws_names) | ~~~~~~~ ^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:478:14: error: no member named 'ws_names' in 'struct exynos_pm_info' 478 | pm_info->ws_names[idx].name, size); | ~~~~~~~ ^ 8 errors generated. Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
120 lines
3.4 KiB
C
Executable file
120 lines
3.4 KiB
C
Executable file
/* linux/arm/arm/mach-exynos/include/mach/regs-clock.h
|
|
*
|
|
* Copyright (C) 2013 Samsung Electronics Co., Ltd.
|
|
* http://www.samsung.com
|
|
*
|
|
* EXYNOS5 - Header file for exynos pm support
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef __EXYNOS_PM_H
|
|
#define __EXYNOS_PM_H
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/notifier.h>
|
|
#include <linux/gpio.h>
|
|
#include <soc/samsung/cal-if.h>
|
|
#define EXYNOS_PM_PREFIX "EXYNOS-PM:"
|
|
|
|
#if defined(CONFIG_EXYNOS_FLEXPMU_DBG) || defined(CONFIG_EXYNOS_FLEXPMU_DBG_MODULE)
|
|
extern u32 acpm_get_mifdn_count(void);
|
|
extern u32 acpm_get_apsocdn_count(void);
|
|
extern u32 acpm_get_early_wakeup_count(void);
|
|
extern int acpm_get_mif_request(void);
|
|
extern u32 acpm_noti_dsu_cpd(bool is_dsu_cpd);
|
|
extern u32 acpm_get_dsu_cpd(void);
|
|
extern void exynos_flexpmu_dbg_set_sleep_req(void);
|
|
extern void exynos_flexpmu_dbg_clr_wakeup_req(void);
|
|
#else
|
|
static inline int acpm_get_mif_request(void) { return 0; }
|
|
static inline u32 acpm_get_mifdn_count(void) { return 0; }
|
|
static inline u32 acpm_get_apsocdn_count(void) { return 0; }
|
|
static inline u32 acpm_get_early_wakeup_count(void ){ return 0; }
|
|
static inline u32 acpm_noti_dsu_cpd(bool is_dsu_cpd){ return 0; }
|
|
static inline u32 acpm_get_dsu_cpd(void){ return 0; }
|
|
#endif
|
|
|
|
#ifdef CONFIG_PINCTRL_EXYNOS
|
|
extern u64 exynos_get_eint_wake_mask(void);
|
|
#else
|
|
static inline u64 exynos_get_eint_wake_mask(void) { return ULLONG_MAX; }
|
|
#endif
|
|
|
|
struct wakeup_stat_name {
|
|
const char *name[32];
|
|
};
|
|
|
|
struct exynos_pm_info {
|
|
void __iomem *eint_base; /* GPIO_ALIVE base to check wkup reason */
|
|
void __iomem *gic_base; /* GICD_ISPENDRn base to check wkup reason */
|
|
unsigned int num_eint; /* Total number of EINT sources */
|
|
unsigned int num_gic; /* Total number of GIC sources */
|
|
|
|
bool is_early_wakeup;
|
|
unsigned int suspend_mode_idx; /* power mode to be used in suspend scenario */
|
|
unsigned int apdn_cnt_prev; /* sleep apsoc down sequence prev count */
|
|
unsigned int apdn_cnt; /* sleep apsoc down sequence count */
|
|
|
|
unsigned int num_wakeup_stat; /* Total number of wakeup_stat */
|
|
unsigned int *wakeup_stat_offset;
|
|
|
|
unsigned int num_wakeup_int_en;
|
|
unsigned int wakeup_stat_eint;
|
|
unsigned int wakeup_stat_rtc;
|
|
unsigned int *wakeup_int_en_offset;
|
|
unsigned int *wakeup_int_en;
|
|
unsigned int *usbl2_wakeup_int_en;
|
|
|
|
unsigned int num_eint_wakeup_mask;
|
|
unsigned int *eint_wakeup_mask_offset;
|
|
|
|
void __iomem *vgpio2pmu_base; /* SYSREG_VGPIO2PMU base */
|
|
unsigned int vgpio_inten_offset;
|
|
unsigned int vgpio_wakeup_inten;
|
|
|
|
struct wakeup_source *ws;
|
|
bool is_stay_awake;
|
|
|
|
bool is_pcieon_suspend;
|
|
unsigned int pcieon_suspend_available;
|
|
unsigned int pcieon_suspend_mode_idx; /* power mode to be used in suspend scenario */
|
|
u32 (*pcie_is_connect)(void);
|
|
|
|
u8 num_dbg_subsystem;
|
|
const char **dbg_subsystem_name;
|
|
u32 *dbg_subsystem_offset;
|
|
struct wakeup_stat_name *ws_names; /* Names of each bits of wakeup_stat */
|
|
};
|
|
|
|
struct exynos_pm_dbg {
|
|
u32 test_early_wakeup;
|
|
|
|
unsigned int mifdn_early_wakeup_prev;
|
|
unsigned int mifdn_early_wakeup_cnt;
|
|
unsigned int mifdn_cnt_prev;
|
|
unsigned int mifdn_cnt;
|
|
unsigned int mif_req;
|
|
};
|
|
|
|
int register_pcie_is_connect(u32 (*func)(void));
|
|
|
|
#if IS_ENABLED(CONFIG_SEC_DEBUG)
|
|
enum ids_info {
|
|
tg,
|
|
lg,
|
|
mg,
|
|
bg,
|
|
g3dg,
|
|
mifg,
|
|
lids,
|
|
mids,
|
|
bids,
|
|
gids,
|
|
};
|
|
|
|
extern int asv_ids_information(enum ids_info id);
|
|
#endif
|
|
#endif /* __EXYNOS_PM_H */
|