示例#1
0
static int psci_cpu_on(unsigned long cpuid, unsigned long entry_point)
{
	int err;
	u32 fn;

	fn = psci_function_id[PSCI_FN_CPU_ON];
#ifdef CONFIG_MTK_FIQ_CACHE
	do {
		err = invoke_psci_fn(fn, cpuid, entry_point, 0);
	} while (err);
#else
	err = invoke_psci_fn(fn, cpuid, entry_point, 0);
#endif
	return psci_to_linux_errno(err);
}
示例#2
0
文件: psci.c 项目: 01org/prd
static int psci_get_version(void)
{
	int err;

	err = invoke_psci_fn(PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0);
	return err;
}
示例#3
0
static int psci_cpu_off(struct psci_power_state state)
{
	int err;
	u32 fn, power_state;

	fn = psci_function_id[PSCI_FN_CPU_OFF];
	power_state = psci_power_state_pack(state);
#ifdef CONFIG_MTK_FIQ_CACHE
	do {
		err = invoke_psci_fn(fn, power_state, 0, 0);
	} while (err);
#else
	err = invoke_psci_fn(fn, power_state, 0, 0);
#endif
	return psci_to_linux_errno(err);
}
示例#4
0
文件: psci.c 项目: 020gzh/linux
static int psci_cpu_suspend(u32 state, unsigned long entry_point)
{
	int err;
	u32 fn;

	fn = psci_function_id[PSCI_FN_CPU_SUSPEND];
	err = invoke_psci_fn(fn, state, entry_point, 0);
	return psci_to_linux_errno(err);
}
示例#5
0
文件: psci.c 项目: 020gzh/linux
static int psci_migrate(unsigned long cpuid)
{
	int err;
	u32 fn;

	fn = psci_function_id[PSCI_FN_MIGRATE];
	err = invoke_psci_fn(fn, cpuid, 0, 0);
	return psci_to_linux_errno(err);
}
示例#6
0
文件: psci.c 项目: 01org/prd
static int psci_migrate_info_type(void)
{
	int err;
	u32 fn;

	fn = psci_function_id[PSCI_FN_MIGRATE_INFO_TYPE];
	err = invoke_psci_fn(fn, 0, 0, 0);
	return err;
}
示例#7
0
文件: psci.c 项目: 020gzh/linux
static int psci_cpu_on(unsigned long cpuid, unsigned long entry_point)
{
	int err;
	u32 fn;

	fn = psci_function_id[PSCI_FN_CPU_ON];
	err = invoke_psci_fn(fn, cpuid, entry_point, 0);
	return psci_to_linux_errno(err);
}
示例#8
0
文件: psci.c 项目: 020gzh/linux
static int psci_cpu_off(u32 state)
{
	int err;
	u32 fn;

	fn = psci_function_id[PSCI_FN_CPU_OFF];
	err = invoke_psci_fn(fn, state, 0, 0);
	return psci_to_linux_errno(err);
}
示例#9
0
文件: psci.c 项目: 01org/prd
static int psci_cpu_off(struct psci_power_state state)
{
	int err;
	u32 fn, power_state;

	fn = psci_function_id[PSCI_FN_CPU_OFF];
	power_state = psci_power_state_pack(state);
	err = invoke_psci_fn(fn, power_state, 0, 0);
	return psci_to_linux_errno(err);
}
示例#10
0
文件: psci.c 项目: 01org/prd
static int psci_affinity_info(unsigned long target_affinity,
		unsigned long lowest_affinity_level)
{
	int err;
	u32 fn;

	fn = psci_function_id[PSCI_FN_AFFINITY_INFO];
	err = invoke_psci_fn(fn, target_affinity, lowest_affinity_level, 0);
	return err;
}
示例#11
0
文件: psci.c 项目: 01org/prd
static int psci_cpu_suspend(struct psci_power_state state,
			    unsigned long entry_point)
{
	int err;
	u32 fn, power_state;

	fn = psci_function_id[PSCI_FN_CPU_SUSPEND];
	power_state = psci_power_state_pack(state);
	err = invoke_psci_fn(fn, power_state, entry_point, 0);
	return psci_to_linux_errno(err);
}
示例#12
0
static int psci_sysreset_request(struct udevice *dev, enum sysreset_t type)
{
	unsigned long function_id;

	switch (type) {
	case SYSRESET_WARM:
	case SYSRESET_COLD:
		function_id = PSCI_0_2_FN_SYSTEM_RESET;
		break;
	case SYSRESET_POWER:
		function_id = PSCI_0_2_FN_SYSTEM_OFF;
		break;
	default:
		return -ENOSYS;
	}

	invoke_psci_fn(function_id, 0, 0, 0);

	return -EINPROGRESS;
}
示例#13
0
文件: psci.c 项目: 020gzh/linux
static int psci_system_suspend(unsigned long unused)
{
	return invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND),
			      virt_to_phys(cpu_resume), 0, 0);
}
示例#14
0
文件: psci.c 项目: 020gzh/linux
static void psci_sys_poweroff(void)
{
	invoke_psci_fn(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0);
}
示例#15
0
文件: psci.c 项目: 020gzh/linux
static int __init psci_features(u32 psci_func_id)
{
	return invoke_psci_fn(PSCI_1_0_FN_PSCI_FEATURES,
			      psci_func_id, 0, 0);
}
示例#16
0
文件: psci.c 项目: 020gzh/linux
static void psci_sys_reset(enum reboot_mode reboot_mode, const char *cmd)
{
	invoke_psci_fn(PSCI_0_2_FN_SYSTEM_RESET, 0, 0, 0);
}
示例#17
0
文件: psci.c 项目: 020gzh/linux
static unsigned long psci_migrate_info_up_cpu(void)
{
	return invoke_psci_fn(PSCI_FN_NATIVE(0_2, MIGRATE_INFO_UP_CPU),
			      0, 0, 0);
}
示例#18
0
文件: psci.c 项目: 020gzh/linux
static int psci_migrate_info_type(void)
{
	return invoke_psci_fn(PSCI_0_2_FN_MIGRATE_INFO_TYPE, 0, 0, 0);
}
示例#19
0
文件: psci.c 项目: 020gzh/linux
static int psci_affinity_info(unsigned long target_affinity,
		unsigned long lowest_affinity_level)
{
	return invoke_psci_fn(PSCI_FN_NATIVE(0_2, AFFINITY_INFO),
			      target_affinity, lowest_affinity_level, 0);
}
示例#20
0
文件: psci.c 项目: 020gzh/linux
static u32 psci_get_version(void)
{
	return invoke_psci_fn(PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0);
}