#include <linux/amlogic/tee.h>
#include <linux/delay.h>
#include <linux/amlogic/cpu_version.h>
+#include <asm/cputype.h>
#define DRIVER_NAME "tee_info"
#define DRIVER_DESC "Amlogic tee driver"
if (get_meson_cpu_version(MESON_CPU_VERSION_LVL_MAJOR)
== MESON_CPU_MAJOR_ID_G12B) {
set_cpus_allowed_ptr(current, cpumask_of(0));
- __asm__ volatile("mrs %0, mpidr_el1":"=r"(cpu));
+ cpu = read_cpuid_mpidr();
cpu &= 0xfff;
if (cpu != 0x0)
usleep_range(10, 20);
if (get_meson_cpu_version(MESON_CPU_VERSION_LVL_MAJOR)
== MESON_CPU_MAJOR_ID_G12B) {
set_cpus_allowed_ptr(current, cpumask_of(0));
- __asm__ volatile("mrs %0, mpidr_el1":"=r"(cpu));
+ cpu = read_cpuid_mpidr();
cpu &= 0xfff;
if (cpu != 0x0)
usleep_range(10, 20);
if (get_meson_cpu_version(MESON_CPU_VERSION_LVL_MAJOR)
== MESON_CPU_MAJOR_ID_G12B) {
set_cpus_allowed_ptr(current, cpumask_of(0));
- __asm__ volatile("mrs %0, mpidr_el1":"=r"(cpu));
+ cpu = read_cpuid_mpidr();
cpu &= 0xfff;
if (cpu != 0x0)
usleep_range(10, 20);
if (get_meson_cpu_version(MESON_CPU_VERSION_LVL_MAJOR)
== MESON_CPU_MAJOR_ID_G12B) {
set_cpus_allowed_ptr(current, cpumask_of(0));
- __asm__ volatile("mrs %0, mpidr_el1":"=r"(cpu));
+ cpu = read_cpuid_mpidr();
cpu &= 0xfff;
if (cpu != 0x0)
usleep_range(10, 20);