[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.1-339-g2683f8b
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2012-06-03 18:33:46
|
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 2683f8b966834c1e2a632de99b1c138ebd1f853a (commit)
from 009939f74d84757013559aa1f21d9e164179538d (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 2683f8b966834c1e2a632de99b1c138ebd1f853a
Author: Eric Jarrige <eri...@ar...>
Date: Sun Jun 3 20:34:12 2012 +0200
[LINUX] apf28: add missing Freescale patches - These patches aim to fix many mx28 issues
-----------------------------------------------------------------------
Summary of changes:
buildroot/configs/apf28_defconfig | 2 +-
.../187-apply-patches.sh_update_to_BR2012.05.patch | 151 ++++++++++++
...y-configuration-bug-fixes-and-improvement.patch | 247 ++++++++++++++++++++
3 files changed, 399 insertions(+), 1 deletions(-)
create mode 100644 patches/buildroot/2012.02/187-apply-patches.sh_update_to_BR2012.05.patch
create mode 100755 patches/linux/2.6.35/455-freescale-0004-MX28-kernel-5V-only-configuration-bug-fixes-and-improvement.patch
diff --git a/buildroot/configs/apf28_defconfig b/buildroot/configs/apf28_defconfig
index cbb36f3..38a08bb 100644
--- a/buildroot/configs/apf28_defconfig
+++ b/buildroot/configs/apf28_defconfig
@@ -74,6 +74,6 @@ BR2_TARGET_UBOOT_ETHADDR=""
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.35.3"
-BR2_LINUX_KERNEL_PATCH="ftp://ftp2.armadeus.com/armadeusw/linux-2.6.35.3-imx_10.12.01.patch.tar.gz ../patches/linux/$(BR2_LINUX_KERNEL_VERSION)"
+BR2_LINUX_KERNEL_PATCH="ftp://ftp2.armadeus.com/armadeusw/linux-2.6.35.3-imx_10.12.01.patch.tar.gz ftp://ftp2.armadeus.com/armadeusw/patches_for_L2.6.35_MX28_SDK_10.12_SOURCE.tar.gz ftp://ftp2.armadeus.com/armadeusw/L2.6.35_10.12_EMI_FREQ_PATCH_UP.tar.gz ftp://ftp2.armadeus.com/armadeusw/MX28-FEC-PROBLEM-PATCH.tar.gz ../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/patches/buildroot/2012.02/187-apply-patches.sh_update_to_BR2012.05.patch b/patches/buildroot/2012.02/187-apply-patches.sh_update_to_BR2012.05.patch
new file mode 100644
index 0000000..57c6936
--- /dev/null
+++ b/patches/buildroot/2012.02/187-apply-patches.sh_update_to_BR2012.05.patch
@@ -0,0 +1,151 @@
+[apply-patches.sh] update to BR 2012.05
+
+Fix open issues of BR 2012.02.
+
+Signed-off-by: Eric Jarrige <eri...@ar...>
+---
+--- buildroot/support/scripts/apply-patches.sh
++++ buildroot/support/scripts/apply-patches.sh
+@@ -4,31 +4,55 @@
+ # -Erik
+ #
+ # (c) 2002 Erik Andersen <and...@co...>
++#
++# Parameters:
++# - the build directory, optional, default value is '.'. The place where are
++# the package sources.
++# - the patch directory, optional, default '../kernel-patches'. The place
++# where are the scripts you want to apply.
++# - other parameters are the patch name patterns, optional, default value is
++# '*'. Pattern(s) describing the patch names you want to apply.
++#
++# The script will look recursively for patches from the patch directory. If a
++# file is named 'series' then only patches mentionned into it will be applied.
++# If not, the script will look for file names matching pattern(s). If the name
++# ends with '.tar.*', '.tbz2' or '.tgz', the file is considered as an archive
++# and will be uncompressed into a directory named
++# '.patches-name_of_the_archive-unpacked'. It's the turn of this directory to
++# be scanned with '*' as pattern. Remember that scanning is recursive. Other
++# files than series file and archives are considered as a patch.
++#
++# Once a patch is found, the script will try to apply it. If its name doesn't
++# end with '.gz', '.bz', '.bz2', '.zip', '.Z', '.diff*' or '.patch*', it will
++# be skipped. If necessary, the patch will be uncompressed before being
++# applied. The list of the patches applied is stored in '.applied_patches_list'
++# file in the build directory.
+
+ # Set directories from arguments, or use defaults.
+-targetdir=${1-.}
++builddir=${1-.}
+ patchdir=${2-../kernel-patches}
+ shift 2
+ patchpattern=${@-*}
+
+-if [ ! -d "${targetdir}" ] ; then
+- echo "Aborting. '${targetdir}' is not a directory."
++if [ ! -d "${builddir}" ] ; then
++ echo "Aborting. '${builddir}' is not a directory."
+ exit 1
+ fi
+ if [ ! -d "${patchdir}" ] ; then
+ echo "Aborting. '${patchdir}' is not a directory."
+ exit 1
+ fi
+-
+-for i in `cd ${patchdir}; ls -d ${patchpattern} 2> /dev/null` ; do
+- apply="patch -g0 -p1 -E -d"
+- uncomp_parm=""
+- if [ -d "${patchdir}/$i" ] ; then
+- type="directory overlay"
+- uncomp="tar cf - --exclude=.svn --no-anchored -C"
+- uncomp_parm="."
+- apply="tar xvf - -C"
+- else case "$i" in
++
++# Remove any rejects present BEFORE patching - Because if there are
++# any, even if patches are well applied, at the end it will complain
++# about rejects in builddir.
++find ${builddir}/ '(' -name '*.rej' -o -name '.*.rej' ')' -print0 | \
++ xargs -0 -r rm -f
++
++function apply_patch {
++ path=$1
++ patch=$2
++ case "$patch" in
+ *.gz)
+ type="gzip"; uncomp="gunzip -dc"; ;;
+ *.bz)
+@@ -39,28 +63,60 @@ for i in `cd ${patchdir}; ls -d ${patchp
+ type="zip"; uncomp="unzip -d"; ;;
+ *.Z)
+ type="compress"; uncomp="uncompress -c"; ;;
+- *.tgz)
+- type="tar gzip"; uncomp="gunzip -dc"; apply="tar xvf - -C"; ;;
+- *.tar)
+- type="tar"; uncomp="cat"; apply="tar xvf - -C"; ;;
++ *.diff*)
++ type="diff"; uncomp="cat"; ;;
++ *.patch*)
++ type="patch"; uncomp="cat"; ;;
+ *)
+- type="plaintext"; uncomp="cat"; ;;
+- esac fi
++ echo "Unsupported format file for ${patch}, skip it";
++ return 0;
++ ;;
++ esac
+ echo ""
+- echo "Applying ${i} using ${type}: "
+- echo ${i} | cat >> ${targetdir}/.applied_patches_list
+- ${uncomp} ${patchdir}/${i} ${uncomp_parm} | ${apply} ${targetdir}
++ echo "Applying $patch using ${type}: "
++ echo $patch >> ${builddir}/.applied_patches_list
++ ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}"
+ if [ $? != 0 ] ; then
+- echo "Patch failed! Please fix $i!"
++ echo "Patch failed! Please fix ${patch}!"
+ exit 1
+ fi
+-done
++}
++
++function scan_patchdir {
++ path=$1
++ shift 1
++ patches=${@-*}
++
++ # If there is a series file, use it instead of using ls sort order
++ # to apply patches. Skip line starting with a dash.
++ if [ -e "${path}/series" ] ; then
++ for i in `grep -Ev "^#" ${path}/series 2> /dev/null` ; do
++ apply_patch "$path" "$i" || exit 1
++ done
++ else
++ for i in `cd $path; ls -d $patches 2> /dev/null` ; do
++ if [ -d "${path}/$i" ] ; then
++ scan_patchdir "${path}/$i"
++ elif echo "$i" | grep -q -E "\.tar(\..*)?$|\.tbz2?$|\.tgz$" ; then
++ unpackedarchivedir="$builddir/.patches-$(basename $i)-unpacked"
++ rm -rf "$unpackedarchivedir" 2> /dev/null
++ mkdir "$unpackedarchivedir"
++ tar -C "$unpackedarchivedir" -xaf "${path}/$i"
++ scan_patchdir "$unpackedarchivedir"
++ else
++ apply_patch "$path" "$i" || exit 1
++ fi
++ done
++ fi
++}
++
++scan_patchdir "$patchdir" "$patchpattern"
+
+ # Check for rejects...
+-if [ "`find $targetdir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print`" ] ; then
++if [ "`find $builddir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print`" ] ; then
+ echo "Aborting. Reject files found."
+ exit 1
+ fi
+
+ # Remove backup files
+-find $targetdir/ '(' -name '*.orig' -o -name '.*.orig' ')' -exec rm -f {} \;
++find $builddir/ '(' -name '*.orig' -o -name '.*.orig' ')' -exec rm -f {} \;
diff --git a/patches/linux/2.6.35/455-freescale-0004-MX28-kernel-5V-only-configuration-bug-fixes-and-improvement.patch b/patches/linux/2.6.35/455-freescale-0004-MX28-kernel-5V-only-configuration-bug-fixes-and-improvement.patch
new file mode 100755
index 0000000..37a6be2
--- /dev/null
+++ b/patches/linux/2.6.35/455-freescale-0004-MX28-kernel-5V-only-configuration-bug-fixes-and-improvement.patch
@@ -0,0 +1,247 @@
+From b7787120f90b46e351e74aa71ffbcbb220c8750c Mon Sep 17 00:00:00 2001
+From: Grace Si <gra...@fr...>
+Date: Tue, 13 Mar 2012 16:03:29 +0800
+Subject: [PATCH] MX28 kernel 5V only configuration bug fixes and improvement
+ 1. Change VDDA voltage from 1.75V to 1.8V which is the typical figure on datasheet.
+ 2. Add 5V only handling in kernel, add persistent bit to check whether it is 5V only
+ configuration in kernel and then enable correct FIQs and IRQs and handle FIQ.
+ 3. Add VDDD, VDDIO and VDDA debouncing check in FIQ handler.
+
+---
+ arch/arm/mach-mx28/bus_freq.c | 16 ++++++------
+ drivers/power/mxs/fiq.S | 50 ++++++++++++++++++++++++++++++++--------
+ drivers/power/mxs/linux.c | 39 +++++++++++++++++++++++++++++++-
+ 3 files changed, 86 insertions(+), 19 deletions(-)
+
+diff --git a/arch/arm/mach-mx28/bus_freq.c b/arch/arm/mach-mx28/bus_freq.c
+index 920c630..b13025a 100644
+--- a/arch/arm/mach-mx28/bus_freq.c
++++ b/arch/arm/mach-mx28/bus_freq.c
+@@ -51,26 +51,26 @@
+ #ifdef CONFIG_MEM_mDDR
+ struct profile profiles[] = {
+ { 454736, 151570, 205710, 0, 1550000,
+- 1450000, 355000, 3300000, 1750000, 24000, 0 },
++ 1450000, 355000, 3300000, 1800000, 24000, 0 },
+ { 360000, 120000, 130910, 0, 1350000,
+- 1250000, 200000, 3300000, 1750000, 24000, 0 },
++ 1250000, 200000, 3300000, 1800000, 24000, 0 },
+ { 261818, 130910, 130910, 0, 1350000,
+- 1250000, 173000, 3300000, 1750000, 24000, 0 },
++ 1250000, 173000, 3300000, 1800000, 24000, 0 },
+ { 64000, 64000, 240000, 3, 1350000,
+- 1250000, 150000, 3300000, 1750000, 24000, 0 },
++ 1250000, 150000, 3300000, 1800000, 24000, 0 },
+ { 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0 },
+ };
+ #else
+ struct profile profiles[] = {
+ { 454736, 151570, 205710, 0, 1550000,
+- 1450000, 355000, 3300000, 1750000, 24000, 0 },
++ 1450000, 355000, 3300000, 1800000, 24000, 0 },
+ { 360000, 120000, 130910, 0, 1350000,
+- 1250000, 200000, 3300000, 1750000, 24000, 0 },
++ 1250000, 200000, 3300000, 1800000, 24000, 0 },
+ { 261818, 130910, 130910, 0, 1350000,
+- 1250000, 173000, 3300000, 1750000, 24000, 0 },
++ 1250000, 173000, 3300000, 1800000, 24000, 0 },
+ { 64000, 64000, 130910, 3, 1350000,
+- 1250000, 150000, 3300000, 1750000, 24000, 0 },
++ 1250000, 150000, 3300000, 1800000, 24000, 0 },
+ { 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0 },
+ };
+diff --git a/drivers/power/mxs/fiq.S b/drivers/power/mxs/fiq.S
+index 1ad380d..932c31b 100644
+--- a/drivers/power/mxs/fiq.S
++++ b/drivers/power/mxs/fiq.S
+@@ -23,6 +23,7 @@
+ #include <asm/pgtable-hwdef.h>
+ #include <mach/regs-power.h>
+ #include <mach/../../regs-clkctrl.h>
++#include <mach/../../regs-digctl.h>
+ #include <mach/regs-timrot.h>
+
+ .align 5
+@@ -32,20 +33,46 @@
+ .globl lock_vector_tlb
+
+ power_fiq_start:
+- ldr r8,power_reg
++ ldr r8,power_reg
+ ldr r9,[r8,#HW_POWER_CTRL ]
+ ldr r10,power_off
+
+- @ when VDDIO_BO_IRQ,
+- @ disabled, handled in IRQ for now
+- @tst r9, #BM_POWER_CTRL_VDDIO_BO_IRQ
+
++ @ If battery Brownout, power off chip
++ tst r9, #BM_POWER_CTRL_BATT_BO_IRQ
++ strne r10,[r8,#HW_POWER_RESET]
++
++
++ @ For 5V only configration, VDDIO_BO is set as FIQ,
++ @ For other cases, VDDIO_BO is handled in IRQ
+
+- @ when BATT_BO_IRQ, VDDD_BO_IRQ, VDDA_BO_IRQ, power off chip
+- ldr r11,power_bo
++ @ check whether it is VDDD_BO_IRQ, VDDA_BO_IRQ, VDDIO_BO_IRQ
++ ldr r11,power_bo
+ tst r9, r11
+- strne r10,[r8,#HW_POWER_RESET]
++ beq check_vdd5v
++
++ ldr r9, power_digctl
++ ldr r12, [r9, #HW_DIGCTL_MICROSECONDS];
++ add r12, #11 @ debouce time is 11 microseconds.
++
++ @ Loop for specified time to debounce the brownout status bits.
+
++loop_check:
++ ldr r10, [r8, #HW_POWER_STS]
++ ldr r11, sts_bo
++ tst r10, r11
++ beq done @ false brownout go to done.
++
++ ldr r9, power_digctl
++ ldr r11, [r9, #HW_DIGCTL_MICROSECONDS];
++ cmp r11, r12
++ blt loop_check
++
++ @ true brownout, power off chip.
++ ldr r10,power_off
++ str r10, [r8, #HW_POWER_RESET]
++
++check_vdd5v:
+ @VDD5V_DROOP_IRQ
+ tst r9, #BM_POWER_CTRL_VDD5V_DROOP_IRQ
+ beq check_dcdc4p2
+@@ -93,18 +120,21 @@ check_dcdc4p2:
+ mov r11, #BM_POWER_CTRL_ENIRQ_DCDC4P2_BO
+ strne r11, [r8, #HW_POWER_CTRL_CLR]
+
+-
++done:
+
+ @return from fiq
+ subs pc,lr, #4
+
+ power_reg:
+ .long IO_ADDRESS(POWER_PHYS_ADDR)
++power_digctl:
++ .long IO_ADDRESS(DIGCTL_PHYS_ADDR)
+ power_off:
+ .long 0x3e770001
+ power_bo:
+- .long BM_POWER_CTRL_BATT_BO_IRQ | \
+- BM_POWER_CTRL_VDDA_BO_IRQ | BM_POWER_CTRL_VDDD_BO_IRQ
++ .long BM_POWER_CTRL_VDDA_BO_IRQ | BM_POWER_CTRL_VDDD_BO_IRQ | BM_POWER_CTRL_VDDIO_BO_IRQ
++sts_bo:
++ .long BM_POWER_STS_VDDIO_BO | BM_POWER_STS_VDDA_BO | BM_POWER_STS_VDDD_BO
+ power_fiq_count:
+ .long 0
+ power_fiq_end:
+diff --git a/drivers/power/mxs/linux.c b/drivers/power/mxs/linux.c
+index 3388307..5ec2a29 100644
+--- a/drivers/power/mxs/linux.c
++++ b/drivers/power/mxs/linux.c
+@@ -28,6 +28,7 @@
+ #include <mach/hardware.h>
+ #include <mach/irqs.h>
+ #include <mach/clock.h>
++#include <mach/regs-rtc.h>
+ #include <linux/delay.h>
+ #include <linux/proc_fs.h>
+ #include <linux/interrupt.h>
+@@ -775,11 +776,26 @@ static int mxs_bat_probe(struct platform_device *pdev)
+ {
+ struct mxs_info *info;
+ int ret = 0;
++ void *base = IO_ADDRESS(RTC_PHYS_ADDR);
+
+
+ /* enable usb device presence detection */
+ fsl_enable_usb_plugindetect();
+
++
++
++ /* check bit 11, bit 11 is set in power_prep.c if it is 5V only build.
++ we don't need initialize battery for 5V only build
++ */
++ if((__raw_readl(base + HW_RTC_PERSISTENT1) & 0x800))
++ {
++ __raw_writel(0x800, base + HW_RTC_PERSISTENT1_CLR);
++
++ /* InitializeFiqSystem(); */
++ ddi_power_InitOutputBrownouts();
++ return 0;
++ }
++
+ ret = ddi_power_init_battery();
+ if (ret) {
+ printk(KERN_ERR "Aborting power driver initialization\n");
+@@ -975,6 +991,7 @@ static int mxs_bat_probe(struct platform_device *pdev)
+ pr_debug("No onboard vbus 5v reg provided\n");
+ info->onboard_vbus5v = NULL;
+ }
++
+ return 0;
+
+ unregister_ac:
+@@ -1127,9 +1144,20 @@ static struct proc_dir_entry *power_fiq_proc;
+ static int __init mxs_bat_init(void)
+ {
+ struct clk *cpu, *pll0;
++ int ret;
++ int no_battery = false;
+
+ #ifdef POWER_FIQ
+- int ret;
++
++ /* check bit 11, bit 11 is set in power_prep.c if it is 5V only build.
++ */
++
++ if((__raw_readl(IO_ADDRESS(RTC_PHYS_ADDR) + HW_RTC_PERSISTENT1) & 0x800))
++ {
++ no_battery = true;
++ printk(KERN_NOTICE "This is 5V only build. \r\n");
++ }
++
+ ret = claim_fiq(&power_fiq);
+ if (ret) {
+ pr_err("Can't claim fiq");
+@@ -1143,6 +1171,9 @@ static int __init mxs_bat_init(void)
+ disable_irq(IRQ_DCDC4P2_BRNOUT);
+ disable_irq(IRQ_BATT_BRNOUT);
+ disable_irq(IRQ_VDDD_BRNOUT);
++ disable_irq(IRQ_VDDA_BRNOUT);
++ if(no_battery)
++ disable_irq(IRQ_VDDIO_BRNOUT);
+ #ifndef CONFIG_ARCH_MX28
+ disable_irq(IRQ_VDD18_BRNOUT);
+ #endif
+@@ -1153,6 +1184,9 @@ static int __init mxs_bat_init(void)
+ mxs_set_irq_fiq(IRQ_DCDC4P2_BRNOUT, 1);
+ mxs_set_irq_fiq(IRQ_BATT_BRNOUT, 1);
+ mxs_set_irq_fiq(IRQ_VDDD_BRNOUT, 1);
++ mxs_set_irq_fiq(IRQ_VDDA_BRNOUT, 1);
++ if(no_battery)
++ mxs_set_irq_fiq(IRQ_VDDIO_BRNOUT, 1);
+ #ifndef CONFIG_ARCH_MX28
+ mxs_set_irq_fiq(IRQ_VDD18_BRNOUT, 1);
+ #endif
+@@ -1165,6 +1199,9 @@ static int __init mxs_bat_init(void)
+ enable_irq(IRQ_DCDC4P2_BRNOUT);
+ enable_irq(IRQ_BATT_BRNOUT);
+ enable_irq(IRQ_VDDD_BRNOUT);
++ enable_irq(IRQ_VDDA_BRNOUT);
++ if(no_battery)
++ enable_irq(IRQ_VDDIO_BRNOUT);
+ #ifndef CONFIG_ARCH_MX28
+ enable_irq(IRQ_VDD18_BRNOUT);
+ #endif
+--
+1.7.0.4
+
hooks/post-receive
--
armadeus
|