Veyron: Add rockchip to SoC family
Some tests such as graphics_KernelMemory read SoC name and Gpu family from
/proc/cpuinfo.
BUG=chrome-os-partner:32298
TEST=graphics_KernelMemory pass on pinky board
Change-Id: If2a71661819b7e13170678537f3d62d150481a5c
Signed-off-by: ZhengShunQian <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/219678
Reviewed-by: Xu Jianqun <[email protected]>
Reviewed-by: Ilja Friedel <[email protected]>
diff --git a/client/bin/base_utils.py b/client/bin/base_utils.py
index 9097573..207a6f9 100644
--- a/client/bin/base_utils.py
+++ b/client/bin/base_utils.py
@@ -319,6 +319,8 @@
return 'exynos5'
elif list_grep(cpuinfo, 'Tegra'):
return 'tegra'
+ elif list_grep(cpuinfo, 'Rockchip'):
+ return 'rockchip'
return 'arm'
def get_cpu_soc_family():
diff --git a/client/bin/site_utils.py b/client/bin/site_utils.py
index 56fcd39..befb385 100644
--- a/client/bin/site_utils.py
+++ b/client/bin/site_utils.py
@@ -892,7 +892,7 @@
def get_gpu_family():
"""Return the GPU family name"""
cpuarch = base_utils.get_cpu_soc_family()
- if cpuarch == 'exynos5':
+ if cpuarch == 'exynos5' or cpuarch == 'rockchip':
return 'mali'
if cpuarch == 'tegra':
return 'tegra'
diff --git a/client/cros/graphics/graphics_utils.py b/client/cros/graphics/graphics_utils.py
index 0298f6b..d3a697d 100644
--- a/client/cros/graphics/graphics_utils.py
+++ b/client/cros/graphics/graphics_utils.py
@@ -402,6 +402,9 @@
'memory' : ['/sys/class/misc/mali0/device/memory',
'/sys/class/misc/mali0/device/gpu_memory'],
}
+ # TODO Add memory nodes once the GPU patches landed.
+ rockchip_fields = {
+ }
tegra_fields = {
'memory': ['/sys/kernel/debug/memblock/memory'],
}
@@ -412,6 +415,7 @@
arch_fields = {
'exynos5' : exynos_fields,
'tegra' : tegra_fields,
+ 'rockchip': rockchip_fields,
'i386' : x86_fields,
'x86_64' : x86_fields,
}