aboutsummaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3/include
diff options
context:
space:
mode:
authorKhang Nguyen <khang.nguyen.xv@rvc.renesas.com>2018-03-15 18:00:59 +0700
committerKhang Nguyen <khang.nguyen.xv@rvc.renesas.com>2018-03-22 13:36:54 +0700
commite05044a3d4004a7a3834fa3754a01bb9f5d4c615 (patch)
tree991eea81df57327a30f666749e5ee26be332367d /meta-rcar-gen3/include
parent7276dbc4e6a1d9199dbade162cb1d144bf5cd4f4 (diff)
rcar-gen3: linux-renesas: Ensure only build CAS with H3 or M3 SoC
CAS only supports H3 (SoC: r8a7795), M3 (SoC: r8a7796). This commit adds a python function to disable CAS automatically and show the warning message as below in case of wrong setup. | WARNING: linux-renesas-4.14.0+gitAUTOINC+4a7e26bdbc-r1 do_cas_checking: | CAS only supports H3 (SoC: r8a7795), M3 (SoC: r8a7796), this feature will be disabled automatically Signed-off-by: Khang Nguyen <khang.nguyen.xv@rvc.renesas.com> Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com>
Diffstat (limited to 'meta-rcar-gen3/include')
-rw-r--r--meta-rcar-gen3/include/cas-control.inc17
1 files changed, 17 insertions, 0 deletions
diff --git a/meta-rcar-gen3/include/cas-control.inc b/meta-rcar-gen3/include/cas-control.inc
new file mode 100644
index 0000000..18ccc74
--- /dev/null
+++ b/meta-rcar-gen3/include/cas-control.inc
@@ -0,0 +1,17 @@
+SOC="${@d.getVar('SOC_FAMILY').split(':')[1]}"
+CAS="${@'1' if 'cas' in '${MACHINE_FEATURES}' else '0'}"
+
+# USE_CAS for H3 (SoC: r8a7795) or M3 (SoC: r8a7796)
+USE_CAS="${@'1' if '${CAS}' == '1' and ('${SOC}' == 'r8a7795' or '${SOC}' == 'r8a7796') else '0'}"
+
+# Trap incorrect CAS setting for M3N/E3
+WARN="${@'1' if '${CAS}' == '1' and '${USE_CAS}' == '0' else '0'}"
+
+# This function is to show a warning message when enabling CAS feature on M3N/E3
+python do_cas_checking() {
+ warn=d.getVar('WARN')
+ if warn == "1" :
+ bb.warn("CAS only supports H3 (SoC: r8a7795), M3 (SoC: r8a7796), this feature will be disabled automatically")
+}
+
+addtask cas_checking before do_configure after do_patch