[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.2-173-g371e4f9
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2013-02-20 17:09:10
|
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 371e4f951c6192871fe08dce9c5a720259aa2823 (commit)
via 5657811c1da3ff2be7fa32f762ee79322b78bd86 (commit)
via a3c08d3d79af531e8c9e6f158e894341c917cc1e (commit)
via b9e953ee959d652b101de72e488e2ee63f284d2e (commit)
from 8de958524a0dc607c524137ca564794775392902 (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 371e4f951c6192871fe08dce9c5a720259aa2823
Author: Julien Boibessot <jul...@ar...>
Date: Wed Feb 20 18:07:30 2013 +0100
[TEST] Factorize PWM test instructions and make it usable on non APFxxDev platforms
commit 5657811c1da3ff2be7fa32f762ee79322b78bd86
Author: Julien Boibessot <jul...@ar...>
Date: Wed Feb 20 18:05:24 2013 +0100
[LINUX] Fixes Armadeus custom PWM driver build with recent kernels
commit a3c08d3d79af531e8c9e6f158e894341c917cc1e
Author: Julien Boibessot <jul...@ar...>
Date: Wed Feb 20 18:02:21 2013 +0100
[LINUX] 3.8 is out
commit b9e953ee959d652b101de72e488e2ee63f284d2e
Author: Julien Boibessot <jul...@ar...>
Date: Wed Feb 20 17:58:28 2013 +0100
[LINUX] Fixes fpga_irq_mngr build with 3.7.9+ kernels
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf27/apf27-linux-3.8-rc6.config | 1 -
.../armadeus/apf28/apf28-linux-3.8-rc6.config | 1 -
.../armadeus/apf51/apf51-linux-3.8-rc6.config | 1 -
.../armadeus/apf9328/apf9328-linux-3.8-rc6.config | 1 -
patches/linux/3.8-rc6 | 1 -
.../fpga/virtual_components/irq_mngr/main.c | 4 +-
target/linux/modules/pwm/pwm.c | 28 +++++++++++--------
target/test/test_pwm.sh | 25 +++++++++++------
8 files changed, 34 insertions(+), 28 deletions(-)
delete mode 120000 buildroot/target/device/armadeus/apf27/apf27-linux-3.8-rc6.config
delete mode 120000 buildroot/target/device/armadeus/apf28/apf28-linux-3.8-rc6.config
delete mode 120000 buildroot/target/device/armadeus/apf51/apf51-linux-3.8-rc6.config
delete mode 120000 buildroot/target/device/armadeus/apf9328/apf9328-linux-3.8-rc6.config
delete mode 120000 patches/linux/3.8-rc6
diff --git a/buildroot/target/device/armadeus/apf27/apf27-linux-3.8-rc6.config b/buildroot/target/device/armadeus/apf27/apf27-linux-3.8-rc6.config
deleted file mode 120000
index f72e685..0000000
--- a/buildroot/target/device/armadeus/apf27/apf27-linux-3.8-rc6.config
+++ /dev/null
@@ -1 +0,0 @@
-apf27-linux-3.8.config
\ No newline at end of file
diff --git a/buildroot/target/device/armadeus/apf28/apf28-linux-3.8-rc6.config b/buildroot/target/device/armadeus/apf28/apf28-linux-3.8-rc6.config
deleted file mode 120000
index 9893aa9..0000000
--- a/buildroot/target/device/armadeus/apf28/apf28-linux-3.8-rc6.config
+++ /dev/null
@@ -1 +0,0 @@
-apf28-linux-3.8.config
\ No newline at end of file
diff --git a/buildroot/target/device/armadeus/apf51/apf51-linux-3.8-rc6.config b/buildroot/target/device/armadeus/apf51/apf51-linux-3.8-rc6.config
deleted file mode 120000
index 08e79a8..0000000
--- a/buildroot/target/device/armadeus/apf51/apf51-linux-3.8-rc6.config
+++ /dev/null
@@ -1 +0,0 @@
-apf51-linux-3.8.config
\ No newline at end of file
diff --git a/buildroot/target/device/armadeus/apf9328/apf9328-linux-3.8-rc6.config b/buildroot/target/device/armadeus/apf9328/apf9328-linux-3.8-rc6.config
deleted file mode 120000
index 7c15277..0000000
--- a/buildroot/target/device/armadeus/apf9328/apf9328-linux-3.8-rc6.config
+++ /dev/null
@@ -1 +0,0 @@
-apf9328-linux-3.8.config
\ No newline at end of file
diff --git a/patches/linux/3.8-rc6 b/patches/linux/3.8-rc6
deleted file mode 120000
index 98fccd6..0000000
--- a/patches/linux/3.8-rc6
+++ /dev/null
@@ -1 +0,0 @@
-3.8
\ No newline at end of file
diff --git a/target/linux/modules/fpga/virtual_components/irq_mngr/main.c b/target/linux/modules/fpga/virtual_components/irq_mngr/main.c
index 8d5cba2..1be5fb3 100644
--- a/target/linux/modules/fpga/virtual_components/irq_mngr/main.c
+++ b/target/linux/modules/fpga/virtual_components/irq_mngr/main.c
@@ -36,7 +36,7 @@
#endif
#include <linux/irq.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,9)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
# include <mach/hardware.h>
# include <mach/irqs.h>
#endif
@@ -47,7 +47,7 @@
#include "irq_mng.h"
#ifndef CONFIG_MACH_APF9328
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,9)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
# include <mach/fpga.h> /* To remove when MX1 platform is merged */
#else
# include <linux/../../arch/arm/mach-imx/fpga.h>
diff --git a/target/linux/modules/pwm/pwm.c b/target/linux/modules/pwm/pwm.c
index 877aca7..697d5bc 100644
--- a/target/linux/modules/pwm/pwm.c
+++ b/target/linux/modules/pwm/pwm.c
@@ -33,7 +33,7 @@
#include <linux/fcntl.h>
#include <linux/interrupt.h>
#include <asm/io.h>
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,7,9)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
#include <mach/hardware.h>
#include <linux/sysdev.h>
#endif
@@ -52,7 +52,7 @@
#include "pwm.h"
-#if defined(CONFIG_ARCH_MX2) || defined(CONFIG_ARCH_MX5)
+#if defined(CONFIG_ARCH_MX2) || defined(CONFIG_SOC_IMX27) || defined(CONFIG_ARCH_MX5)
#define PWMCTRL (0x00)
#define PWMSTATUS (0x04)
#define PWMIRQ (0x08)
@@ -63,7 +63,7 @@
#define PWM_IRQEN (1<<0)
#define PWM_SWR (1<<3)
#define PWM_CLKSRC_MASK (3<<16)
-#if defined(CONFIG_ARCH_MX2)
+#if defined(CONFIG_ARCH_MX2) || defined(CONFIG_SOC_IMX27)
#define PWM_CLKSRC_IPG (2<<16)
#else
#define PWM_CLKSRC_IPG (1<<16)
@@ -83,7 +83,7 @@
#define PWM_PERIOD(x) ((x) & 0xFFFF)
#define PWM_SAMPLE(x) ((x) & 0xFFFF)
#define PWM_INT MXC_INT_PWM
-#if defined(CONFIG_ARCH_MX2)
+#if defined(CONFIG_ARCH_MX2) || defined(CONFIG_SOC_IMX27)
# define PWM_MAX_DEV 1
#else
# define PWM_MAX_DEV 2
@@ -126,8 +126,10 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
#define DRIVER_NAME "imx-pwm"
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
#define DRIVER_NAME "mxc_pwm"
+#else
+#define DRIVER_NAME "imx27-pwm"
#endif
#define DRIVER_VERSION "0.81"
@@ -224,7 +226,7 @@ static int get_current_pwm_clk_rate(struct pwm_device *pwm)
{
if ((readl(pwm->membase + PWMCTRL) & PWM_CLKSRC_MASK) == PWM_CLKSRC_32K)
return 32768;
-#if defined(CONFIG_ARCH_MX2) || defined(CONFIG_ARCH_MX5)
+#if defined(CONFIG_ARCH_MX2) || defined(CONFIG_SOC_IMX27) || defined(CONFIG_ARCH_MX5)
return clk_get_rate(pwm->clk);
#else
return 8000000;
@@ -486,7 +488,7 @@ int pwm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
break;
}*/
write_bits(PWM_CLKSRC_IPG, PWM_CLKSRC_MASK, pwm->membase + PWMCTRL);
-#if defined(CONFIG_ARCH_MX2) || defined(CONFIG_ARCH_MX5)
+#if defined(CONFIG_ARCH_MX2) || defined(CONFIG_SOC_IMX27) || defined(CONFIG_ARCH_MX5)
write_bits(PWM_PRESCALER(2), PWM_PRESCALER_MASK, pwm->membase + PWMCTRL);
#else
write_bits(PWM_PRESCALER(1), PWM_PRESCALER_MASK, pwm->membase + PWMCTRL);
@@ -804,14 +806,14 @@ static DEVICE_ATTR(active, S_IWUSR | S_IRUGO, pwm_show_state, pwm_store_state);
*/
static irqreturn_t pwm_interrupt(int irq, void *dev_id)
{
-#if !defined(CONFIG_ARCH_MX2) && !defined(CONFIG_ARCH_MX5)
+#if !defined(CONFIG_ARCH_MX2) && !defined(CONFIG_SOC_IMX27) && !defined(CONFIG_ARCH_MX5)
u32 status = 0;
#endif
int remaining = 0;
struct pwm_device *pwm = (struct pwm_device *) dev_id;
/* Acknowledge interrupt */
-#if defined(CONFIG_ARCH_MX2) || defined(CONFIG_ARCH_MX5)
+#if defined(CONFIG_ARCH_MX2) || defined(CONFIG_SOC_IMX27) || defined(CONFIG_ARCH_MX5)
write_bits(PWM_FIFO_EMPTY, PWM_FIFO_EMPTY, pwm->membase + PWMSTATUS);
#else
status = readl(pwm->membase + PWMSTATUS);
@@ -846,7 +848,7 @@ static irqreturn_t pwm_interrupt(int irq, void *dev_id)
writel((u32)(get_byte_from_circbuf(&pwm->circ_buf)), pwm->membase + PWMSAMPLE);
writel((u32)(get_byte_from_circbuf(&pwm->circ_buf)), pwm->membase + PWMSAMPLE);
writel((u32)(get_byte_from_circbuf(&pwm->circ_buf)), pwm->membase + PWMSAMPLE);
-#if defined(CONFIG_ARCH_MX2) || defined(CONFIG_ARCH_MX5)
+#if defined(CONFIG_ARCH_MX2) || defined(CONFIG_SOC_IMX27) || defined(CONFIG_ARCH_MX5)
if ((readl(pwm->membase + PWMSTATUS) & PWM_FIFOAV) == 3) { /* TODO: verify if needed */
writel((u32)(get_byte_from_circbuf(&pwm->circ_buf)), pwm->membase + PWMSAMPLE);
}
@@ -987,11 +989,13 @@ static int imx_pwm_drv_probe(struct platform_device *pdev)
goto error_file;
}
-#if defined(CONFIG_ARCH_MX2) || defined(CONFIG_ARCH_MX5)
+#if defined(CONFIG_ARCH_MX2) || defined(CONFIG_SOC_IMX27) || defined(CONFIG_ARCH_MX5)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
pwm->clk = clk_get(&pdev->dev, "pwm_clk");
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
pwm->clk = clk_get(&pdev->dev, "pwm");
+#else
+ pwm->clk = clk_get(&pdev->dev, "per");
#endif
if (IS_ERR(pwm->clk)) {
dev_err(&pdev->dev, "can't get clock\n");
diff --git a/target/test/test_pwm.sh b/target/test/test_pwm.sh
index 8f8e628..f553de2 100755
--- a/target/test/test_pwm.sh
+++ b/target/test/test_pwm.sh
@@ -3,7 +3,7 @@
#
# Script to test Armadeus Software release
#
-# Copyright (C) 2010-2012 The Armadeus Project - Armadeus Systems
+# Copyright (C) 2010-2013 The Armadeus Project - Armadeus Systems
#
# 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
@@ -47,17 +47,20 @@ load_driver()
prepare_test()
{
+ OSCILLO="Please connect your oscilloscope probe"
+ WHEN_READY="then press ENTER when ready"
if [ "$1" == "APF9328" ]; then
- ask_user "Please connect your oscilloscope probe to pin 4 of X21/Timer connector (GND is on pin 8), then press ENTER when ready"
+ PLAT_MSG="to pin 4 of X21/Timer connector (GND is on pin 8)"
elif [ "$1" == "APF27" ]; then
- ask_user "Please connect your oscilloscope probe to pin 4 of J22 connector (GND is on pin 6 or 40), then press ENTER when ready"
+ PLAT_MSG="to pin 4 of J22 connector (GND is on pin 6 or 40)"
elif [ "$1" == "APF51" ]; then
- ask_user "Please connect your oscilloscope probe to pin 6 of J35 (Extension) connector (GND is on pin 9 or 10), then press ENTER when ready\n (you can also watch i.MX LED; requires a custom built kernel)"
+ PLAT_MSG="to pin 6 of J35 (Extension) connector (GND is on pin 9 or 10)"
+ EXTRA_PLAT_MSG="\n (you can also watch i.MX LED; requires a custom built kernel)"
elif [ "$1" == "APF28" ]; then
- ask_user "Please connect your oscilloscope probe to pin 26 of J10 connector (GND is on pin 32 or 34), then press ENTER when ready"
- else
- echo "Platform not supported by this test"
+ PLAT_MSG="to pin 26 of J10 connector (GND is on pin 32 or 34)"
fi
+
+ ask_user "$OSCILLO $PLAT_MSG, $WHEN_READY $EXTRA_PLAT_MSG"
}
test_pwm()
@@ -66,7 +69,11 @@ test_pwm()
execute_for_target load_driver
- execute_for_target prepare_test
+ if [ "$1" != "" ]; then
+ prepare_test $1
+ else
+ execute_for_target prepare_test
+ fi
ask_user "Press ENTER when ready to check PWM output (frequencies starting at 100Hz)"
echo 1 > $SYS_DIR/active
@@ -108,5 +115,5 @@ test_pwm()
exit 0
}
-test_pwm
+test_pwm $1
hooks/post-receive
--
armadeus
|