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)
69 lines
1.7 KiB
C
69 lines
1.7 KiB
C
/*
|
|
* Copyright (C) 2015 MediaTek Inc.
|
|
*
|
|
* 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.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#ifndef __DRV_CLK_MT6765_PG_H
|
|
#define __DRV_CLK_MT6765_PG_H
|
|
|
|
enum subsys_id {
|
|
SYS_MD1 = 0,
|
|
SYS_CONN = 1,
|
|
SYS_DPY = 2,
|
|
SYS_DIS = 3,
|
|
SYS_MFG = 4,
|
|
SYS_ISP = 5,
|
|
SYS_IFR = 6,
|
|
SYS_MFG_CORE0 = 7,
|
|
SYS_MFG_ASYNC = 8,
|
|
SYS_CAM = 9,
|
|
SYS_VCODEC = 10,
|
|
NR_SYSS = 11,
|
|
};
|
|
|
|
enum mtcmos_op {
|
|
MTCMOS_BUS_PROT = 0,
|
|
MTCMOS_PWR = 1,
|
|
};
|
|
|
|
struct pg_callbacks {
|
|
struct list_head list;
|
|
void (*before_off)(enum subsys_id sys);
|
|
void (*after_on)(enum subsys_id sys);
|
|
void (*debug_dump)(enum subsys_id sys);
|
|
};
|
|
|
|
/* register new pg_callbacks and return previous pg_callbacks. */
|
|
extern struct pg_callbacks *register_pg_callback(struct pg_callbacks *pgcb);
|
|
extern int spm_topaxi_protect(unsigned int mask_value, int en);
|
|
|
|
#if 0
|
|
extern void switch_mfg_clk(int src);
|
|
#endif
|
|
extern void subsys_if_on(void);
|
|
extern void mtcmos_force_off(void);
|
|
|
|
/*new arch*/
|
|
extern void check_ven_clk_sts(void);
|
|
extern void set_ven_bus_protect(void);
|
|
extern void mm_clk_restore(void);
|
|
extern void mfg_sts_check(void);
|
|
extern void ven_clk_check(void);
|
|
extern unsigned int mt_get_ckgen_freq(unsigned int ID);
|
|
/*extern void aee_sram_printk(const char *fmt, ...);*/
|
|
/*ram console api*/
|
|
#ifdef CONFIG_MTK_RAM_CONSOLE
|
|
extern void aee_rr_rec_clk(int id, u32 val);
|
|
#endif
|
|
|
|
extern void print_enabled_clks_once(void);
|
|
#endif/* __DRV_CLK_MT6758_PG_H */
|