Example #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);
}
Example #2
0
File: psci.c Project: 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;
}
Example #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);
}
Example #4
0
File: psci.c Project: 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);
}
Example #5
0
File: psci.c Project: 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);
}
Example #6
0
File: psci.c Project: 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;
}
Example #7
0
File: psci.c Project: 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);
}
Example #8
0
File: psci.c Project: 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);
}
Example #9
0
File: psci.c Project: 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);
}
Example #10
0
File: psci.c Project: 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;
}
Example #11
0
File: psci.c Project: 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);
}
Example #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;
}
Example #13
0
File: psci.c Project: 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);
}
Example #14
0
File: psci.c Project: 020gzh/linux
static void psci_sys_poweroff(void)
{
	invoke_psci_fn(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0);
}
Example #15
0
File: psci.c Project: 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);
}
Example #16
0
File: psci.c Project: 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);
}
Example #17
0
File: psci.c Project: 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);
}
Example #18
0
File: psci.c Project: 020gzh/linux
static int psci_migrate_info_type(void)
{
	return invoke_psci_fn(PSCI_0_2_FN_MIGRATE_INFO_TYPE, 0, 0, 0);
}
Example #19
0
File: psci.c Project: 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);
}
Example #20
0
File: psci.c Project: 020gzh/linux
static u32 psci_get_version(void)
{
	return invoke_psci_fn(PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0);
}