summaryrefslogtreecommitdiff
path: root/target/linux/s3c24xx/patches/0231-use-gta02-glamo-mci-sd-dynamic-clock.patch.patch
diff options
context:
space:
mode:
authormirko <mirko@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-12-12 00:02:36 +0000
committermirko <mirko@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-12-12 00:02:36 +0000
commitcc3146824acbf585f487a803b4a2eadf36b9b47d (patch)
treeefab142ef89b35ce42e8a79e028eff15be362af8 /target/linux/s3c24xx/patches/0231-use-gta02-glamo-mci-sd-dynamic-clock.patch.patch
parent22b3854919b7cb44d725eb7a7efd018ad9aec25c (diff)
add support for target 3c24xx (more known as Openmoko GTA02 "Freerunner") and merge it with the openmoko-target and the work Michael Buesch <mb> did
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13609 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/s3c24xx/patches/0231-use-gta02-glamo-mci-sd-dynamic-clock.patch.patch')
-rwxr-xr-xtarget/linux/s3c24xx/patches/0231-use-gta02-glamo-mci-sd-dynamic-clock.patch.patch92
1 files changed, 92 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches/0231-use-gta02-glamo-mci-sd-dynamic-clock.patch.patch b/target/linux/s3c24xx/patches/0231-use-gta02-glamo-mci-sd-dynamic-clock.patch.patch
new file mode 100755
index 0000000000..98d670fa8a
--- /dev/null
+++ b/target/linux/s3c24xx/patches/0231-use-gta02-glamo-mci-sd-dynamic-clock.patch.patch
@@ -0,0 +1,92 @@
+From cba90f4bb9fc765be789e7d9e0f836ad4670c87f Mon Sep 17 00:00:00 2001
+From: Andy Green <andy@openmoko.com>
+Date: Wed, 30 Jul 2008 14:37:17 +0100
+Subject: [PATCH] use-gta02-glamo-mci-sd-dynamic-clock.patch
+
+This patch uses the new glamo-mci slow clock ratio
+patch in order to dynamically reduce SD Card clock
+rate when the GPS unit is powered on GTA02.
+
+Signed-off-by: Andy Green <andy@openmoko.com>
+---
+ arch/arm/mach-s3c2440/mach-gta02.c | 12 ++++++++++++
+ arch/arm/plat-s3c24xx/neo1973_pm_gps.c | 12 +++++++++---
+ 2 files changed, 21 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
+index 382837d..8e43c4a 100644
+--- a/arch/arm/mach-s3c2440/mach-gta02.c
++++ b/arch/arm/mach-s3c2440/mach-gta02.c
+@@ -85,6 +85,8 @@
+ #include <linux/gta02_hdq.h>
+ #include <linux/bq27000_battery.h>
+
++#include "../plat-s3c24xx/neo1973_pm_gps.h"
++
+ /* arbitrates which sensor IRQ owns the shared SPI bus */
+ static spinlock_t motion_irq_lock;
+
+@@ -1424,6 +1426,15 @@ static void gta02_glamo_mci_suspending(struct platform_device *dev)
+
+ /* Smedia Glamo 3362 */
+
++/*
++ * we crank down SD Card clock dynamically when GPS is powered
++ */
++
++static int gta02_glamo_mci_use_slow(void)
++{
++ return neo1973_pm_gps_is_on();
++}
++
+ static struct glamofb_platform_data gta02_glamo_pdata = {
+ .width = 43,
+ .height = 58,
+@@ -1456,6 +1467,7 @@ static struct glamofb_platform_data gta02_glamo_pdata = {
+
+ /* glamo MMC function platform data */
+ .glamo_set_mci_power = gta02_glamo_mmc_set_power,
++ .glamo_mci_use_slow = gta02_glamo_mci_use_slow,
+ .glamo_irq_is_wired = glamo_irq_is_wired,
+ .mci_suspending = gta02_glamo_mci_suspending,
+ .mci_all_dependencies_resumed =
+diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_gps.c b/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
+index 8cd583d..a21b763 100644
+--- a/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
++++ b/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
+@@ -39,6 +39,12 @@ struct neo1973_pm_gps_data {
+
+ static struct neo1973_pm_gps_data neo1973_gps;
+
++int neo1973_pm_gps_is_on(void)
++{
++ return neo1973_gps.power_was_on;
++}
++EXPORT_SYMBOL_GPL(neo1973_pm_gps_is_on);
++
+ /* This is the 2.8V supply for the RTC crystal, the mail clock crystal and
+ * the input to VDD_RF */
+ static void gps_power_2v8_set(int on)
+@@ -265,6 +271,9 @@ static int gps_power_1v5_get(void)
+ /* This is the POWERON pin */
+ static void gps_pwron_set(int on)
+ {
++
++ neo1973_gps.power_was_on = !!on;
++
+ #ifdef CONFIG_MACH_NEO1973_GTA01
+ if (machine_is_neo1973_gta01())
+ neo1973_gpb_setpin(GTA01_GPIO_GPS_PWRON, on);
+@@ -492,9 +501,6 @@ static DEVICE_ATTR(power_sequence, 0644, power_sequence_read,
+ static int gta01_pm_gps_suspend(struct platform_device *pdev,
+ pm_message_t state)
+ {
+-
+- neo1973_gps.power_was_on = gps_pwron_get();
+-
+ #ifdef CONFIG_MACH_NEO1973_GTA01
+ if (machine_is_neo1973_gta01()) {
+ /* FIXME */
+--
+1.5.6.3
+