[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.0-69-gff186dd
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2012-10-03 18:07:19
|
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 ff186dd6969eba5d3500984b685ec063971f4d53 (commit)
from bc1a898b4580ff793a0b85953bdb7445f43ec569 (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 ff186dd6969eba5d3500984b685ec063971f4d53
Author: Eric Jarrige <eri...@ar...>
Date: Wed Oct 3 20:10:20 2012 +0200
[LINUX] apf28: fix kernel 2.6.35 video flickering
-----------------------------------------------------------------------
Summary of changes:
.../459-armadeus-mx28_fix_16bits_video.patch | 34 +++++++-
...eus-support_ram_frequency_scaling_options.patch | 93 +++++++++++++++++++-
2 files changed, 123 insertions(+), 4 deletions(-)
diff --git a/patches/linux/2.6.35/459-armadeus-mx28_fix_16bits_video.patch b/patches/linux/2.6.35/459-armadeus-mx28_fix_16bits_video.patch
index da428d4..a19d86e 100644
--- a/patches/linux/2.6.35/459-armadeus-mx28_fix_16bits_video.patch
+++ b/patches/linux/2.6.35/459-armadeus-mx28_fix_16bits_video.patch
@@ -1,4 +1,5 @@
-Fix mx28 16 bits video modes of freescale mxs framebuffer driver
+- Fix mx28 16 bits video modes of freescale mxs framebuffer driver
+- Fix mx28 video flickering
Signed-off-by: Eric Jarrige <eri...@ar...>
@@ -36,3 +37,34 @@ Index: linux-2.6.35.3/drivers/video/mxs/mxsfb.c
var->transp.offset = 0;
var->transp.length = 0;
}
+@@ -620,7 +620,7 @@ static void init_timings(struct mxs_fb_d
+ __raw_writel(timings, data->regbase + HW_LCDIF_TIMING);
+ }
+
+-#ifdef CONFIG_CPU_FREQ
++#if defined(CONFIG_CPU_FREQ) && defined(CONFIG_MXS_RAM_FREQ_SCALING)
+
+ struct mxsfb_notifier_block {
+ struct mxs_fb_data *fb_data;
+@@ -665,7 +665,7 @@ static struct mxsfb_notifier_block mxsfb
+ .notifier_call = mxsfb_notifier,
+ },
+ };
+-#endif /* CONFIG_CPU_FREQ */
++#endif /* CONFIG_CPU_FREQ && CONFIG_MXS_RAM_FREQ_SCALING*/
+
+ static int get_max_memsize(struct mxs_platform_fb_entry *pentry,
+ void *data, int ret_prev)
+@@ -851,10 +851,10 @@ static int __devinit mxsfb_probe(struct
+ data->cur_phys = data->phys_start;
+ dev_dbg(&pdev->dev, "LCD running now\n");
+
+-#ifdef CONFIG_CPU_FREQ
++#if defined(CONFIG_CPU_FREQ) && defined(CONFIG_MXS_RAM_FREQ_SCALING)
+ mxsfb_nb.fb_data = data;
+ cpufreq_register_notifier(&mxsfb_nb.nb, CPUFREQ_TRANSITION_NOTIFIER);
+-#endif /* CONFIG_CPU_FREQ */
++#endif /* CONFIG_CPU_FREQ && CONFIG_MXS_RAM_FREQ_SCALING */
+
+ goto out;
+
diff --git a/patches/linux/2.6.35/460-armadeus-support_ram_frequency_scaling_options.patch b/patches/linux/2.6.35/460-armadeus-support_ram_frequency_scaling_options.patch
index 56f119e..53c9a5d 100644
--- a/patches/linux/2.6.35/460-armadeus-support_ram_frequency_scaling_options.patch
+++ b/patches/linux/2.6.35/460-armadeus-support_ram_frequency_scaling_options.patch
@@ -1,5 +1,5 @@
Support RAM frequency scaling options: DDR2, mDDR and disable RAM frequency
-scaling.
+scaling and LCD clock management.
This patch does not fix USB and ethernet issues reported with dynamic frequency
scaling governors: conservative and ondemand. in such a case disabling RAM
@@ -12,7 +12,16 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/clock.c
===================================================================
--- linux-2.6.35.3/arch/arm/mach-mx28/clock.c
+++ linux-2.6.35.3/arch/arm/mach-mx28/clock.c
-@@ -885,6 +885,7 @@ static unsigned long emi_round_rate(stru
+@@ -420,6 +420,8 @@ static struct clk ref_pix_clk = {
+ .get_rate = ref_pix_get_rate,
+ .set_rate = ref_clk_set_rate,
+ .round_rate = ref_clk_round_rate,
++ .enable = mx28_raw_enable,
++ .disable = mx28_raw_disable,
+ .enable_reg = CLKCTRL_BASE_ADDR + HW_CLKCTRL_FRAC1,
+ .enable_bits = BM_CLKCTRL_FRAC1_CLKGATEPIX,
+ .scale_reg = CLKCTRL_BASE_ADDR + HW_CLKCTRL_FRAC1,
+@@ -885,6 +887,7 @@ static unsigned long emi_round_rate(stru
static int emi_set_rate(struct clk *clk, unsigned long rate)
{
@@ -20,7 +29,7 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/clock.c
struct mxs_emi_scaling_data emi;
volatile unsigned int StateX, StateH;
volatile unsigned int APBHCTRL_Backup, APBXCTRL_Backup;
-@@ -982,6 +983,7 @@ static int emi_set_rate(struct clk *clk,
+@@ -982,6 +985,7 @@ static int emi_set_rate(struct clk *clk,
printk(KERN_ERR "couldn't set up EMI divisor\n");
return -ETIMEDOUT;
}
@@ -28,6 +37,84 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/clock.c
return 0;
}
+@@ -1182,12 +1186,26 @@ static unsigned long lcdif_get_rate(stru
+
+ static int lcdif_set_rate(struct clk *clk, unsigned long rate)
+ {
+- int reg_val;
++ unsigned long root_rate;
++ unsigned int reg, div;
++ root_rate = clk->parent->get_rate(clk->parent);
++ div = root_rate / (rate*1000);
++ if ((div == 0) || (div >= 0x2000))
++ return -EINVAL;
++
++ if (root_rate % (rate*1000)) {
++ div = mx28_get_frac_div(root_rate / 1000, rate, 0x1FFF);
++ if (((root_rate / 0x2000) * div) > (rate*1000))
++ return -EINVAL;
++ }
++
++ reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_DIS_LCDIF);
++ reg &= ~(BM_CLKCTRL_DIS_LCDIF_DIV | BM_CLKCTRL_DIS_LCDIF_DIV_FRAC_EN);
++ if (root_rate % rate)
++ reg |= BM_CLKCTRL_DIS_LCDIF_DIV_FRAC_EN;
++ reg |= BF_CLKCTRL_DIS_LCDIF_DIV(div);
++ __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_DIS_LCDIF);
+
+- reg_val = __raw_readl(clk->scale_reg);
+- reg_val &= ~(BM_CLKCTRL_DIS_LCDIF_DIV | BM_CLKCTRL_DIS_LCDIF_CLKGATE);
+- reg_val |= (1 << BP_CLKCTRL_DIS_LCDIF_DIV) & BM_CLKCTRL_DIS_LCDIF_DIV;
+- __raw_writel(reg_val, clk->scale_reg);
+ if (clk->busy_reg) {
+ int i;
+ for (i = 10000; i; i--)
+@@ -1197,10 +1215,6 @@ static int lcdif_set_rate(struct clk *cl
+ return -ETIMEDOUT;
+ }
+
+- reg_val = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_CLKSEQ);
+- reg_val |= BM_CLKCTRL_CLKSEQ_BYPASS_DIS_LCDIF;
+- __raw_writel(reg_val, CLKCTRL_BASE_ADDR + HW_CLKCTRL_CLKSEQ);
+-
+ return 0;
+ }
+
+@@ -1216,7 +1230,7 @@ static int lcdif_set_parent(struct clk *
+ ret = 0;
+ }
+ if (ret && (parent == &ref_pix_clk)) {
+- __raw_writel(0 << clk->bypass_bits,
++ __raw_writel(1 << clk->bypass_bits,
+ clk->bypass_reg + CLR_REGISTER);
+ ret = 0;
+ }
+@@ -1227,7 +1241,7 @@ static int lcdif_set_parent(struct clk *
+ }
+
+ static struct clk dis_lcdif_clk = {
+- .parent = &pll_clk[0],
++ .parent = &ref_pix_clk,
+ .enable = mx28_raw_enable,
+ .disable = mx28_raw_disable,
+ .scale_reg = CLKCTRL_BASE_ADDR + HW_CLKCTRL_DIS_LCDIF,
+@@ -1235,7 +1249,7 @@ static struct clk dis_lcdif_clk = {
+ .busy_reg = CLKCTRL_BASE_ADDR + HW_CLKCTRL_DIS_LCDIF,
+ .busy_bits = 29,
+ .enable_reg = CLKCTRL_BASE_ADDR + HW_CLKCTRL_DIS_LCDIF,
+- .enable_bits = 31,
++ .enable_bits = BM_CLKCTRL_DIS_LCDIF_CLKGATE,
+ .bypass_reg = CLKCTRL_BASE_ADDR + HW_CLKCTRL_CLKSEQ,
+ .bypass_bits = 14,
+ .get_rate = lcdif_get_rate,
+@@ -1848,6 +1862,7 @@ void __init mx28_clock_init(void)
+
+ clk_enable(&cpu_clk);
+ clk_enable(&emi_clk);
++ lcdif_set_parent(&dis_lcdif_clk, &ref_pix_clk);
+
+ clk_en_public_h_asm_ctrl(mx28_enable_h_autoslow,
+ mx28_set_hbus_autoslow_flags);
Index: linux-2.6.35.3/arch/arm/mach-mx28/emi_settings.h
===================================================================
--- linux-2.6.35.3/arch/arm/mach-mx28/emi_settings.h
hooks/post-receive
--
armadeus
|