From 30ccd116f5092d2a4604ab815d5ce46aef33ca5a Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Thu, 9 Feb 2017 16:59:59 +0100 Subject: [PATCH] initscripts: add script to enable CAAM JS0 wakeup According to NXP i.MX Linux Reference Manual: The full CAAM function is exclusive with the Mega/Fast mix off feature in DSM. If CAAM is enabled, the Mega/Fast mix off feature needs to be disabled, and the user should "echo enabled > /sys/bus/platform/devices/2100000.aips-bus/2100000.caam/2101000.jr0/power/wakeup" after the kernel boots up, and then Mega/Fast mix will keep the power on in DSM. Signed-off-by: Hector Palacios https://jira.digi.com/browse/DEL-3636 --- .../initscripts/initscripts-1.0/caam_jr0_wakeup.sh | 10 ++++++++++ .../recipes-core/initscripts/initscripts_1.0.bbappend | 11 ++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 meta-digi-dey/recipes-core/initscripts/initscripts-1.0/caam_jr0_wakeup.sh diff --git a/meta-digi-dey/recipes-core/initscripts/initscripts-1.0/caam_jr0_wakeup.sh b/meta-digi-dey/recipes-core/initscripts/initscripts-1.0/caam_jr0_wakeup.sh new file mode 100644 index 000000000..380a98e66 --- /dev/null +++ b/meta-digi-dey/recipes-core/initscripts/initscripts-1.0/caam_jr0_wakeup.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# The full CAAM function is exclusive with the Mega/Fast mix off feature in DSM. +# If CAAM is enabled, the Mega/Fast mix off feature needs to be disabled, and +# the user should enable CAAM jr0 as a wakeup source after the kernel boots up, +# and then Mega/Fast mix will keep the power on in DSM. +JR0_WAKEUP="/sys/bus/platform/devices/2100000.aips-bus/2140000.caam/2141000.jr0/power/wakeup" +if [ -f "${JR0_WAKEUP}" ]; then + echo "enabled" > "${JR0_WAKEUP}" +fi diff --git a/meta-digi-dey/recipes-core/initscripts/initscripts_1.0.bbappend b/meta-digi-dey/recipes-core/initscripts/initscripts_1.0.bbappend index 91197617c..d803b5e8e 100644 --- a/meta-digi-dey/recipes-core/initscripts/initscripts_1.0.bbappend +++ b/meta-digi-dey/recipes-core/initscripts/initscripts_1.0.bbappend @@ -1,12 +1,21 @@ -# Copyright (C) 2013 Digi International. +# Copyright (C) 2013-2017 Digi International. FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:" SRC_URI += "file://device_table.txt \ file://devtmpfs.sh" +SRC_URI_append_ccimx6ul = " file://caam_jr0_wakeup.sh" + do_install_append() { install -m 755 ${WORKDIR}/devtmpfs.sh ${D}${sysconfdir}/init.d/devtmpfs.sh update-rc.d -r ${D} devtmpfs.sh start 03 S . install -m 0755 ${WORKDIR}/device_table.txt ${D}${sysconfdir}/device_table } + +do_install_append_ccimx6ul() { + install -m 0755 ${WORKDIR}/caam_jr0_wakeup.sh ${D}${sysconfdir}/init.d/caam_jr0_wakeup.sh + update-rc.d -r ${D} caam_jr0_wakeup.sh start 20 S . +} + +PACKAGE_ARCH = "${MACHINE_ARCH}"