mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
fae9edad47
PD#SWPL-139455 Problem: try to replace kprobe hook in iotrace Solution: replace clk/power kprobe Verify: SC2_AH212 Change-Id: Id53c97a5d0679c118625670a5216ae54e0567aec Signed-off-by: song.han <song.han@amlogic.com>
40 lines
1.0 KiB
C
40 lines
1.0 KiB
C
/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
|
|
/*
|
|
* Copyright (c) 2019 Amlogic, Inc. All rights reserved.
|
|
*/
|
|
|
|
#include <linux/pm_domain.h>
|
|
|
|
#define PWR_ON 1
|
|
#define PWR_OFF 0
|
|
#define DOMAIN_INIT_ON 0
|
|
#define DOMAIN_INIT_OFF 1
|
|
#define POWER_CTRL_IRQ_SET 0x82000094
|
|
|
|
/*
|
|
*GENPD_FLAG_IGNORE_UNUSED
|
|
*
|
|
*Do not power off when unused
|
|
*Continuous flag to control the behaviour of a genpd in framework
|
|
*/
|
|
#define GENPD_FLAG_IGNORE_UNUSED BIT(7)
|
|
|
|
extern int bypass_power_off;
|
|
|
|
int get_max_id(void);
|
|
unsigned long pwr_ctrl_psci_smc(int power_domain, bool power_control);
|
|
unsigned long pwr_ctrl_status_psci_smc(int power_domain);
|
|
unsigned long vpu_mempd_psci_smc(int mempd_id, bool power_control);
|
|
|
|
/*
|
|
*irq:irq number for wakeup pwrctrl
|
|
*irq_mask:irq mask,1:enable,0:mask
|
|
*irq_invert:1:invert irq level,0:do not
|
|
*/
|
|
unsigned long pwr_ctrl_irq_set(u64 irq, u64 irq_mask, u64 irq_invert);
|
|
|
|
void pd_dev_create_file(struct device *dev, int cnt_start, int cnt_end,
|
|
struct generic_pm_domain **domains);
|
|
void pd_dev_remove_file(struct device *dev);
|
|
|