summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.gitlab-ci.d/check-patch.py56
-rw-r--r--.gitlab-ci.yml87
-rw-r--r--Documentation/process/coding-style.rst23
-rw-r--r--arch/arm/boot/dts/imx6qdl-apalis.dtsi1
-rw-r--r--arch/arm/boot/dts/imx6qdl-colibri.dtsi10
-rw-r--r--arch/arm/boot/dts/imx7-colibri.dtsi24
-rw-r--r--arch/arm/boot/dts/imx7d-colibri-aster.dts20
-rw-r--r--arch/arm/boot/dts/imx7d-colibri-emmc.dtsi20
-rw-r--r--arch/arm/boot/dts/imx7d-colibri-eval-v3.dts24
-rw-r--r--arch/arm/boot/dts/imx7s-colibri-aster.dts20
-rw-r--r--arch/arm/boot/dts/imx7s-colibri-eval-v3.dts28
-rw-r--r--arch/arm/configs/toradex-imx_v6_v7_defconfig19
-rw-r--r--arch/arm/mach-imx/pm-imx6.c44
-rwxr-xr-xscripts/checkpatch.pl38
14 files changed, 322 insertions, 92 deletions
diff --git a/.gitlab-ci.d/check-patch.py b/.gitlab-ci.d/check-patch.py
new file mode 100755
index 000000000000..38c54d93751d
--- /dev/null
+++ b/.gitlab-ci.d/check-patch.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python3
+#
+# check-patch.py: run checkpatch.pl across all commits in a branch
+#
+# Copyright (C) 2020 Red Hat, Inc.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+import os
+import os.path
+import sys
+import subprocess
+
+namespace = "linux-bsp"
+if len(sys.argv) >= 2:
+ namespace = sys.argv[1]
+
+cwd = os.getcwd()
+reponame = os.path.basename(cwd)
+if len(sys.argv) >= 3:
+ reponame = sys.argv[2]
+
+repourl = "https://gitlab.int.toradex.com/rd/%s/%s.git" % (namespace, reponame)
+masterbranch = "toradex_5.4.y"
+check_patch_branch = "check-patch-%d" % os.getpid()
+rc = 0
+
+# GitLab CI environment does not give us any direct info about the
+# base for the user's branch. We thus need to figure out a common
+# ancestor between the user's branch and current git master.
+subprocess.check_call(["git", "remote", "add", check_patch_branch, repourl])
+try:
+ subprocess.check_call(["git", "fetch", check_patch_branch, masterbranch],
+ stdout=subprocess.DEVNULL,
+ stderr=subprocess.DEVNULL)
+
+ ancestor = subprocess.check_output(["git", "merge-base",
+ check_patch_branch + "/" + masterbranch, "HEAD"],
+ universal_newlines=True)
+
+ ancestor = ancestor.strip()
+
+ errors = False
+
+ print("\nChecking all commits since %s...\n" % ancestor)
+
+ ret = subprocess.run(["scripts/checkpatch.pl", "-g", ancestor + "..."])
+
+ if ret.returncode != 0:
+ print(ret)
+ print(" ❌ FAIL one or more commits failed scripts/checkpatch.pl")
+ rc = 1
+finally:
+ subprocess.check_call(["git", "remote", "rm", check_patch_branch])
+
+sys.exit(rc)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 09b30433c934..fef15bf02a2b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,27 +1,23 @@
-image: $CI_IMAGE
+image: gitlab.int.toradex.com:4567/rd/linux-bsp/ci-toolchain-container:linux-toradex_aarch32_arm_builder-bb6f84e
variables:
-# uncomment for the pipeline debug purpose
+# uncomment for the pipeline debug purpose
# CI_DEBUG_TRACE: "true"
-
-# Please choose possible 32/64 builder image and appropriate compiler
- CI_IMAGE: gitlab.int.toradex.com:4567/yuiry.erofeev/linux-toradex/ci-kernel-builder:latest
- #CI_IMAGE: gitlab.int.toradex.com:4567/yuiry.erofeev/linux-toradex/ci-kernel-builder:aarch64
- #CI_IMAGE: gitlab.int.toradex.com:4567/yuiry.erofeev/linux-toradex/ci-kernel-builder:aarch64-linaro
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
-
-# Kernel Configuration Section
-# Supplementary Tool Section
- # Artifacts configuring section
+
+# Kernel Configuration Section
+# Supplementary Tool Section
+ # Artifacts configuring section
KERNEL_CONFIG_BUILD_LOG_FILE_NAME: build_config.log
KERNEL_BUILD_LOG_FILE_NAME: build.log
KERNEL_CONFIGURATION_FILE: .config
# Defining temporary build folder to do outside of the box builds. Absolute path
TEMP_BUILD_FOLDER: /builds/temp-builds
-
+
stages:
+ - check-patch
- build-product
.build_base:
@@ -30,11 +26,11 @@ stages:
GIT_STRATEGY: fetch
# we are only using 3 latest commits to speed up the fetch process, as we are running pipeline each time we do a commit or a MR https://docs.gitlab.com/ee/ci/large_repositories/index.html#shallow-cloning
GIT_DEPTH: "3"
-# To run just on merge request
+# To run just on merge request
# only:
# - merge_requests
# when: manual
- script: |
+ script: |
#set -o xtrace
cd $CI_PROJECT_DIR
echo -e "Compiler used to build binaries is"
@@ -42,18 +38,19 @@ stages:
${CROSS_COMPILE}gcc --version
echo -e "Arch is \e[36m$ARCH\e[39m"
THREADS=$(grep processor /proc/cpuinfo -c)
- # due to specific of the kernel build we need to use the latest configuration from the nightly builds. We are getting $Version dynamically , as a variable , based on parsing URL page with Nightly builds ID
- rm -f index.html
- wget http://artifactory-horw.int.toradex.com/artifactory/list/torizoncore-oe-prerelease-horw/dunfell-5.x.y/nightly/
- version=$( cat index.html| grep ^"<a" | sed -e 's/[<>="//]/ /g' | awk '{ print $3}' | sort -nrk1,1 | head -1)
- wget http://artifactory-horw.int.toradex.com/artifactory/list/torizoncore-oe-prerelease-horw/dunfell-5.x.y/nightly/$version/$KERNEL_FILE_PATH/oedeploy/kernel-config
+ # due to specific of the kernel build we need to use the latest
+ # configuration from the nightly builds. We are getting $Version
+ # dynamically, as a variable, based on parsing URL page with
+ # Nightly builds ID
+ version=$( wget -q -O - http://artifactory-horw.int.toradex.com/artifactory/list/torizoncore-oe-prerelease-horw/dunfell-5.x.y/nightly/ | grep -E "^<a href=\"[0-9]" | sed -E 's/.*\"(.+)\/\".*/\1/' | sort -n | tail -n 1 )
+ kernel_config=$( wget -q -O - http://artifactory-horw.int.toradex.com/artifactory/list/torizoncore-oe-prerelease-horw/dunfell-5.x.y/nightly/$version/$KERNEL_FILE_PATH/oedeploy/ | grep -E "^<a href=\"kernel-config--\S+[0-9]{4,6}<" | sed -E 's/.*\"(.+)\".*/\1/' )
mkdir -p $TEMP_BUILD_FOLDER
- cp kernel-config $TEMP_BUILD_FOLDER/$KERNEL_CONFIGURATION_FILE
- #####
+ wget -O $TEMP_BUILD_FOLDER/$KERNEL_CONFIGURATION_FILE http://artifactory-horw.int.toradex.com/artifactory/list/torizoncore-oe-prerelease-horw/dunfell-5.x.y/nightly/$version/$KERNEL_FILE_PATH/oedeploy/$kernel_config
+ #####
make O=$TEMP_BUILD_FOLDER -j $THREADS 2>&1 | tee $KERNEL_BUILD_LOG_FILE_NAME
artifacts:
when: always
- name: "$CI_COMMIT_REF_NAME"
+ name: "$CI_COMMIT_REF_NAME"
paths:
- $KERNEL_BUILD_LOG_FILE_NAME
#As we do not generate config for 5.x and use generated one, we have just kernel config and kernel build log
@@ -63,10 +60,50 @@ stages:
- set -o xtrace
- rm -rf $TEMP_BUILD_FOLDER
- # If you need additional products build just copy-paste build_******_product section with new config name
+check_patch:
+ stage: check-patch
+ script: .gitlab-ci.d/check-patch.py
+ variables:
+ GIT_STRATEGY: fetch
+ GIT_DEPTH: 1000
+ allow_failure: true
+
+ # If you need additional products build just copy-paste build_******_product section with new config name
build_default_defconfig :
extends: .build_base
variables:
- # Defining the path, which we will use to take a config file to build a kernel
+ # Defining the path, which we will use to take a config file to build a kernel
KERNEL_FILE_PATH: colibri-imx7/torizon-upstream/torizon-core-docker
- stage: build-product \ No newline at end of file
+ stage: build-product
+
+build_bsp_defconfig:
+ stage: build-product
+ variables:
+ DEFCONFIG: "toradex-imx_v6_v7_defconfig"
+ # Choose max kernel size that `ubinfo /dev/ubi0_0` reports
+ MAX_KERNEL_SIZE_B: 8507392
+ GIT_STRATEGY: fetch
+ GIT_DEPTH: "1"
+ script: |
+ #set -o xtrace
+ cd $CI_PROJECT_DIR
+ echo -e "Compiler used to build binaries is"
+ which ${CROSS_COMPILE}gcc
+ ${CROSS_COMPILE}gcc --version
+ echo -e "Arch is \e[36m$ARCH\e[39m"
+ THREADS=$(grep processor /proc/cpuinfo -c)
+ make $DEFCONFIG
+ make -j $THREADS 2>&1 | tee $KERNEL_BUILD_LOG_FILE_NAME
+ KERNEL_SIZE=$(ls -la arch/arm/boot/zImage | awk '{print $5}')
+ echo "Kernel size is ${KERNEL_SIZE} bytes"
+ if [ $KERNEL_SIZE -ge $MAX_KERNEL_SIZE_B ];
+ then
+ echo "❌ Kernel exceeds the max size of ${MAX_KERNEL_SIZE_B}, failing CI pipeline";
+ exit 1
+ fi
+ artifacts:
+ when: always
+ name: "$CI_COMMIT_REF_NAME"
+ paths:
+ - $KERNEL_BUILD_LOG_FILE_NAME
+ - kernel-config
diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-style.rst
index ada573b7d703..8a3b6485b33b 100644
--- a/Documentation/process/coding-style.rst
+++ b/Documentation/process/coding-style.rst
@@ -84,15 +84,20 @@ Get a decent editor and don't leave whitespace at the end of lines.
Coding style is all about readability and maintainability using commonly
available tools.
-The limit on the length of lines is 80 columns and this is a strongly
-preferred limit.
-
-Statements longer than 80 columns will be broken into sensible chunks, unless
-exceeding 80 columns significantly increases readability and does not hide
-information. Descendants are always substantially shorter than the parent and
-are placed substantially to the right. The same applies to function headers
-with a long argument list. However, never break user-visible strings such as
-printk messages, because that breaks the ability to grep for them.
+The preferred limit on the length of a single line is 80 columns.
+
+Statements longer than 80 columns should be broken into sensible chunks,
+unless exceeding 80 columns significantly increases readability and does
+not hide information.
+
+Descendants are always substantially shorter than the parent and are
+are placed substantially to the right. A very commonly used style
+is to align descendants to a function open parenthesis.
+
+These same rules are applied to function headers with a long argument list.
+
+However, never break user-visible strings such as printk messages because
+that breaks the ability to grep for them.
3) Placing Braces and Spaces
diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
index 22525ab23669..055481c1a1ba 100644
--- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
@@ -620,6 +620,7 @@
pmic: pfuze100@8 {
compatible = "fsl,pfuze100";
reg = <0x08>;
+ fsl,pmic-stby-poweroff;
regulators {
sw1a_reg: sw1ab {
diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
index fd6009b5c2d1..efc59d2f2c10 100644
--- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
@@ -433,6 +433,7 @@
pmic: pfuze100@8 {
compatible = "fsl,pfuze100";
reg = <0x08>;
+ fsl,pmic-stby-poweroff;
regulators {
sw1a_reg: sw1ab {
@@ -862,6 +863,15 @@
>;
};
+ pinctrl_lvds_transceiver: lvds-tx {
+ fsl,pins = <
+ MX6QDL_PAD_GPIO_7__GPIO1_IO07 0x0b030 /* SODIMM 55 */
+ MX6QDL_PAD_GPIO_8__GPIO1_IO08 0x03030 /* SODIMM 63 */
+ MX6QDL_PAD_EIM_WAIT__GPIO5_IO00 0x03030 /* SODIMM 95 */
+ MX6QDL_PAD_SD2_DAT3__GPIO1_IO12 0x03030 /* SODIMM 99 */
+ >;
+ };
+
pinctrl_mic_gnd: gpiomicgnd {
fsl,pins = <
/* Controls Mic GND, PU or '1' pull Mic GND to GND */
diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi
index eb9195a92906..3767f94470ec 100644
--- a/arch/arm/boot/dts/imx7-colibri.dtsi
+++ b/arch/arm/boot/dts/imx7-colibri.dtsi
@@ -52,7 +52,7 @@
enable-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
power-supply = <&reg_module_3v3>;
pwms = <&pwm1 0 6666667 PWM_POLARITY_INVERTED>;
- status = "okay";
+ status = "disabled";
};
@@ -60,6 +60,7 @@
compatible = "panel-dpi";
backlight = <&backlight>;
power-supply = <&reg_3v3>;
+ status = "disabled";
width-mm = <115>;
height-mm = <86>;
@@ -400,7 +401,7 @@
adi,median-filter-size = /bits/ 8 <2>;
adi,averaging = /bits/ 8 <1>;
adi,conversion-interval = /bits/ 8 <255>;
- status = "okay";
+ status = "disabled";
};
pmic@33 {
@@ -492,7 +493,7 @@
interrupt-parent = <&gpio2>;
interrupts = <15 IRQ_TYPE_EDGE_FALLING>; /* SODIMM 107, INT */
reset-gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>; /* SODIMM 106, RST */
- status = "okay";
+ status = "disabled";
};
};
@@ -503,7 +504,7 @@
pinctrl-0 = <&pinctrl_lcdif_dat
&pinctrl_lcdif_ctrl>;
- status = "okay";
+ status = "disabled";
port {
lcdif_out: endpoint {
@@ -515,7 +516,6 @@
&pwm1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pwm1>;
- status = "okay";
};
&pwm2 {
@@ -599,8 +599,7 @@
&iomuxc {
pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_gpio1 &pinctrl_gpio2 &pinctrl_gpio3 &pinctrl_gpio4
- &pinctrl_gpio7>;
+ pinctrl-0 = <&pinctrl_gpio1 &pinctrl_gpio2 &pinctrl_gpio3 &pinctrl_gpio4>;
pinctrl_atmel_adapter: atmelconnectorgrp { /* ATMEL MXT TOUCH ADAPTER */
fsl,pins = <
@@ -622,8 +621,6 @@
MX7D_PAD_EPDC_DATA09__GPIO2_IO9 0x14 /* SODIMM 89 */
MX7D_PAD_EPDC_DATA08__GPIO2_IO8 0x74 /* SODIMM 91 */
MX7D_PAD_LCD_RESET__GPIO3_IO4 0x14 /* SODIMM 93 */
- MX7D_PAD_EPDC_DATA13__GPIO2_IO13 0x14 /* SODIMM 95 */
- MX7D_PAD_ENET1_RGMII_TXC__GPIO7_IO11 0x14 /* SODIMM 99 */
MX7D_PAD_EPDC_DATA10__GPIO2_IO10 0x74 /* SODIMM 105 */
MX7D_PAD_EPDC_DATA00__GPIO2_IO0 0x14 /* SODIMM 111 */
MX7D_PAD_EPDC_DATA01__GPIO2_IO1 0x14 /* SODIMM 113 */
@@ -857,6 +854,15 @@
>;
};
+ pinctrl_lvds_transceiver: lvds-tx {
+ fsl,pins = <
+ MX7D_PAD_ENET1_RGMII_RD3__GPIO7_IO3 0x74 /* SODIMM 55 */
+ MX7D_PAD_ENET1_RGMII_RD2__GPIO7_IO2 0x14 /* SODIMM 63 */
+ MX7D_PAD_EPDC_DATA13__GPIO2_IO13 0x14 /* SODIMM 95 */
+ MX7D_PAD_ENET1_RGMII_TXC__GPIO7_IO11 0x14 /* SODIMM 99 */
+ >;
+ };
+
pinctrl_pwm1: pwm1-grp {
fsl,pins = <
MX7D_PAD_GPIO1_IO08__PWM1_OUT 0x79
diff --git a/arch/arm/boot/dts/imx7d-colibri-aster.dts b/arch/arm/boot/dts/imx7d-colibri-aster.dts
index ee5c66713eb2..a1601afaa85f 100644
--- a/arch/arm/boot/dts/imx7d-colibri-aster.dts
+++ b/arch/arm/boot/dts/imx7d-colibri-aster.dts
@@ -18,6 +18,26 @@
"fsl,imx7d";
};
+&ad7879_ts {
+ status = "okay";
+};
+
+&atmel_mxt_ts {
+ status = "okay";
+};
+
+&backlight {
+ status = "okay";
+};
+
+&lcdif {
+ status = "okay";
+};
+
+&panel_dpi {
+ status = "okay";
+};
+
&usbotg2 {
vbus-supply = <&reg_usbh_vbus>;
status = "okay";
diff --git a/arch/arm/boot/dts/imx7d-colibri-emmc.dtsi b/arch/arm/boot/dts/imx7d-colibri-emmc.dtsi
index 485a03943b47..af39e5370fa1 100644
--- a/arch/arm/boot/dts/imx7d-colibri-emmc.dtsi
+++ b/arch/arm/boot/dts/imx7d-colibri-emmc.dtsi
@@ -46,23 +46,3 @@
&usdhc3 {
status = "okay";
};
-
-&ad7879_ts {
- status = "disabled";
-};
-
-&backlight {
- status = "disabled";
-};
-
-&lcdif {
- status = "disabled";
-};
-
-&pwm1 {
- status = "disabled";
-};
-
-&atmel_mxt_ts {
- status = "disabled";
-};
diff --git a/arch/arm/boot/dts/imx7d-colibri-eval-v3.dts b/arch/arm/boot/dts/imx7d-colibri-eval-v3.dts
index 080223ecc874..0644b0275b92 100644
--- a/arch/arm/boot/dts/imx7d-colibri-eval-v3.dts
+++ b/arch/arm/boot/dts/imx7d-colibri-eval-v3.dts
@@ -50,23 +50,35 @@
"fsl,imx7d";
};
-&usbotg2 {
- vbus-supply = <&reg_usbh_vbus>;
+&ad7879_ts {
status = "okay";
};
+/*
+ * The PCAP uses SODIMM 28/30, also used for PWM<B>, PWM<C>, aka pwm2, pwm3.
+ * So if you enable following PCAP controller, disable pwm2/pwm3 first.
+ */
&atmel_mxt_ts {
pinctrl-0 = <&pinctrl_atmel_adapter>;
interrupt-parent = <&gpio1>;
interrupts = <9 IRQ_TYPE_EDGE_FALLING>; /* SODIMM_28, INT */
reset-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; /* SODIMM_30, RST */
+ status = "disabled";
+};
+
+&backlight {
status = "okay";
};
-&pwm2 {
- status = "disabled";
+&lcdif {
+ status = "okay";
};
-&pwm3 {
- status = "disabled";
+&panel_dpi {
+ status = "okay";
+};
+
+&usbotg2 {
+ vbus-supply = <&reg_usbh_vbus>;
+ status = "okay";
};
diff --git a/arch/arm/boot/dts/imx7s-colibri-aster.dts b/arch/arm/boot/dts/imx7s-colibri-aster.dts
index c591e5f29a9b..3ce1ffd8dfb2 100644
--- a/arch/arm/boot/dts/imx7s-colibri-aster.dts
+++ b/arch/arm/boot/dts/imx7s-colibri-aster.dts
@@ -17,3 +17,23 @@
"toradex,colibri-imx7s",
"fsl,imx7s", "fsl,imx7d";
};
+
+&ad7879_ts {
+ status = "okay";
+};
+
+&atmel_mxt_ts {
+ status = "okay";
+};
+
+&backlight {
+ status = "okay";
+};
+
+&lcdif {
+ status = "okay";
+};
+
+&panel_dpi {
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx7s-colibri-eval-v3.dts b/arch/arm/boot/dts/imx7s-colibri-eval-v3.dts
index bd2a49c1ade6..c7e988536ea3 100644
--- a/arch/arm/boot/dts/imx7s-colibri-eval-v3.dts
+++ b/arch/arm/boot/dts/imx7s-colibri-eval-v3.dts
@@ -49,3 +49,31 @@
compatible = "toradex,colibri-imx7s-eval-v3", "toradex,colibri-imx7s",
"fsl,imx7s";
};
+
+&ad7879_ts {
+ status = "okay";
+};
+
+/*
+ * The PCAP uses SODIMM 28/30, also used for PWM<B>, PWM<C>, aka pwm2, pwm3.
+ * So if you enable following PCAP controller, disable pwm2/pwm3 first.
+ */
+&atmel_mxt_ts {
+ pinctrl-0 = <&pinctrl_atmel_adapter>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <9 IRQ_TYPE_EDGE_FALLING>; /* SODIMM_28, INT */
+ reset-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; /* SODIMM_30, RST */
+ status = "disabled";
+};
+
+&backlight {
+ status = "okay";
+};
+
+&lcdif {
+ status = "okay";
+};
+
+&panel_dpi {
+ status = "okay";
+};
diff --git a/arch/arm/configs/toradex-imx_v6_v7_defconfig b/arch/arm/configs/toradex-imx_v6_v7_defconfig
index 8d6ab880d11a..00597d60860b 100644
--- a/arch/arm/configs/toradex-imx_v6_v7_defconfig
+++ b/arch/arm/configs/toradex-imx_v6_v7_defconfig
@@ -43,7 +43,6 @@ CONFIG_SOC_IMX7D=y
CONFIG_CACHE_L2X0_PMU=y
CONFIG_SMP=y
# CONFIG_ARM_CPU_TOPOLOGY is not set
-CONFIG_THUMB2_KERNEL=y
CONFIG_HIGHMEM=y
CONFIG_FORCE_MAX_ZONEORDER=14
CONFIG_SECCOMP=y
@@ -586,6 +585,8 @@ CONFIG_SENSORS_SHTC1=m
CONFIG_SENSORS_SMSC47M1=m
CONFIG_SENSORS_STTS751=m
CONFIG_SENSORS_SMM665=m
+CONFIG_THERMAL_STATISTICS=y
+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=10000
CONFIG_THERMAL_WRITABLE_TRIPS=y
CONFIG_CPU_THERMAL=y
CONFIG_IMX_THERMAL=y
@@ -840,14 +841,14 @@ CONFIG_LEDS_TRIGGER_NETDEV=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_INTF_DEV_UIE_EMUL=y
CONFIG_RTC_DRV_DS1307=y
-CONFIG_RTC_DRV_ISL1208=y
-CONFIG_RTC_DRV_PCF8523=y
-CONFIG_RTC_DRV_PCF8563=y
-CONFIG_RTC_DRV_M41T80=y
-CONFIG_RTC_DRV_DA9063=y
-CONFIG_RTC_DRV_MC13XXX=y
-CONFIG_RTC_DRV_MXC=y
-CONFIG_RTC_DRV_MXC_V2=y
+CONFIG_RTC_DRV_ISL1208=m
+CONFIG_RTC_DRV_PCF8523=m
+CONFIG_RTC_DRV_PCF8563=m
+CONFIG_RTC_DRV_M41T80=m
+CONFIG_RTC_DRV_DA9063=m
+CONFIG_RTC_DRV_MC13XXX=m
+CONFIG_RTC_DRV_MXC=m
+CONFIG_RTC_DRV_MXC_V2=m
CONFIG_RTC_DRV_SNVS=y
CONFIG_DMADEVICES=y
CONFIG_IMX_SDMA=m
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c
index baf3b47601af..c8b504458aab 100644
--- a/arch/arm/mach-imx/pm-imx6.c
+++ b/arch/arm/mach-imx/pm-imx6.c
@@ -659,14 +659,58 @@ void __init imx6_pm_ccm_init(const char *ccm_compat)
imx6_pm_stby_poweroff_probe();
}
+void imx6_stop_mode_poweroff(void)
+{
+ /* compare with imx6q_set_lpm */
+ u32 val = readl_relaxed(ccm_base + CLPCR);
+
+ val &= ~BM_CLPCR_LPM;
+ /*
+ * mask all but the currently running processor,
+ * otherwise we will not enter stop mode
+ */
+ val |= smp_processor_id() != 0 ? BM_CLPCR_MASK_CORE0_WFI : 0;
+ val |= smp_processor_id() != 1 ? BM_CLPCR_MASK_CORE1_WFI : 0;
+ val |= smp_processor_id() != 2 ? BM_CLPCR_MASK_CORE2_WFI : 0;
+ val |= smp_processor_id() != 3 ? BM_CLPCR_MASK_CORE3_WFI : 0;
+ val |= BM_CLPCR_MASK_SCU_IDLE;
+ val |= 0x2 << BP_CLPCR_LPM;
+ val |= 0x3 << BP_CLPCR_STBY_COUNT;
+ val |= BM_CLPCR_VSTBY;
+ val |= BM_CLPCR_SBYOS;
+ val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS;
+
+ imx_gpc_hwirq_unmask(0);
+ writel_relaxed(val, ccm_base + CLPCR);
+ imx_gpc_hwirq_mask(0);
+ imx_gpc_mask_all();
+ cpu_do_idle();
+}
+
void __init imx6q_pm_init(void)
{
imx6_pm_common_init(&imx6q_pm_data);
+
+ /*
+ * if no specific power off function in board file, power off system by
+ * stop mode.
+ */
+ if (!pm_power_off &&
+ of_machine_is_compatible("toradex,apalis_imx6q"))
+ pm_power_off = imx6_stop_mode_poweroff;
}
void __init imx6dl_pm_init(void)
{
imx6_pm_common_init(&imx6dl_pm_data);
+
+ /*
+ * if no specific power off function in board file, power off system by
+ * stop mode.
+ */
+ if (!pm_power_off &&
+ of_machine_is_compatible("toradex,colibri_imx6dl"))
+ pm_power_off = imx6_stop_mode_poweroff;
}
void __init imx6sl_pm_init(void)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 0c9b11420279..4aef25f1d2b5 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -51,7 +51,7 @@ my %ignore_type = ();
my @ignore = ();
my $help = 0;
my $configuration_file = ".checkpatch.conf";
-my $max_line_length = 80;
+my $max_line_length = 100;
my $ignore_perl_version = 0;
my $minimum_perl_version = 5.10.0;
my $min_conf_desc_length = 4;
@@ -64,6 +64,7 @@ my $color = "auto";
my $allow_c99_comments = 1; # Can be overridden by --ignore C99_COMMENT_TOLERANCE
# git output parsing needs US English output, so first set backtick child process LANGUAGE
my $git_command ='export LANGUAGE=en_US.UTF-8; git';
+my $tabsize = 8;
sub help {
my ($exitcode) = @_;
@@ -96,8 +97,11 @@ Options:
--types TYPE(,TYPE2...) show only these comma separated message types
--ignore TYPE(,TYPE2...) ignore various comma separated message types
--show-types show the specific message type in the output
- --max-line-length=n set the maximum line length, if exceeded, warn
+ --max-line-length=n set the maximum line length, (default $max_line_length)
+ if exceeded, warn on patches
+ requires --strict for use with --file
--min-conf-desc-length=n set the min description length, if shorter, warn
+ --tab-size=n set the number of spaces for tab (default $tabsize)
--root=PATH PATH to the kernel tree root
--no-summary suppress the per-file summary
--mailback only produce a report in case of warnings/errors
@@ -215,6 +219,7 @@ GetOptions(
'list-types!' => \$list_types,
'max-line-length=i' => \$max_line_length,
'min-conf-desc-length=i' => \$min_conf_desc_length,
+ 'tab-size=i' => \$tabsize,
'root=s' => \$root,
'summary!' => \$summary,
'mailback!' => \$mailback,
@@ -267,6 +272,9 @@ if ($color =~ /^[01]$/) {
die "Invalid color mode: $color\n";
}
+# skip TAB size 1 to avoid additional checks on $tabsize - 1
+die "Invalid TAB size: $tabsize\n" if ($tabsize < 2);
+
sub hash_save_array_words {
my ($hashRef, $arrayRef) = @_;
@@ -1213,7 +1221,7 @@ sub expand_tabs {
if ($c eq "\t") {
$res .= ' ';
$n++;
- for (; ($n % 8) != 0; $n++) {
+ for (; ($n % $tabsize) != 0; $n++) {
$res .= ' ';
}
next;
@@ -2226,7 +2234,7 @@ sub string_find_replace {
sub tabify {
my ($leading) = @_;
- my $source_indent = 8;
+ my $source_indent = $tabsize;
my $max_spaces_before_tab = $source_indent - 1;
my $spaces_to_tab = " " x $source_indent;
@@ -3171,8 +3179,10 @@ sub process {
if ($msg_type ne "" &&
(show_type("LONG_LINE") || show_type($msg_type))) {
- WARN($msg_type,
- "line over $max_line_length characters\n" . $herecurr);
+ my $msg_level = \&WARN;
+ $msg_level = \&CHK if ($file);
+ &{$msg_level}($msg_type,
+ "line length of $length exceeds $max_line_length columns\n" . $herecurr);
}
}
@@ -3186,7 +3196,7 @@ sub process {
next if ($realfile !~ /\.(h|c|pl|dtsi|dts)$/);
# at the beginning of a line any tabs must come first and anything
-# more than 8 must use tabs.
+# more than $tabsize must use tabs.
if ($rawline =~ /^\+\s* \t\s*\S/ ||
$rawline =~ /^\+\s* \s*/) {
my $herevet = "$here\n" . cat_vet($rawline) . "\n";
@@ -3205,7 +3215,7 @@ sub process {
"please, no space before tabs\n" . $herevet) &&
$fix) {
while ($fixed[$fixlinenr] =~
- s/(^\+.*) {8,8}\t/$1\t\t/) {}
+ s/(^\+.*) {$tabsize,$tabsize}\t/$1\t\t/) {}
while ($fixed[$fixlinenr] =~
s/(^\+.*) +\t/$1\t/) {}
}
@@ -3227,11 +3237,11 @@ sub process {
if ($perl_version_ok &&
$sline =~ /^\+\t+( +)(?:$c90_Keywords\b|\{\s*$|\}\s*(?:else\b|while\b|\s*$)|$Declare\s*$Ident\s*[;=])/) {
my $indent = length($1);
- if ($indent % 8) {
+ if ($indent % $tabsize) {
if (WARN("TABSTOP",
"Statements should start on a tabstop\n" . $herecurr) &&
$fix) {
- $fixed[$fixlinenr] =~ s@(^\+\t+) +@$1 . "\t" x ($indent/8)@e;
+ $fixed[$fixlinenr] =~ s@(^\+\t+) +@$1 . "\t" x ($indent/$tabsize)@e;
}
}
}
@@ -3249,8 +3259,8 @@ sub process {
my $newindent = $2;
my $goodtabindent = $oldindent .
- "\t" x ($pos / 8) .
- " " x ($pos % 8);
+ "\t" x ($pos / $tabsize) .
+ " " x ($pos % $tabsize);
my $goodspaceindent = $oldindent . " " x $pos;
if ($newindent ne $goodtabindent &&
@@ -3721,11 +3731,11 @@ sub process {
#print "line<$line> prevline<$prevline> indent<$indent> sindent<$sindent> check<$check> continuation<$continuation> s<$s> cond_lines<$cond_lines> stat_real<$stat_real> stat<$stat>\n";
if ($check && $s ne '' &&
- (($sindent % 8) != 0 ||
+ (($sindent % $tabsize) != 0 ||
($sindent < $indent) ||
($sindent == $indent &&
($s !~ /^\s*(?:\}|\{|else\b)/)) ||
- ($sindent > $indent + 8))) {
+ ($sindent > $indent + $tabsize))) {
WARN("SUSPECT_CODE_INDENT",
"suspect code indent for conditional statements ($indent, $sindent)\n" . $herecurr . "$stat_real\n");
}