[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.3-602-g284dabf
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2015-02-17 18:49:50
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 284dabfa6fd4e4f98346b78a4f8b0ef15f163e90 (commit)
via b7a40eeb8bb42e07121b21f88fadbad501f15fa5 (commit)
from feca58933b2ffe4936d3bc18fe91545f06b03c74 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 284dabfa6fd4e4f98346b78a4f8b0ef15f163e90
Author: Gaetan Hug <gh...@in...>
Date: Tue Feb 17 17:46:28 2015 +0100
[LINUX] 3.18+: APF28: fixes bug in PWM period computation
commit b7a40eeb8bb42e07121b21f88fadbad501f15fa5
Author: Julien Boibessot <jul...@ar...>
Date: Tue Feb 17 16:56:24 2015 +0100
[LINUX] all board: move 3.18 support to 3.18.7
-----------------------------------------------------------------------
Summary of changes:
buildroot/configs/apf27mainline_defconfig | 4 +-
buildroot/configs/apf28mainline_defconfig | 4 +-
buildroot/configs/apf51mainline_defconfig | 4 +-
...nux-3.18.5.config => apf27-linux-3.18.7.config} | 0
...nux-3.18.5.config => apf28-linux-3.18.7.config} | 0
...nux-3.18.5.config => apf51-linux-3.18.7.config} | 0
...inux-3.18.3.config => apf6-linux-3.18.7.config} | 0
patches/linux/{3.18.5 => 3.18.7} | 0
...g-pwm-mxs-fixes-bug-in-period-computation.patch | 56 ++++++++++++++++++++
...g-pwm-mxs-fixes-bug-in-period-computation.patch | 56 ++++++++++++++++++++
10 files changed, 118 insertions(+), 6 deletions(-)
rename buildroot/target/device/armadeus/apf27/{apf27-linux-3.18.5.config => apf27-linux-3.18.7.config} (100%)
rename buildroot/target/device/armadeus/apf28/{apf28-linux-3.18.5.config => apf28-linux-3.18.7.config} (100%)
rename buildroot/target/device/armadeus/apf51/{apf51-linux-3.18.5.config => apf51-linux-3.18.7.config} (100%)
rename buildroot/target/device/armadeus/apf6/{apf6-linux-3.18.3.config => apf6-linux-3.18.7.config} (100%)
rename patches/linux/{3.18.5 => 3.18.7} (100%)
create mode 100644 patches/linux/3.18/0447-induct-hug-pwm-mxs-fixes-bug-in-period-computation.patch
create mode 100644 patches/linux/3.19/0447-induct-hug-pwm-mxs-fixes-bug-in-period-computation.patch
diff --git a/buildroot/configs/apf27mainline_defconfig b/buildroot/configs/apf27mainline_defconfig
index 1e42fde..3f9f215 100644
--- a/buildroot/configs/apf27mainline_defconfig
+++ b/buildroot/configs/apf27mainline_defconfig
@@ -6,7 +6,7 @@ BR2_CCACHE=y
BR2_CCACHE_DIR="$(TOPDIR)/.$(BR2_BOARD_NAME)-buildroot-ccache"
BR2_STRIP_sstrip=y
BR2_KERNEL_HEADERS_VERSION=y
-BR2_DEFAULT_KERNEL_VERSION="3.18.5"
+BR2_DEFAULT_KERNEL_VERSION="3.18.7"
BR2_UCLIBC_CONFIG="target/device/armadeus/uClibc-$(BR2_UCLIBC_VERSION_STRING).config"
BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
@@ -34,7 +34,7 @@ BR2_BOARD_NAME="apf27"
BR2_CPU_NAME="imx27"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.5"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.7"
BR2_LINUX_KERNEL_PATCH="../patches/linux/$(BR2_LINUX_KERNEL_VERSION)"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_BOARD_PATH)/$(BR2_BOARD_NAME)-linux-$(BR2_LINUX_KERNEL_VERSION).config"
diff --git a/buildroot/configs/apf28mainline_defconfig b/buildroot/configs/apf28mainline_defconfig
index b116a53..177b113 100644
--- a/buildroot/configs/apf28mainline_defconfig
+++ b/buildroot/configs/apf28mainline_defconfig
@@ -6,7 +6,7 @@ BR2_CCACHE=y
BR2_CCACHE_DIR="$(TOPDIR)/.$(BR2_BOARD_NAME)-buildroot-ccache"
BR2_STRIP_sstrip=y
BR2_KERNEL_HEADERS_VERSION=y
-BR2_DEFAULT_KERNEL_VERSION="3.18.5"
+BR2_DEFAULT_KERNEL_VERSION="3.18.7"
BR2_UCLIBC_CONFIG="target/device/armadeus/uClibc-$(BR2_UCLIBC_VERSION_STRING).config"
BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
@@ -35,7 +35,7 @@ BR2_CPU_NAME="imx28"
BR2_TARGET_ARMADEUS_SDRAM_SIZE="128"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.5"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.7"
BR2_LINUX_KERNEL_PATCH="../patches/linux/$(BR2_LINUX_KERNEL_VERSION)"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_BOARD_PATH)/$(BR2_BOARD_NAME)-linux-$(BR2_LINUX_KERNEL_VERSION).config"
diff --git a/buildroot/configs/apf51mainline_defconfig b/buildroot/configs/apf51mainline_defconfig
index b2c3f31..223901b 100644
--- a/buildroot/configs/apf51mainline_defconfig
+++ b/buildroot/configs/apf51mainline_defconfig
@@ -7,7 +7,7 @@ BR2_CCACHE=y
BR2_CCACHE_DIR="$(TOPDIR)/.$(BR2_BOARD_NAME)-buildroot-ccache"
BR2_STRIP_sstrip=y
BR2_KERNEL_HEADERS_VERSION=y
-BR2_DEFAULT_KERNEL_VERSION="3.18.5"
+BR2_DEFAULT_KERNEL_VERSION="3.18.7"
BR2_UCLIBC_CONFIG="target/device/armadeus/uClibc-$(BR2_UCLIBC_VERSION_STRING).config"
BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
@@ -97,7 +97,7 @@ BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="$(ARMADEUS_PATH)/u-boot-env-2013.04.txt"
BR2_TARGET_UBOOT_ENVIMAGE_SIZE="0x20000"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.5"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.7"
BR2_LINUX_KERNEL_PATCH="../patches/linux/$(BR2_LINUX_KERNEL_VERSION)"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_BOARD_PATH)/$(BR2_BOARD_NAME)-linux-$(BR2_LINUX_KERNEL_VERSION).config"
diff --git a/buildroot/target/device/armadeus/apf27/apf27-linux-3.18.5.config b/buildroot/target/device/armadeus/apf27/apf27-linux-3.18.7.config
similarity index 100%
rename from buildroot/target/device/armadeus/apf27/apf27-linux-3.18.5.config
rename to buildroot/target/device/armadeus/apf27/apf27-linux-3.18.7.config
diff --git a/buildroot/target/device/armadeus/apf28/apf28-linux-3.18.5.config b/buildroot/target/device/armadeus/apf28/apf28-linux-3.18.7.config
similarity index 100%
rename from buildroot/target/device/armadeus/apf28/apf28-linux-3.18.5.config
rename to buildroot/target/device/armadeus/apf28/apf28-linux-3.18.7.config
diff --git a/buildroot/target/device/armadeus/apf51/apf51-linux-3.18.5.config b/buildroot/target/device/armadeus/apf51/apf51-linux-3.18.7.config
similarity index 100%
rename from buildroot/target/device/armadeus/apf51/apf51-linux-3.18.5.config
rename to buildroot/target/device/armadeus/apf51/apf51-linux-3.18.7.config
diff --git a/buildroot/target/device/armadeus/apf6/apf6-linux-3.18.3.config b/buildroot/target/device/armadeus/apf6/apf6-linux-3.18.7.config
similarity index 100%
rename from buildroot/target/device/armadeus/apf6/apf6-linux-3.18.3.config
rename to buildroot/target/device/armadeus/apf6/apf6-linux-3.18.7.config
diff --git a/patches/linux/3.18.5 b/patches/linux/3.18.7
similarity index 100%
rename from patches/linux/3.18.5
rename to patches/linux/3.18.7
diff --git a/patches/linux/3.18/0447-induct-hug-pwm-mxs-fixes-bug-in-period-computation.patch b/patches/linux/3.18/0447-induct-hug-pwm-mxs-fixes-bug-in-period-computation.patch
new file mode 100644
index 0000000..453edad
--- /dev/null
+++ b/patches/linux/3.18/0447-induct-hug-pwm-mxs-fixes-bug-in-period-computation.patch
@@ -0,0 +1,56 @@
+Date: Tue, 27 Jan 2015 14:37:42 +0100
+From: Gaetan Hug <gh...@in...>
+To: Armadeus Forum ML <arm...@li...>,
+ <lin...@vg...>
+Subject: [Armadeus-forum] Found bug in pwm-mxs.c
+
+Hello folks,
+
+ I found a bug in the pwm-mxs.c driver for the i.MX28 platform.
+
+ The driver computes from the desired period which clock divider it
+should be using. This computation assumes that the link between the
+register value and the actual divider value is raising 2 to the power of
+the registry value.
+
+ div = 1 << regvalue
+
+ This is true only for the first 5 values out of 8. Next values are
+64, 256 and, 1024.
+ This affects only the user only if he requests a period > 0.04369s.
+ I solved this by replacing the computation of the divider value with
+a lookup table.
+
+ If I should provide it in a different manner for it to be included in
+the kernel, please let me know.
+
+Best regards
+
+Gaetan Hug
+
+------
+
+Index: linux-3.18.5/drivers/pwm/pwm-mxs.c
+===================================================================
+--- linux-3.18.5.orig/drivers/pwm/pwm-mxs.c 2015-01-30 02:41:03.000000000 +0100
++++ linux-3.18.5/drivers/pwm/pwm-mxs.c 2015-02-17 17:14:54.082954410 +0100
+@@ -51,16 +51,17 @@
+ unsigned int period_cycles, duty_cycles;
+ unsigned long rate;
+ unsigned long long c;
++ unsigned const int cdiv[PERIOD_CDIV_MAX] = {1, 2, 4, 8, 16, 64, 256, 1024};
+
+ rate = clk_get_rate(mxs->clk);
+ while (1) {
+- c = rate / (1 << div);
++ c = rate / cdiv[div];
+ c = c * period_ns;
+ do_div(c, 1000000000);
+ if (c < PERIOD_PERIOD_MAX)
+ break;
+ div++;
+- if (div > PERIOD_CDIV_MAX)
++ if (div >= PERIOD_CDIV_MAX)
+ return -EINVAL;
+ }
+
diff --git a/patches/linux/3.19/0447-induct-hug-pwm-mxs-fixes-bug-in-period-computation.patch b/patches/linux/3.19/0447-induct-hug-pwm-mxs-fixes-bug-in-period-computation.patch
new file mode 100644
index 0000000..453edad
--- /dev/null
+++ b/patches/linux/3.19/0447-induct-hug-pwm-mxs-fixes-bug-in-period-computation.patch
@@ -0,0 +1,56 @@
+Date: Tue, 27 Jan 2015 14:37:42 +0100
+From: Gaetan Hug <gh...@in...>
+To: Armadeus Forum ML <arm...@li...>,
+ <lin...@vg...>
+Subject: [Armadeus-forum] Found bug in pwm-mxs.c
+
+Hello folks,
+
+ I found a bug in the pwm-mxs.c driver for the i.MX28 platform.
+
+ The driver computes from the desired period which clock divider it
+should be using. This computation assumes that the link between the
+register value and the actual divider value is raising 2 to the power of
+the registry value.
+
+ div = 1 << regvalue
+
+ This is true only for the first 5 values out of 8. Next values are
+64, 256 and, 1024.
+ This affects only the user only if he requests a period > 0.04369s.
+ I solved this by replacing the computation of the divider value with
+a lookup table.
+
+ If I should provide it in a different manner for it to be included in
+the kernel, please let me know.
+
+Best regards
+
+Gaetan Hug
+
+------
+
+Index: linux-3.18.5/drivers/pwm/pwm-mxs.c
+===================================================================
+--- linux-3.18.5.orig/drivers/pwm/pwm-mxs.c 2015-01-30 02:41:03.000000000 +0100
++++ linux-3.18.5/drivers/pwm/pwm-mxs.c 2015-02-17 17:14:54.082954410 +0100
+@@ -51,16 +51,17 @@
+ unsigned int period_cycles, duty_cycles;
+ unsigned long rate;
+ unsigned long long c;
++ unsigned const int cdiv[PERIOD_CDIV_MAX] = {1, 2, 4, 8, 16, 64, 256, 1024};
+
+ rate = clk_get_rate(mxs->clk);
+ while (1) {
+- c = rate / (1 << div);
++ c = rate / cdiv[div];
+ c = c * period_ns;
+ do_div(c, 1000000000);
+ if (c < PERIOD_PERIOD_MAX)
+ break;
+ div++;
+- if (div > PERIOD_CDIV_MAX)
++ if (div >= PERIOD_CDIV_MAX)
+ return -EINVAL;
+ }
+
hooks/post-receive
--
armadeus
|