summaryrefslogtreecommitdiff
path: root/packages/linux/linux-openmoko-2.6.28/0005-debug-glamo-allow-slower-memory-bus.patch.patch
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@datenfreihafen.org>2009-01-31 19:34:32 +0100
committerJan Lübbe <jluebbe@debian.org>2009-02-04 10:15:01 +0000
commit12328f371d9ec753bc937809e2c9afd2f3b76b17 (patch)
tree5243d0a07ef54d0b46cb75b0d0e0535742e05f2d /packages/linux/linux-openmoko-2.6.28/0005-debug-glamo-allow-slower-memory-bus.patch.patch
parentedc48549bc2ef83e43dd5003450fd5931ec3d788 (diff)
linux-openmoko-2.6.28: Add 8 bug fixes cherry-picked from andy-tracking.
This will be obsolete once we go for a newer src rev.
Diffstat (limited to 'packages/linux/linux-openmoko-2.6.28/0005-debug-glamo-allow-slower-memory-bus.patch.patch')
-rw-r--r--packages/linux/linux-openmoko-2.6.28/0005-debug-glamo-allow-slower-memory-bus.patch.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/packages/linux/linux-openmoko-2.6.28/0005-debug-glamo-allow-slower-memory-bus.patch.patch b/packages/linux/linux-openmoko-2.6.28/0005-debug-glamo-allow-slower-memory-bus.patch.patch
new file mode 100644
index 0000000000..39ae653fef
--- /dev/null
+++ b/packages/linux/linux-openmoko-2.6.28/0005-debug-glamo-allow-slower-memory-bus.patch.patch
@@ -0,0 +1,72 @@
+From 8c787f1c57c3b09beece662faabfab419ae5c8d6 Mon Sep 17 00:00:00 2001
+From: Andy Green <andy@openmoko.com>
+Date: Wed, 28 Jan 2009 09:58:59 +0000
+Subject: [PATCH 5/8] debug-glamo-allow-slower-memory-bus.patch
+
+Signed-off-by: Andy Green <andy@openmoko.com>
+---
+ drivers/mfd/glamo/glamo-core.c | 34 +++++++++++++++++++++++++++++++++-
+ 1 files changed, 33 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c
+index b4595a8..e6253de 100644
+--- a/drivers/mfd/glamo/glamo-core.c
++++ b/drivers/mfd/glamo/glamo-core.c
+@@ -58,6 +58,25 @@
+
+ #define GLAMO_MEM_REFRESH_COUNT 0x100
+
++
++/*
++ * Glamo internal settings
++ *
++ * We run the memory interface from the faster PLLB on 2.6.28 kernels and
++ * above. Couple of GTA02 users report trouble with memory bus when they
++ * upgraded from 2.6.24. So this parameter allows reversion to 2.6.24
++ * scheme if their Glamo chip needs it.
++ *
++ * you can override the faster default on kernel commandline using
++ *
++ * glamo3362.slow_memory=1
++ *
++ * for example
++ */
++
++static int slow_memory = 0;
++module_param(slow_memory, int, 0644);
++
+ struct reg_range {
+ int start;
+ int count;
+@@ -786,6 +805,19 @@ int glamo_run_script(struct glamo_core *glamo, struct glamo_script *script,
+ while ((__reg_read(glamo, GLAMO_REG_PLL_GEN5) & 3) != 3)
+ ;
+ break;
++
++ /*
++ * couple of people reported artefacts with 2.6.28 changes, this
++ * allows reversion to 2.6.24 settings
++ */
++
++ case 0x200:
++ if (slow_memory)
++ __reg_write(glamo, script[i].reg, 0xef0);
++ else
++ __reg_write(glamo, script[i].reg, 0xe03);
++ break;
++
+ default:
+ __reg_write(glamo, script[i].reg, script[i].val);
+ break;
+@@ -848,7 +880,7 @@ static struct glamo_script glamo_init_script[] = {
+ * b7..b4 = 0 = no wait states on read or write
+ * b0 = 1 select PLL2 for Host interface, b1 = enable it
+ */
+- { 0x200, 0x0e03 },
++ { 0x200, 0x0e03 /* this is replaced by script parser */ },
+ { 0x202, 0x07ff },
+ { 0x212, 0x0000 },
+ { 0x214, 0x4000 },
+--
+1.5.2.2
+