From 7e4845c751df6de66fa81e2b5771d73d210439e5 Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Mon, 5 Jan 2015 19:42:03 -0600 Subject: [PATCH] 3.19-rc3-bone1 release Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- patch.sh | 33 +- .../beaglebone/capes/0002-ARGUS-dtbs.patch | 117 ----- .../0001-sync-am335x-peripheral-pinmux.patch | 173 ++++++- ...one-common-add-collision-and-carrier.patch | 47 ++ patches/defconfig | 13 +- patches/defconfig-bone | 13 +- .../fixes/0001-clk-fix-extra-clk_gpio.patch | 29 -- ...usty-gcc-4.8-4.8.2-19ubuntu1-has-fix.patch | 6 +- ...x-missing-usb0_reset-for-sun4i-sun5i.patch | 4 +- ...eagle-x15-Add-GPIO-controlled-fan-no.patch | 49 ++ ...ernet-cpsw-fix-hangs-with-interrupts.patch | 117 +++++ ...omap-add-ttySx-console-if-the-user-d.patch | 101 ++++ ...-OF-DT-Overlay-configfs-interface-v3.patch | 433 ++++++++++++++++++ patches/ref_omap2plus_defconfig | 3 +- repo_maintenance/push-merge-to-sha.sh | 2 +- tools/stable-config-checker.sh | 1 - version.sh | 4 +- 17 files changed, 969 insertions(+), 176 deletions(-) delete mode 100644 patches/beaglebone/capes/0002-ARGUS-dtbs.patch create mode 100644 patches/beaglebone/dts/0004-arm-dts-am335x-bone-common-add-collision-and-carrier.patch delete mode 100644 patches/fixes/0001-clk-fix-extra-clk_gpio.patch create mode 100644 patches/fixes/0003-ARM-dts-am57xx-beagle-x15-Add-GPIO-controlled-fan-no.patch create mode 100644 patches/fixes/0004-net-ethernet-cpsw-fix-hangs-with-interrupts.patch create mode 100644 patches/fixes/0005-tty-serial-8250-omap-add-ttySx-console-if-the-user-d.patch create mode 100644 patches/overlay/0001-OF-DT-Overlay-configfs-interface-v3.patch diff --git a/patch.sh b/patch.sh index b0104fc62..639af4beb 100644 --- a/patch.sh +++ b/patch.sh @@ -72,6 +72,11 @@ need_to_push_mainline () { ${git} "${DIR}/patches/need_to_push_mainline/0001-ARM-dts-restructure-imx6q-udoo.dts-to-support-udoo-d.patch" } +overlay () { + echo "dir: overlay" +# ${git} "${DIR}/patches/overlay/0001-OF-DT-Overlay-configfs-interface-v3.patch" +} + dt () { echo "dir: dt/gpiohog" #regenerate="enable" @@ -124,8 +129,22 @@ errata () { fixes () { echo "dir: fixes" + #regenerate="enable" + if [ "x${regenerate}" = "xenable" ] ; then + start_cleanup + fi + ${git} "${DIR}/patches/fixes/0001-trusty-gcc-4.8-4.8.2-19ubuntu1-has-fix.patch" ${git} "${DIR}/patches/fixes/0002-ARM-dts-Fix-missing-usb0_reset-for-sun4i-sun5i.patch" + ${git} "${DIR}/patches/fixes/0003-ARM-dts-am57xx-beagle-x15-Add-GPIO-controlled-fan-no.patch" + ${git} "${DIR}/patches/fixes/0004-net-ethernet-cpsw-fix-hangs-with-interrupts.patch" + ${git} "${DIR}/patches/fixes/0005-tty-serial-8250-omap-add-ttySx-console-if-the-user-d.patch" + + if [ "x${regenerate}" = "xenable" ] ; then + number=4 + cleanup + fi + } dtb_makefile_append () { @@ -142,12 +161,16 @@ beaglebone () { ${git} "${DIR}/patches/beaglebone/dts/0001-am335x-boneblack-add-cpu0-opp-points.patch" ${git} "${DIR}/patches/beaglebone/dts/0002-dts-am335x-bone-common-fixup-leds-to-match-3.8.patch" ${git} "${DIR}/patches/beaglebone/dts/0003-bbb-force-usb0-to-perhiperal-mode-fixes-http-bugs.el.patch" + ${git} "${DIR}/patches/beaglebone/dts/0004-arm-dts-am335x-bone-common-add-collision-and-carrier.patch" if [ "x${regenerate}" = "xenable" ] ; then - number=3 + number=4 cleanup fi + echo "dir: beaglebone/capes" + ${git} "${DIR}/patches/beaglebone/capes/0001-cape-Argus-UPS-cape-support.patch" + echo "dir: beaglebone/dtbs" #regenerate="enable" if [ "x${regenerate}" = "xenable" ] ; then @@ -156,10 +179,6 @@ beaglebone () { fi ${git} "${DIR}/patches/beaglebone/dtbs/0001-sync-am335x-peripheral-pinmux.patch" - echo "dir: beaglebone/capes" - ${git} "${DIR}/patches/beaglebone/capes/0001-cape-Argus-UPS-cape-support.patch" - ${git} "${DIR}/patches/beaglebone/capes/0002-ARGUS-dtbs.patch" - #### #dtb makefile #regenerate="enable" @@ -241,7 +260,11 @@ sgx () { ### +overlay dt +#dts +#wand +#errata fixes beaglebone diff --git a/patches/beaglebone/capes/0002-ARGUS-dtbs.patch b/patches/beaglebone/capes/0002-ARGUS-dtbs.patch deleted file mode 100644 index 7f000b7b9..000000000 --- a/patches/beaglebone/capes/0002-ARGUS-dtbs.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 1275bc6dc49625ae478e19d3fc7293e06006297f Mon Sep 17 00:00:00 2001 -From: Robert Nelson <robertcnelson@gmail.com> -Date: Tue, 30 Dec 2014 09:32:52 -0600 -Subject: [PATCH 2/2] ARGUS: dtbs - -Signed-off-by: Robert Nelson <robertcnelson@gmail.com> ---- - arch/arm/boot/dts/am335x-bone-cape-bone-argus.dts | 41 ++++++++++++++++++ - .../boot/dts/am335x-boneblack-cape-bone-argus.dts | 48 ++++++++++++++++++++++ - 2 files changed, 89 insertions(+) - create mode 100644 arch/arm/boot/dts/am335x-bone-cape-bone-argus.dts - create mode 100644 arch/arm/boot/dts/am335x-boneblack-cape-bone-argus.dts - -diff --git a/arch/arm/boot/dts/am335x-bone-cape-bone-argus.dts b/arch/arm/boot/dts/am335x-bone-cape-bone-argus.dts -new file mode 100644 -index 0000000..d4fd739 ---- /dev/null -+++ b/arch/arm/boot/dts/am335x-bone-cape-bone-argus.dts -@@ -0,0 +1,41 @@ -+/* -+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ */ -+/dts-v1/; -+ -+#include "am33xx.dtsi" -+#include "am335x-bone-common.dtsi" -+ -+/ { -+ model = "TI AM335x BeagleBone"; -+ compatible = "ti,am335x-bone", "ti,am33xx"; -+}; -+ -+&ldo3_reg { -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-always-on; -+}; -+ -+&mmc1 { -+ vmmc-supply = <&ldo3_reg>; -+}; -+ -+&am33xx_pinmux { -+ pinctrl-names = "default"; -+ /* pinctrl-0 = <&clkout2_pin>; */ -+}; -+ -+&sham { -+ status = "okay"; -+}; -+ -+&aes { -+ status = "okay"; -+}; -+ -+#include "am335x-bone-argus.dtsi" -diff --git a/arch/arm/boot/dts/am335x-boneblack-cape-bone-argus.dts b/arch/arm/boot/dts/am335x-boneblack-cape-bone-argus.dts -new file mode 100644 -index 0000000..ebe6757 ---- /dev/null -+++ b/arch/arm/boot/dts/am335x-boneblack-cape-bone-argus.dts -@@ -0,0 +1,48 @@ -+/* -+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ */ -+/dts-v1/; -+ -+#include "am33xx.dtsi" -+#include "am335x-bone-common.dtsi" -+ -+/ { -+ model = "TI AM335x BeagleBone Black"; -+ compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; -+}; -+ -+/* Max Core Speed */ -+#include "am335x-boneblack-1ghz.dtsi" -+/* #include "am335x-boneblack-800mhz.dtsi" */ -+ -+&ldo3_reg { -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-always-on; -+}; -+ -+&mmc1 { -+ vmmc-supply = <&vmmcsd_fixed>; -+}; -+ -+&am33xx_pinmux { -+ pinctrl-names = "default"; -+ /* pinctrl-0 = <&clkout2_pin>; */ -+}; -+ -+#include "am335x-peripheral-emmc.dtsi" -+#include "am335x-bone-pinmux-emmc.dtsi" -+/* #include "am335x-bone-emmc-in-reset.dtsi" */ -+ -+#include "am335x-peripheral-nxp-hdmi.dtsi" -+#include "am335x-bone-pinmux-nxp-hdmi.dtsi" -+ -+&rtc { -+ system-power-controller; -+}; -+ -+#include "am335x-bone-argus.dtsi" --- -2.1.4 - diff --git a/patches/beaglebone/dtbs/0001-sync-am335x-peripheral-pinmux.patch b/patches/beaglebone/dtbs/0001-sync-am335x-peripheral-pinmux.patch index 3cde85b83..8a809e420 100644 --- a/patches/beaglebone/dtbs/0001-sync-am335x-peripheral-pinmux.patch +++ b/patches/beaglebone/dtbs/0001-sync-am335x-peripheral-pinmux.patch @@ -1,12 +1,14 @@ -From d211dfd1ee05eb24d6e6cc1e77ec06894293719e Mon Sep 17 00:00:00 2001 +From 102daa2023018f440a3bb9f666dd04f5f27d21fe Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> -Date: Tue, 30 Dec 2014 09:23:40 -0600 +Date: Wed, 31 Dec 2014 09:58:55 -0600 Subject: [PATCH] sync: am335x-peripheral/pinmux Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- + arch/arm/boot/dts/am335x-bone-argus.dtsi | 4 + arch/arm/boot/dts/am335x-bone-can0.dts | 57 ++++++ arch/arm/boot/dts/am335x-bone-can1.dts | 57 ++++++ + arch/arm/boot/dts/am335x-bone-cape-bone-argus.dts | 41 +++++ arch/arm/boot/dts/am335x-bone-common.dtsi | 18 -- arch/arm/boot/dts/am335x-bone-emmc-in-reset.dtsi | 18 ++ arch/arm/boot/dts/am335x-bone-pinmux-can0.dtsi | 45 +++++ @@ -27,12 +29,14 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> arch/arm/boot/dts/am335x-boneblack-bbb-exp-c.dts | 48 +++++ arch/arm/boot/dts/am335x-boneblack-can0.dts | 64 +++++++ arch/arm/boot/dts/am335x-boneblack-can1.dts | 64 +++++++ + .../boot/dts/am335x-boneblack-cape-bone-argus.dts | 48 +++++ arch/arm/boot/dts/am335x-boneblack-ttyO1.dts | 64 +++++++ arch/arm/boot/dts/am335x-boneblack-ttyO2.dts | 64 +++++++ arch/arm/boot/dts/am335x-boneblack-ttyO4.dts | 64 +++++++ arch/arm/boot/dts/am335x-boneblack-ttyO5.dts | 64 +++++++ arch/arm/boot/dts/am335x-boneblack.dts | 76 +++----- arch/arm/boot/dts/am335x-cape-bbb-exp-c.dtsi | 202 +++++++++++++++++++++ + arch/arm/boot/dts/am335x-cape-rtc-ds1307.dtsi | 31 ++++ arch/arm/boot/dts/am335x-peripheral-can0.dtsi | 13 ++ arch/arm/boot/dts/am335x-peripheral-can1.dtsi | 13 ++ arch/arm/boot/dts/am335x-peripheral-emmc.dtsi | 15 ++ @@ -44,9 +48,10 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> arch/arm/boot/dts/am335x-peripheral-ttyO4.dtsi | 13 ++ arch/arm/boot/dts/am335x-peripheral-ttyO5.dtsi | 13 ++ include/dt-bindings/board/am335x-bbw-bbb-base.h | 103 +++++++++++ - 39 files changed, 2033 insertions(+), 69 deletions(-) + 43 files changed, 2157 insertions(+), 69 deletions(-) create mode 100644 arch/arm/boot/dts/am335x-bone-can0.dts create mode 100644 arch/arm/boot/dts/am335x-bone-can1.dts + create mode 100644 arch/arm/boot/dts/am335x-bone-cape-bone-argus.dts create mode 100644 arch/arm/boot/dts/am335x-bone-emmc-in-reset.dtsi create mode 100644 arch/arm/boot/dts/am335x-bone-pinmux-can0.dtsi create mode 100644 arch/arm/boot/dts/am335x-bone-pinmux-can1.dtsi @@ -65,11 +70,13 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> create mode 100644 arch/arm/boot/dts/am335x-boneblack-bbb-exp-c.dts create mode 100644 arch/arm/boot/dts/am335x-boneblack-can0.dts create mode 100644 arch/arm/boot/dts/am335x-boneblack-can1.dts + create mode 100644 arch/arm/boot/dts/am335x-boneblack-cape-bone-argus.dts create mode 100644 arch/arm/boot/dts/am335x-boneblack-ttyO1.dts create mode 100644 arch/arm/boot/dts/am335x-boneblack-ttyO2.dts create mode 100644 arch/arm/boot/dts/am335x-boneblack-ttyO4.dts create mode 100644 arch/arm/boot/dts/am335x-boneblack-ttyO5.dts create mode 100644 arch/arm/boot/dts/am335x-cape-bbb-exp-c.dtsi + create mode 100644 arch/arm/boot/dts/am335x-cape-rtc-ds1307.dtsi create mode 100644 arch/arm/boot/dts/am335x-peripheral-can0.dtsi create mode 100644 arch/arm/boot/dts/am335x-peripheral-can1.dtsi create mode 100644 arch/arm/boot/dts/am335x-peripheral-emmc.dtsi @@ -82,6 +89,28 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> create mode 100644 arch/arm/boot/dts/am335x-peripheral-ttyO5.dtsi create mode 100644 include/dt-bindings/board/am335x-bbw-bbb-base.h +diff --git a/arch/arm/boot/dts/am335x-bone-argus.dtsi b/arch/arm/boot/dts/am335x-bone-argus.dtsi +index 0bbe050..a44c7d1 100644 +--- a/arch/arm/boot/dts/am335x-bone-argus.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-argus.dtsi +@@ -5,6 +5,9 @@ + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ ++ ++#include "am335x-cape-rtc-ds1307.dtsi" ++ + / { + ocp { + P8_07_pinmux { +@@ -45,6 +48,7 @@ + }; + }; + }; ++ + / { + argus-ups { + compatible = "argus-ups"; diff --git a/arch/arm/boot/dts/am335x-bone-can0.dts b/arch/arm/boot/dts/am335x-bone-can0.dts new file mode 100644 index 0000000..27b9920 @@ -208,6 +237,53 @@ index 0000000..7a5c6a4 + +/* #include "am335x-peripheral-ttyO5.dtsi" */ +/* #include "am335x-bone-pinmux-ttyO5.dtsi" */ +diff --git a/arch/arm/boot/dts/am335x-bone-cape-bone-argus.dts b/arch/arm/boot/dts/am335x-bone-cape-bone-argus.dts +new file mode 100644 +index 0000000..d4fd739 +--- /dev/null ++++ b/arch/arm/boot/dts/am335x-bone-cape-bone-argus.dts +@@ -0,0 +1,41 @@ ++/* ++ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++/dts-v1/; ++ ++#include "am33xx.dtsi" ++#include "am335x-bone-common.dtsi" ++ ++/ { ++ model = "TI AM335x BeagleBone"; ++ compatible = "ti,am335x-bone", "ti,am33xx"; ++}; ++ ++&ldo3_reg { ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-always-on; ++}; ++ ++&mmc1 { ++ vmmc-supply = <&ldo3_reg>; ++}; ++ ++&am33xx_pinmux { ++ pinctrl-names = "default"; ++ /* pinctrl-0 = <&clkout2_pin>; */ ++}; ++ ++&sham { ++ status = "okay"; ++}; ++ ++&aes { ++ status = "okay"; ++}; ++ ++#include "am335x-bone-argus.dtsi" diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi index 6db9fc1..ae4b7d8 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi @@ -1519,6 +1595,60 @@ index 0000000..d1e3b1f + +/* #include "am335x-peripheral-ttyO5.dtsi" */ +/* #include "am335x-bone-pinmux-ttyO5.dtsi" */ +diff --git a/arch/arm/boot/dts/am335x-boneblack-cape-bone-argus.dts b/arch/arm/boot/dts/am335x-boneblack-cape-bone-argus.dts +new file mode 100644 +index 0000000..ebe6757 +--- /dev/null ++++ b/arch/arm/boot/dts/am335x-boneblack-cape-bone-argus.dts +@@ -0,0 +1,48 @@ ++/* ++ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++/dts-v1/; ++ ++#include "am33xx.dtsi" ++#include "am335x-bone-common.dtsi" ++ ++/ { ++ model = "TI AM335x BeagleBone Black"; ++ compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; ++}; ++ ++/* Max Core Speed */ ++#include "am335x-boneblack-1ghz.dtsi" ++/* #include "am335x-boneblack-800mhz.dtsi" */ ++ ++&ldo3_reg { ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-always-on; ++}; ++ ++&mmc1 { ++ vmmc-supply = <&vmmcsd_fixed>; ++}; ++ ++&am33xx_pinmux { ++ pinctrl-names = "default"; ++ /* pinctrl-0 = <&clkout2_pin>; */ ++}; ++ ++#include "am335x-peripheral-emmc.dtsi" ++#include "am335x-bone-pinmux-emmc.dtsi" ++/* #include "am335x-bone-emmc-in-reset.dtsi" */ ++ ++#include "am335x-peripheral-nxp-hdmi.dtsi" ++#include "am335x-bone-pinmux-nxp-hdmi.dtsi" ++ ++&rtc { ++ system-power-controller; ++}; ++ ++#include "am335x-bone-argus.dtsi" diff --git a/arch/arm/boot/dts/am335x-boneblack-ttyO1.dts b/arch/arm/boot/dts/am335x-boneblack-ttyO1.dts new file mode 100644 index 0000000..6c215e4 @@ -2099,6 +2229,43 @@ index 0000000..1affae5 + +#include "am335x-peripheral-panel-1024x600-24bit.dtsi" +#include "am335x-bone-pinmux-panel-1024x600-24bit.dtsi" +diff --git a/arch/arm/boot/dts/am335x-cape-rtc-ds1307.dtsi b/arch/arm/boot/dts/am335x-cape-rtc-ds1307.dtsi +new file mode 100644 +index 0000000..bce6ac5 +--- /dev/null ++++ b/arch/arm/boot/dts/am335x-cape-rtc-ds1307.dtsi +@@ -0,0 +1,31 @@ ++/* ++ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include <dt-bindings/board/am335x-bbw-bbb-base.h> ++ ++&am33xx_pinmux { ++ i2c2_pins: pinmux_i2c2_pins { ++ pinctrl-single,pins = < ++ BONE_P9_20 0x73 /* (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE3) uart1_ctsn.i2c2_sda */ ++ BONE_P9_19 0x73 /* (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE3) uart1_rtsn.i2c2_scl */ ++ >; ++ }; ++}; ++ ++&i2c2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c2_pins>; ++ ++ status = "okay"; ++ clock-frequency = <100000>; ++ ++ rtc@68 { ++ compatible = "maxim,ds1307"; ++ reg = <0x68>; ++ }; ++}; diff --git a/arch/arm/boot/dts/am335x-peripheral-can0.dtsi b/arch/arm/boot/dts/am335x-peripheral-can0.dtsi new file mode 100644 index 0000000..4335e39 diff --git a/patches/beaglebone/dts/0004-arm-dts-am335x-bone-common-add-collision-and-carrier.patch b/patches/beaglebone/dts/0004-arm-dts-am335x-bone-common-add-collision-and-carrier.patch new file mode 100644 index 000000000..d1a4324d2 --- /dev/null +++ b/patches/beaglebone/dts/0004-arm-dts-am335x-bone-common-add-collision-and-carrier.patch @@ -0,0 +1,47 @@ +From 9bac5bc4814b86746414c60fbc1a56e7e4604c70 Mon Sep 17 00:00:00 2001 +From: Schuyler Patton <spatton@ti.com> +Date: Mon, 5 Jan 2015 15:44:14 -0600 +Subject: [PATCH 4/4] arm: dts: am335x-bone-common: add collision and carrier + sense pinmux + +Added pin mux definitions for collision and carrier sense errors coming +from the ethernet phy. Without these two signals the MAC ends up ignoring +the errors detected by the PHY which end up causing a lower throughput +problem when the phy is in half duplex mode such as connected through a hub. + +Fixes: 2ba3549 (ARM: dts: am335x-bone*: add DT for BeagleBone Black) +Cc: Koen Kooi <koen@dominion.thruhere.net> +Cc: Tom Rini <trini@ti.com> +Cc: Kevin Hilman <khilman@linaro.org> +Cc: <stable@vger.kernel.org> # v3.13+ +Signed-off-by: Schuyler Patton <spatton@ti.com> +Signed-off-by: Felipe Balbi <balbi@ti.com> +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index 6db9fc1..05861f7 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -97,6 +97,8 @@ + cpsw_default: cpsw_default { + pinctrl-single,pins = < + /* Slave 1 */ ++ 0x108 (PIN_INPUT | MUX_MODE0) /* mii1_col.mii1_col */ ++ 0x10c (PIN_INPUT | MUX_MODE0) /* mii1_crs.mii1_crs */ + 0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxerr.mii1_rxerr */ + 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */ + 0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxdv.mii1_rxdv */ +@@ -116,6 +118,8 @@ + cpsw_sleep: cpsw_sleep { + pinctrl-single,pins = < + /* Slave 1 reset value */ ++ 0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) +-- +2.1.4 + diff --git a/patches/defconfig b/patches/defconfig index a7bf8e469..7b92a8d70 100644 --- a/patches/defconfig +++ b/patches/defconfig @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm 3.19.0-rc2 Kernel Configuration +# Linux/arm 3.19.0-rc3 Kernel Configuration # CONFIG_ARM=y CONFIG_ARM_HAS_SG_CHAIN=y @@ -1346,6 +1346,7 @@ CONFIG_CFG80211=m CONFIG_CFG80211_DEFAULT_PS=y # CONFIG_CFG80211_DEBUGFS is not set # CONFIG_CFG80211_INTERNAL_REGDB is not set +CONFIG_CFG80211_WEXT=y CONFIG_LIB80211=m CONFIG_LIB80211_CRYPT_WEP=m CONFIG_LIB80211_CRYPT_CCMP=m @@ -2402,7 +2403,8 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set CONFIG_SERIAL_8250_DW=y # CONFIG_SERIAL_8250_EM is not set -# CONFIG_SERIAL_8250_OMAP is not set +CONFIG_SERIAL_8250_OMAP=y +CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=y # # Non-8250 serial port support @@ -2415,8 +2417,7 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_CONSOLE_POLL=y CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_SERIAL_OMAP=y -CONFIG_SERIAL_OMAP_CONSOLE=y +# CONFIG_SERIAL_OMAP is not set # CONFIG_SERIAL_SCCNXP is not set # CONFIG_SERIAL_SC16IS7XX is not set # CONFIG_SERIAL_BCM63XX is not set @@ -2764,7 +2765,7 @@ CONFIG_SENSORS_GL518SM=m CONFIG_SENSORS_GL520SM=m CONFIG_SENSORS_G760A=m CONFIG_SENSORS_G762=m -CONFIG_SENSORS_GPIO_FAN=m +CONFIG_SENSORS_GPIO_FAN=y CONFIG_SENSORS_HIH6130=m CONFIG_SENSORS_IIO_HWMON=m CONFIG_SENSORS_IT87=m @@ -3678,7 +3679,7 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y # CONFIG_LCD_CLASS_DEVICE is not set CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_GENERIC is not set -# CONFIG_BACKLIGHT_PWM is not set +CONFIG_BACKLIGHT_PWM=y # CONFIG_BACKLIGHT_DA9052 is not set # CONFIG_BACKLIGHT_ADP8860 is not set # CONFIG_BACKLIGHT_ADP8870 is not set diff --git a/patches/defconfig-bone b/patches/defconfig-bone index a7bf8e469..7b92a8d70 100644 --- a/patches/defconfig-bone +++ b/patches/defconfig-bone @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm 3.19.0-rc2 Kernel Configuration +# Linux/arm 3.19.0-rc3 Kernel Configuration # CONFIG_ARM=y CONFIG_ARM_HAS_SG_CHAIN=y @@ -1346,6 +1346,7 @@ CONFIG_CFG80211=m CONFIG_CFG80211_DEFAULT_PS=y # CONFIG_CFG80211_DEBUGFS is not set # CONFIG_CFG80211_INTERNAL_REGDB is not set +CONFIG_CFG80211_WEXT=y CONFIG_LIB80211=m CONFIG_LIB80211_CRYPT_WEP=m CONFIG_LIB80211_CRYPT_CCMP=m @@ -2402,7 +2403,8 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set CONFIG_SERIAL_8250_DW=y # CONFIG_SERIAL_8250_EM is not set -# CONFIG_SERIAL_8250_OMAP is not set +CONFIG_SERIAL_8250_OMAP=y +CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=y # # Non-8250 serial port support @@ -2415,8 +2417,7 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_CONSOLE_POLL=y CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_SERIAL_OMAP=y -CONFIG_SERIAL_OMAP_CONSOLE=y +# CONFIG_SERIAL_OMAP is not set # CONFIG_SERIAL_SCCNXP is not set # CONFIG_SERIAL_SC16IS7XX is not set # CONFIG_SERIAL_BCM63XX is not set @@ -2764,7 +2765,7 @@ CONFIG_SENSORS_GL518SM=m CONFIG_SENSORS_GL520SM=m CONFIG_SENSORS_G760A=m CONFIG_SENSORS_G762=m -CONFIG_SENSORS_GPIO_FAN=m +CONFIG_SENSORS_GPIO_FAN=y CONFIG_SENSORS_HIH6130=m CONFIG_SENSORS_IIO_HWMON=m CONFIG_SENSORS_IT87=m @@ -3678,7 +3679,7 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y # CONFIG_LCD_CLASS_DEVICE is not set CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_GENERIC is not set -# CONFIG_BACKLIGHT_PWM is not set +CONFIG_BACKLIGHT_PWM=y # CONFIG_BACKLIGHT_DA9052 is not set # CONFIG_BACKLIGHT_ADP8860 is not set # CONFIG_BACKLIGHT_ADP8870 is not set diff --git a/patches/fixes/0001-clk-fix-extra-clk_gpio.patch b/patches/fixes/0001-clk-fix-extra-clk_gpio.patch deleted file mode 100644 index 8fa05fc24..000000000 --- a/patches/fixes/0001-clk-fix-extra-clk_gpio.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 90e9f836ec9bacd89bf2ce5e6336d035c959d327 Mon Sep 17 00:00:00 2001 -From: Robert Nelson <robertcnelson@gmail.com> -Date: Wed, 15 Oct 2014 15:40:26 -0500 -Subject: [PATCH] clk: fix extra clk_gpio - -Signed-off-by: Robert Nelson <robertcnelson@gmail.com> ---- - drivers/clk/ti/gpio.c | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/drivers/clk/ti/gpio.c b/drivers/clk/ti/gpio.c -index f4c668e..0377807 100644 ---- a/drivers/clk/ti/gpio.c -+++ b/drivers/clk/ti/gpio.c -@@ -17,11 +17,6 @@ - #include <linux/err.h> - #include <linux/device.h> - --struct clk_gpio { -- struct clk_hw hw; -- struct gpio_desc *gpiod; --}; -- - /** - * DOC: basic gpio controlled clock which can be enabled and disabled - * with gpio output --- -2.1.1 - diff --git a/patches/fixes/0001-trusty-gcc-4.8-4.8.2-19ubuntu1-has-fix.patch b/patches/fixes/0001-trusty-gcc-4.8-4.8.2-19ubuntu1-has-fix.patch index d3020c376..8daa910a9 100644 --- a/patches/fixes/0001-trusty-gcc-4.8-4.8.2-19ubuntu1-has-fix.patch +++ b/patches/fixes/0001-trusty-gcc-4.8-4.8.2-19ubuntu1-has-fix.patch @@ -1,7 +1,7 @@ -From 2489f6836df8bbbc56d5d9083750106fb292a3b1 Mon Sep 17 00:00:00 2001 +From 4b03857977ba0ab46e9fb4294089ad6865f8e7a0 Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Tue, 11 Nov 2014 18:19:30 -0600 -Subject: [PATCH] trusty: gcc-4.8 (4.8.2-19ubuntu1) has fix +Subject: [PATCH 1/4] trusty: gcc-4.8 (4.8.2-19ubuntu1) has fix Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- @@ -22,5 +22,5 @@ index 2d2d608..75fd051 100644 #error and result in filesystem corruption and oopses. #endif -- -2.1.1 +2.1.4 diff --git a/patches/fixes/0002-ARM-dts-Fix-missing-usb0_reset-for-sun4i-sun5i.patch b/patches/fixes/0002-ARM-dts-Fix-missing-usb0_reset-for-sun4i-sun5i.patch index 64b97504c..4b896017d 100644 --- a/patches/fixes/0002-ARM-dts-Fix-missing-usb0_reset-for-sun4i-sun5i.patch +++ b/patches/fixes/0002-ARM-dts-Fix-missing-usb0_reset-for-sun4i-sun5i.patch @@ -1,7 +1,7 @@ -From 01445fbc899df3ac3cd5a60f5cedf8d8c532a839 Mon Sep 17 00:00:00 2001 +From 6c5aab8f496d4fa21c77d2845468e016fb8ee371 Mon Sep 17 00:00:00 2001 From: Hans de Goede <hdegoede@redhat.com> Date: Wed, 24 Dec 2014 20:19:18 +0100 -Subject: [PATCH 2/2] ARM: dts: Fix missing usb0_reset for sun4i / sun5i +Subject: [PATCH 2/4] ARM: dts: Fix missing usb0_reset for sun4i / sun5i The recent sun4i-usb-phy changes to add (preliminary) support for the oth phy, cause the ehci/ohci controllers to no longer work on sun4i / sun5i, because diff --git a/patches/fixes/0003-ARM-dts-am57xx-beagle-x15-Add-GPIO-controlled-fan-no.patch b/patches/fixes/0003-ARM-dts-am57xx-beagle-x15-Add-GPIO-controlled-fan-no.patch new file mode 100644 index 000000000..07d8fd01a --- /dev/null +++ b/patches/fixes/0003-ARM-dts-am57xx-beagle-x15-Add-GPIO-controlled-fan-no.patch @@ -0,0 +1,49 @@ +From 6c55ad74cbf0cb322cc81089effc5402253bca14 Mon Sep 17 00:00:00 2001 +From: Nishanth Menon <nm@ti.com> +Date: Mon, 5 Jan 2015 10:32:29 -0600 +Subject: [PATCH 3/3] ARM: dts: am57xx-beagle-x15: Add GPIO controlled fan node + +TPS gpio now controls a 5v 500mA TL5209 regulator which may be supply +a fan (such as AFB02505HHB) over J1 connector for various purposes. +Provide device tree node to enable the same. + +Signed-off-by: Nishanth Menon <nm@ti.com> +--- + arch/arm/boot/dts/am57xx-beagle-x15.dts | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts +index 49edbda..37431c8 100644 +--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts ++++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts +@@ -80,6 +80,14 @@ + default-state = "off"; + }; + }; ++ ++ gpio_fan: gpio_fan { ++ /* Based on 5v 500mA AFB02505HHB */ ++ compatible = "gpio-fan"; ++ gpios = <&tps659038_gpio 1 GPIO_ACTIVE_HIGH>; ++ gpio-fan,speed-map = <0 0>, ++ <13000 1>; ++ }; + }; + + &dra7_pmx_core { +@@ -314,6 +322,12 @@ + wakeup-source; + ti,palmas-long-press-seconds = <12>; + }; ++ ++ tps659038_gpio: tps659038_gpio { ++ compatible = "ti,palmas-gpio"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ }; + }; + + tmp102: tmp102@48 { +-- +2.1.4 + diff --git a/patches/fixes/0004-net-ethernet-cpsw-fix-hangs-with-interrupts.patch b/patches/fixes/0004-net-ethernet-cpsw-fix-hangs-with-interrupts.patch new file mode 100644 index 000000000..644f1792c --- /dev/null +++ b/patches/fixes/0004-net-ethernet-cpsw-fix-hangs-with-interrupts.patch @@ -0,0 +1,117 @@ +From 65a411efd387b358017d817560c254b691e8ce02 Mon Sep 17 00:00:00 2001 +From: Felipe Balbi <balbi@ti.com> +Date: Fri, 2 Jan 2015 12:10:25 -0600 +Subject: [PATCH 4/4] net: ethernet: cpsw: fix hangs with interrupts + +The CPSW IP implements pulse-signaled interrupts. Due to +that we must write a correct, pre-defined value to the +CPDMA_MACEOIVECTOR register so the controller generates +a pulse on the correct IRQ line to signal the End Of +Interrupt. + +The way the driver is written today, all four IRQ lines +are requested using the same IRQ handler and, because of +that, we could fall into situations where a TX IRQ fires +but we tell the controller that we ended an RX IRQ (or +vice-versa). This situation triggers an IRQ storm on the +reserved IRQ 127 of INTC which will in turn call ack_bad_irq() +which will, then, print a ton of: + + unexpected IRQ trap at vector 00 + +In order to fix the problem, we are moving all calls to +cpdma_ctlr_eoi() inside the IRQ handler and making sure +we *always* write the correct value to the CPDMA_MACEOIVECTOR +register. Note that the algorithm assumes that IRQ numbers and +value-to-be-written-to-EOI are proportional, meaning that a +write of value 0 would trigger an EOI pulse for the RX_THRESHOLD +Interrupt and that's the IRQ number sitting in the 0-th index +of our irqs_table array. + +This, however, is safe at least for current implementations of +CPSW so we will refrain from making the check smarter (and, as +a side-effect, slower) until we actually have a platform where +IRQ lines are swapped. + +This patch has been tested for several days with AM335x- and +AM437x-based platforms. AM57x was left out because there are +still pending patches to enable ethernet in mainline for that +platform. A read of the TRM confirms the statement on previous +paragraph. + +Reported-by: Yegor Yefremov <yegorslists@googlemail.com> +Fixes: 510a1e7 (drivers: net: davinci_cpdma: acknowledge interrupt properly) +Cc: <stable@vger.kernel.org> # v3.9+ +Signed-off-by: Felipe Balbi <balbi@ti.com> +--- + drivers/net/ethernet/ti/cpsw.c | 19 ++++++++----------- + 1 file changed, 8 insertions(+), 11 deletions(-) + +diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c +index c560f9a..e61ee83 100644 +--- a/drivers/net/ethernet/ti/cpsw.c ++++ b/drivers/net/ethernet/ti/cpsw.c +@@ -757,6 +757,14 @@ requeue: + static irqreturn_t cpsw_interrupt(int irq, void *dev_id) + { + struct cpsw_priv *priv = dev_id; ++ int value = irq - priv->irqs_table[0]; ++ ++ /* NOTICE: Ending IRQ here. The trick with the 'value' variable above ++ * is to make sure we will always write the correct value to the EOI ++ * register. Namely 0 for RX_THRESH Interrupt, 1 for RX Interrupt, 2 ++ * for TX Interrupt and 3 for MISC Interrupt. ++ */ ++ cpdma_ctlr_eoi(priv->dma, value); + + cpsw_intr_disable(priv); + if (priv->irq_enabled == true) { +@@ -786,8 +794,6 @@ static int cpsw_poll(struct napi_struct *napi, int budget) + int num_tx, num_rx; + + num_tx = cpdma_chan_process(priv->txch, 128); +- if (num_tx) +- cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_TX); + + num_rx = cpdma_chan_process(priv->rxch, budget); + if (num_rx < budget) { +@@ -795,7 +801,6 @@ static int cpsw_poll(struct napi_struct *napi, int budget) + + napi_complete(napi); + cpsw_intr_enable(priv); +- cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX); + prim_cpsw = cpsw_get_slave_priv(priv, 0); + if (prim_cpsw->irq_enabled == false) { + prim_cpsw->irq_enabled = true; +@@ -1310,8 +1315,6 @@ static int cpsw_ndo_open(struct net_device *ndev) + napi_enable(&priv->napi); + cpdma_ctlr_start(priv->dma); + cpsw_intr_enable(priv); +- cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX); +- cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_TX); + + prim_cpsw = cpsw_get_slave_priv(priv, 0); + if (prim_cpsw->irq_enabled == false) { +@@ -1578,9 +1581,6 @@ static void cpsw_ndo_tx_timeout(struct net_device *ndev) + cpdma_chan_start(priv->txch); + cpdma_ctlr_int_ctrl(priv->dma, true); + cpsw_intr_enable(priv); +- cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX); +- cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_TX); +- + } + + static int cpsw_ndo_set_mac_address(struct net_device *ndev, void *p) +@@ -1620,9 +1620,6 @@ static void cpsw_ndo_poll_controller(struct net_device *ndev) + cpsw_interrupt(ndev->irq, priv); + cpdma_ctlr_int_ctrl(priv->dma, true); + cpsw_intr_enable(priv); +- cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX); +- cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_TX); +- + } + #endif + +-- +2.1.4 + diff --git a/patches/fixes/0005-tty-serial-8250-omap-add-ttySx-console-if-the-user-d.patch b/patches/fixes/0005-tty-serial-8250-omap-add-ttySx-console-if-the-user-d.patch new file mode 100644 index 000000000..31f00a618 --- /dev/null +++ b/patches/fixes/0005-tty-serial-8250-omap-add-ttySx-console-if-the-user-d.patch @@ -0,0 +1,101 @@ +From 756e57c6939f67db0b974fbf04396dd1ce108051 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Thu, 18 Dec 2014 18:47:12 +0100 +Subject: [PATCH 5/5] tty: serial: 8250: omap: add ttySx console if the user + didn't + +This patch invokes add_preferred_console() with ttyS based on ttyO +arguments if the user didn't specify it on its own. This ensures that +the user will see the kernel booting on his serial console in case he +forgot to update the command line. + +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + drivers/tty/serial/8250/8250_omap.c | 40 +++++++++++++++++++++++++++++++++++++ + drivers/tty/serial/8250/Kconfig | 19 ++++++++++++++++++ + 2 files changed, 59 insertions(+) + +diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c +index 96b69bf..273f37c 100644 +--- a/drivers/tty/serial/8250/8250_omap.c ++++ b/drivers/tty/serial/8250/8250_omap.c +@@ -1248,6 +1248,46 @@ static int omap8250_runtime_resume(struct device *dev) + } + #endif + ++#ifdef CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP ++static int __init omap8250_console_fixup(void) ++{ ++ char *omap_str; ++ char *options; ++ u8 idx; ++ ++ if (strstr(boot_command_line, "console=ttyS")) ++ /* user set a ttyS based name for the console */ ++ return 0; ++ ++ omap_str = strstr(boot_command_line, "console=ttyO"); ++ if (!omap_str) ++ /* user did not set ttyO based console, so we don't care */ ++ return 0; ++ ++ omap_str += 12; ++ if ('0' <= *omap_str && *omap_str <= '9') ++ idx = *omap_str - '0'; ++ else ++ return 0; ++ ++ omap_str++; ++ if (omap_str[0] == ',') { ++ omap_str++; ++ options = omap_str; ++ } else { ++ options = NULL; ++ } ++ ++ add_preferred_console("ttyS", idx, options); ++ pr_err("WARNING: Your 'console=ttyO%d' has been replaced by 'ttyS%d'\n", ++ idx, idx); ++ pr_err("This ensures that you still see kernel messages. Please\n"); ++ pr_err("update your kernel commandline.\n"); ++ return 0; ++} ++console_initcall(omap8250_console_fixup); ++#endif ++ + static const struct dev_pm_ops omap8250_dev_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(omap8250_suspend, omap8250_resume) + SET_RUNTIME_PM_OPS(omap8250_runtime_suspend, +diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig +index 0fcbcd2..6f7f2d7 100644 +--- a/drivers/tty/serial/8250/Kconfig ++++ b/drivers/tty/serial/8250/Kconfig +@@ -308,6 +308,25 @@ config SERIAL_8250_OMAP + + This driver uses ttyS instead of ttyO. + ++config SERIAL_8250_OMAP_TTYO_FIXUP ++ bool "Replace ttyO with ttyS" ++ depends on SERIAL_8250_OMAP=y && SERIAL_8250_CONSOLE ++ default y ++ help ++ This option replaces the "console=ttyO" argument with the matching ++ ttyS argument if the user did not specified it on the command line. ++ This ensures that the user can see the kernel output during boot ++ which he wouldn't see otherwise. The getty has still to be configured ++ for ttyS instead of ttyO regardless of this option. ++ This option is intended for people who "automatically" enable this ++ driver without knowing that this driver requires a different console= ++ argument. If you read this, please keep this option disabled and ++ instead update your kernel command line. If you prepare a kernel for a ++ distribution or other kind of larger user base then you probably want ++ to keep this option enabled. Otherwise people might complain about a ++ not booting kernel because the serial console remains silent in case ++ they forgot to update the command line. ++ + config SERIAL_8250_FINTEK + tristate "Support for Fintek F81216A LPC to 4 UART" + depends on SERIAL_8250 && PNP +-- +2.1.4 + diff --git a/patches/overlay/0001-OF-DT-Overlay-configfs-interface-v3.patch b/patches/overlay/0001-OF-DT-Overlay-configfs-interface-v3.patch new file mode 100644 index 000000000..bd2efce85 --- /dev/null +++ b/patches/overlay/0001-OF-DT-Overlay-configfs-interface-v3.patch @@ -0,0 +1,433 @@ +From 3c1fd9b9ee811b07c826952d5e96cf94a8980ce6 Mon Sep 17 00:00:00 2001 +From: Pantelis Antoniou <pantelis.antoniou@konsulko.com> +Date: Wed, 3 Dec 2014 13:23:28 +0200 +Subject: [PATCH] OF: DT-Overlay configfs interface (v3) + +Add a runtime interface to using configfs for generic device tree overlay +usage. With it its possible to use device tree overlays without having +to use a per-platform overlay manager. + +Please see Documentation/devicetree/configfs-overlays.txt for more info. + +Changes since v2: +- Removed ifdef CONFIG_OF_OVERLAY (since for now it's required) +- Created a documentation entry +- Slight rewording in Kconfig + +Changes since v1: +- of_resolve() -> of_resolve_phandles(). + +Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> +--- + Documentation/devicetree/configfs-overlays.txt | 31 +++ + drivers/of/Kconfig | 7 + + drivers/of/Makefile | 1 + + drivers/of/configfs.c | 332 +++++++++++++++++++++++++ + 4 files changed, 371 insertions(+) + create mode 100644 Documentation/devicetree/configfs-overlays.txt + create mode 100644 drivers/of/configfs.c + +diff --git a/Documentation/devicetree/configfs-overlays.txt b/Documentation/devicetree/configfs-overlays.txt +new file mode 100644 +index 0000000..5fa43e0 +--- /dev/null ++++ b/Documentation/devicetree/configfs-overlays.txt +@@ -0,0 +1,31 @@ ++Howto use the configfs overlay interface. ++ ++A device-tree configfs entry is created in /config/device-tree/overlays ++and and it is manipulated using standard file system I/O. ++Note that this is a debug level interface, for use by developers and ++not necessarily something accessed by normal users due to the ++security implications of having direct access to the kernel's device tree. ++ ++* To create an overlay you mkdir the directory: ++ ++ # mkdir /config/device-tree/overlays/foo ++ ++* Either you echo the overlay firmware file to the path property file. ++ ++ # echo foo.dtbo >/config/device-tree/overlays/foo/path ++ ++* Or you cat the contents of the overlay to the dtbo file ++ ++ # cat foo.dtbo >/config/device-tree/overlays/foo/dtbo ++ ++The overlay file will be applied, and devices will be created/destroyed ++as required. ++ ++To remove it simply rmdir the directory. ++ ++ # rmdir /config/device-tree/overlays/foo ++ ++The rationalle of the dual interface (firmware & direct copy) is that each is ++better suited to different use patterns. The firmware interface is what's ++intended to be used by hardware managers in the kernel, while the copy interface ++make sense for developers (since it avoids problems with namespaces). +diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig +index b5e0c87..652ac37 100644 +--- a/drivers/of/Kconfig ++++ b/drivers/of/Kconfig +@@ -90,4 +90,11 @@ config OF_OVERLAY + select OF_DYNAMIC + select OF_RESOLVE + ++config OF_CONFIGFS ++ bool "Device Tree Overlay ConfigFS interface" ++ select CONFIGFS_FS ++ select OF_OVERLAY ++ help ++ Enable a simple user-space driven DT overlay interface. ++ + endmenu # OF +diff --git a/drivers/of/Makefile b/drivers/of/Makefile +index 7563f36..6f7f4f8 100644 +--- a/drivers/of/Makefile ++++ b/drivers/of/Makefile +@@ -1,4 +1,5 @@ + obj-y = base.o device.o platform.o ++obj-$(CONFIG_OF_CONFIGFS) += configfs.o + obj-$(CONFIG_OF_DYNAMIC) += dynamic.o + obj-$(CONFIG_OF_FLATTREE) += fdt.o + obj-$(CONFIG_OF_EARLY_FLATTREE) += fdt_address.o +diff --git a/drivers/of/configfs.c b/drivers/of/configfs.c +new file mode 100644 +index 0000000..1434ade +--- /dev/null ++++ b/drivers/of/configfs.c +@@ -0,0 +1,332 @@ ++/* ++ * Configfs entries for device-tree ++ * ++ * Copyright (C) 2013 - Pantelis Antoniou <panto@antoniou-consulting.com> ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version ++ * 2 of the License, or (at your option) any later version. ++ */ ++#include <linux/ctype.h> ++#include <linux/cpu.h> ++#include <linux/module.h> ++#include <linux/of.h> ++#include <linux/of_fdt.h> ++#include <linux/spinlock.h> ++#include <linux/slab.h> ++#include <linux/proc_fs.h> ++#include <linux/configfs.h> ++#include <linux/types.h> ++#include <linux/stat.h> ++#include <linux/limits.h> ++#include <linux/file.h> ++#include <linux/vmalloc.h> ++#include <linux/firmware.h> ++ ++#include "of_private.h" ++ ++struct cfs_overlay_item { ++ struct config_item item; ++ ++ char path[PATH_MAX]; ++ ++ const struct firmware *fw; ++ struct device_node *overlay; ++ int ov_id; ++ ++ void *dtbo; ++ int dtbo_size; ++}; ++ ++static int create_overlay(struct cfs_overlay_item *overlay, void *blob) ++{ ++ int err; ++ ++ /* unflatten the tree */ ++ of_fdt_unflatten_tree(blob, &overlay->overlay); ++ if (overlay->overlay == NULL) { ++ pr_err("%s: failed to unflatten tree\n", __func__); ++ err = -EINVAL; ++ goto out_err; ++ } ++ pr_debug("%s: unflattened OK\n", __func__); ++ ++ /* mark it as detached */ ++ of_node_set_flag(overlay->overlay, OF_DETACHED); ++ ++ /* perform resolution */ ++ err = of_resolve_phandles(overlay->overlay); ++ if (err != 0) { ++ pr_err("%s: Failed to resolve tree\n", __func__); ++ goto out_err; ++ } ++ pr_debug("%s: resolved OK\n", __func__); ++ ++ err = of_overlay_create(overlay->overlay); ++ if (err < 0) { ++ pr_err("%s: Failed to create overlay (err=%d)\n", ++ __func__, err); ++ goto out_err; ++ } ++ overlay->ov_id = err; ++ ++out_err: ++ return err; ++} ++ ++static inline struct cfs_overlay_item *to_cfs_overlay_item( ++ struct config_item *item) ++{ ++ return item ? container_of(item, struct cfs_overlay_item, item) : NULL; ++} ++ ++CONFIGFS_ATTR_STRUCT(cfs_overlay_item); ++#define CFS_OVERLAY_ITEM_ATTR(_name, _mode, _show, _store) \ ++struct cfs_overlay_item_attribute cfs_overlay_item_attr_##_name = \ ++ __CONFIGFS_ATTR(_name, _mode, _show, _store) ++#define CFS_OVERLAY_ITEM_ATTR_RO(_name, _show) \ ++struct cfs_overlay_item_attribute cfs_overlay_item_attr_##_name = \ ++ __CONFIGFS_ATTR_RO(_name, _show) ++ ++CONFIGFS_BIN_ATTR_STRUCT(cfs_overlay_item); ++#define CFS_OVERLAY_ITEM_BIN_ATTR(_name, _mode, _read, _write, _priv, _max) \ ++struct cfs_overlay_item_bin_attribute cfs_overlay_item_bin_attr_##_name = \ ++ __CONFIGFS_BIN_ATTR(_name, _mode, _read, _write, _priv, _max) ++#define CFS_OVERLAY_ITEM_BIN_ATTR_RO(_name, _read, _priv, _max) \ ++struct cfs_overlay_item_bin_attribute cfs_overlay_item_bin_attr_##_name = \ ++ __CONFIGFS_BIN_ATTR_RO(_name, _read, _priv, _max) ++ ++static ssize_t cfs_overlay_item_path_show(struct cfs_overlay_item *overlay, ++ char *page) ++{ ++ return sprintf(page, "%s\n", overlay->path); ++} ++ ++static ssize_t cfs_overlay_item_path_store(struct cfs_overlay_item *overlay, ++ const char *page, size_t count) ++{ ++ const char *p = page; ++ char *s; ++ int err; ++ ++ /* if it's set do not allow changes */ ++ if (overlay->path[0] != '\0' || overlay->dtbo_size > 0) ++ return -EPERM; ++ ++ /* copy to path buffer (and make sure it's always zero terminated */ ++ count = snprintf(overlay->path, sizeof(overlay->path) - 1, "%s", p); ++ overlay->path[sizeof(overlay->path) - 1] = '\0'; ++ ++ /* strip trailing newlines */ ++ s = overlay->path + strlen(overlay->path); ++ while (s > overlay->path && *--s == '\n') ++ *s = '\0'; ++ ++ pr_debug("%s: path is '%s'\n", __func__, overlay->path); ++ ++ err = request_firmware(&overlay->fw, overlay->path, NULL); ++ if (err != 0) ++ goto out_err; ++ ++ err = create_overlay(overlay, (void *)overlay->fw->data); ++ if (err != 0) ++ goto out_err; ++ ++ return count; ++ ++out_err: ++ ++ release_firmware(overlay->fw); ++ overlay->fw = NULL; ++ ++ overlay->path[0] = '\0'; ++ return err; ++} ++ ++static ssize_t cfs_overlay_item_status_show(struct cfs_overlay_item *overlay, ++ char *page) ++{ ++ return sprintf(page, "%s\n", ++ overlay->ov_id >= 0 ? "applied" : "unapplied"); ++} ++ ++CFS_OVERLAY_ITEM_ATTR(path, S_IRUGO | S_IWUSR, ++ cfs_overlay_item_path_show, cfs_overlay_item_path_store); ++CFS_OVERLAY_ITEM_ATTR_RO(status, cfs_overlay_item_status_show); ++ ++static struct configfs_attribute *cfs_overlay_attrs[] = { ++ &cfs_overlay_item_attr_path.attr, ++ &cfs_overlay_item_attr_status.attr, ++ NULL, ++}; ++ ++ssize_t cfs_overlay_item_dtbo_read(struct cfs_overlay_item *overlay, ++ void *buf, size_t max_count) ++{ ++ pr_debug("%s: buf=%p max_count=%u\n", __func__, ++ buf, max_count); ++ ++ if (overlay->dtbo == NULL) ++ return 0; ++ ++ /* copy if buffer provided */ ++ if (buf != NULL) { ++ /* the buffer must be large enough */ ++ if (overlay->dtbo_size > max_count) ++ return -ENOSPC; ++ ++ memcpy(buf, overlay->dtbo, overlay->dtbo_size); ++ } ++ ++ return overlay->dtbo_size; ++} ++ ++ssize_t cfs_overlay_item_dtbo_write(struct cfs_overlay_item *overlay, ++ const void *buf, size_t count) ++{ ++ int err; ++ ++ /* if it's set do not allow changes */ ++ if (overlay->path[0] != '\0' || overlay->dtbo_size > 0) ++ return -EPERM; ++ ++ /* copy the contents */ ++ overlay->dtbo = kmemdup(buf, count, GFP_KERNEL); ++ if (overlay->dtbo == NULL) ++ return -ENOMEM; ++ ++ overlay->dtbo_size = count; ++ ++ err = create_overlay(overlay, overlay->dtbo); ++ if (err != 0) ++ goto out_err; ++ ++ return count; ++ ++out_err: ++ kfree(overlay->dtbo); ++ overlay->dtbo = NULL; ++ overlay->dtbo_size = 0; ++ ++ return err; ++} ++ ++CFS_OVERLAY_ITEM_BIN_ATTR(dtbo, S_IRUGO | S_IWUSR, ++ cfs_overlay_item_dtbo_read, cfs_overlay_item_dtbo_write, ++ NULL, SZ_1M); ++ ++static struct configfs_bin_attribute *cfs_overlay_bin_attrs[] = { ++ &cfs_overlay_item_bin_attr_dtbo.bin_attr, ++ NULL, ++}; ++ ++static void cfs_overlay_release(struct config_item *item) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ ++ if (overlay->ov_id >= 0) ++ of_overlay_destroy(overlay->ov_id); ++ if (overlay->fw) ++ release_firmware(overlay->fw); ++ /* kfree with NULL is safe */ ++ kfree(overlay->dtbo); ++ kfree(overlay); ++} ++ ++CONFIGFS_ATTR_OPS(cfs_overlay_item); ++CONFIGFS_BIN_ATTR_OPS(cfs_overlay_item); ++static struct configfs_item_operations cfs_overlay_item_ops = { ++ .release = cfs_overlay_release, ++ .show_attribute = cfs_overlay_item_attr_show, ++ .store_attribute = cfs_overlay_item_attr_store, ++ .read_bin_attribute = cfs_overlay_item_bin_attr_read, ++ .write_bin_attribute = cfs_overlay_item_bin_attr_write, ++}; ++ ++static struct config_item_type cfs_overlay_type = { ++ .ct_item_ops = &cfs_overlay_item_ops, ++ .ct_attrs = cfs_overlay_attrs, ++ .ct_bin_attrs = cfs_overlay_bin_attrs, ++ .ct_owner = THIS_MODULE, ++}; ++ ++static struct config_item *cfs_overlay_group_make_item( ++ struct config_group *group, const char *name) ++{ ++ struct cfs_overlay_item *overlay; ++ ++ overlay = kzalloc(sizeof(*overlay), GFP_KERNEL); ++ if (!overlay) ++ return ERR_PTR(-ENOMEM); ++ overlay->ov_id = -1; ++ ++ config_item_init_type_name(&overlay->item, name, &cfs_overlay_type); ++ return &overlay->item; ++} ++ ++static void cfs_overlay_group_drop_item(struct config_group *group, ++ struct config_item *item) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ ++ config_item_put(&overlay->item); ++} ++ ++static struct configfs_group_operations overlays_ops = { ++ .make_item = cfs_overlay_group_make_item, ++ .drop_item = cfs_overlay_group_drop_item, ++}; ++ ++static struct config_item_type overlays_type = { ++ .ct_group_ops = &overlays_ops, ++ .ct_owner = THIS_MODULE, ++}; ++ ++static struct configfs_group_operations of_cfs_ops = { ++ /* empty - we don't allow anything to be created */ ++}; ++ ++static struct config_item_type of_cfs_type = { ++ .ct_group_ops = &of_cfs_ops, ++ .ct_owner = THIS_MODULE, ++}; ++ ++struct config_group of_cfs_overlay_group; ++ ++struct config_group *of_cfs_def_groups[] = { ++ &of_cfs_overlay_group, ++ NULL ++}; ++ ++static struct configfs_subsystem of_cfs_subsys = { ++ .su_group = { ++ .cg_item = { ++ .ci_namebuf = "device-tree", ++ .ci_type = &of_cfs_type, ++ }, ++ .default_groups = of_cfs_def_groups, ++ }, ++ .su_mutex = __MUTEX_INITIALIZER(of_cfs_subsys.su_mutex), ++}; ++ ++static int __init of_cfs_init(void) ++{ ++ int ret; ++ ++ pr_info("%s\n", __func__); ++ ++ config_group_init(&of_cfs_subsys.su_group); ++ config_group_init_type_name(&of_cfs_overlay_group, "overlays", ++ &overlays_type); ++ ++ ret = configfs_register_subsystem(&of_cfs_subsys); ++ if (ret != 0) { ++ pr_err("%s: failed to register subsys\n", __func__); ++ goto out; ++ } ++ pr_info("%s: OK\n", __func__); ++out: ++ return ret; ++} ++late_initcall(of_cfs_init); +-- +2.1.4 + diff --git a/patches/ref_omap2plus_defconfig b/patches/ref_omap2plus_defconfig index 65f04fea1..9f8f50355 100644 --- a/patches/ref_omap2plus_defconfig +++ b/patches/ref_omap2plus_defconfig @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm 3.19.0-rc2 Kernel Configuration +# Linux/arm 3.19.0-rc3 Kernel Configuration # CONFIG_ARM=y CONFIG_ARM_HAS_SG_CHAIN=y @@ -930,6 +930,7 @@ CONFIG_CFG80211=m CONFIG_CFG80211_DEFAULT_PS=y # CONFIG_CFG80211_DEBUGFS is not set # CONFIG_CFG80211_INTERNAL_REGDB is not set +# CONFIG_CFG80211_WEXT is not set CONFIG_LIB80211=m # CONFIG_LIB80211_DEBUG is not set CONFIG_MAC80211=m diff --git a/repo_maintenance/push-merge-to-sha.sh b/repo_maintenance/push-merge-to-sha.sh index 6e6531e10..7d50935b0 100755 --- a/repo_maintenance/push-merge-to-sha.sh +++ b/repo_maintenance/push-merge-to-sha.sh @@ -13,7 +13,7 @@ if [ -e ${DIR}/version.sh ]; then BRANCH="master" fi - git commit -a -m "merge to: ${repo}/${KERNEL_SHA}" -m "Compare: ${compare}/${prev_KERNEL_SHA}...${KERNEL_SHA}" -s + git commit -a -m "${BUILD}: merge to: ${repo}/${KERNEL_SHA}" -m "Compare: ${compare}/${prev_KERNEL_SHA}...${KERNEL_SHA}" -s git push origin ${BRANCH} fi diff --git a/tools/stable-config-checker.sh b/tools/stable-config-checker.sh index 3e611360c..f910e7630 100755 --- a/tools/stable-config-checker.sh +++ b/tools/stable-config-checker.sh @@ -55,5 +55,4 @@ config="CONFIG_HID_LOGITECH_DJ" ; config_enable config="CONFIG_CAN_C_CAN" ; config_module config="CONFIG_CAN_C_CAN_PLATFORM" ; config_module - # diff --git a/version.sh b/version.sh index 4f537a4b6..24efcfd68 100644 --- a/version.sh +++ b/version.sh @@ -26,8 +26,8 @@ toolchain="gcc_linaro_gnueabihf_4_9" #Kernel/Build KERNEL_REL=3.19 -KERNEL_TAG=${KERNEL_REL}-rc2 -BUILD=bone0.1 +KERNEL_TAG=${KERNEL_REL}-rc3 +BUILD=bone1 #v3.X-rcX + upto SHA #KERNEL_SHA="" -- GitLab