Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
42 lines
992 B
C
42 lines
992 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (c) 2019 MediaTek Inc.
|
|
*/
|
|
|
|
#ifndef __MTK_LPM_PLATFORM_H__
|
|
#define __MTK_LPM_PLATFORM_H__
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/kernel.h>
|
|
|
|
enum MT_LPM_PLAT_TRACE_TYPE {
|
|
MT_LPM_PLAT_TRACE_SYSRAM,
|
|
};
|
|
|
|
struct MTK_LPM_PLAT_TRACE {
|
|
size_t (*read)(unsigned long offset, void *buf, size_t sz);
|
|
size_t (*write)(unsigned long offset, const void *buf, size_t sz);
|
|
};
|
|
|
|
/* NOTICE - this enum must synchronize with kernel site */
|
|
enum MT_PLAT_DRAM_TYPE {
|
|
SPMFW_LP4_2CH_3200 = 0,
|
|
SPMFW_LP4X_2CH_3600,
|
|
SPMFW_LP3_1CH_1866,
|
|
SPMFW_TYPE_NOT_FOUND,
|
|
};
|
|
|
|
struct mtk_lpm_irqremain {
|
|
size_t count;
|
|
unsigned int *irqs;
|
|
unsigned int *wakeup_src_cat;
|
|
unsigned int *wakeup_src;
|
|
};
|
|
|
|
extern int mtk_lpm_irqremain_get(struct mtk_lpm_irqremain **irqs);
|
|
extern void mtk_lpm_irqremain_put(struct mtk_lpm_irqremain *irqs);
|
|
extern void mtk_lpm_irqremain_list_release(void);
|
|
|
|
int mtk_lpm_platform_trace_get(int type, struct MTK_LPM_PLAT_TRACE *trace);
|
|
#endif
|