r3988 - branches/src/target/kernel/2.6.24.x/patches
werner at sita.openmoko.org
werner at sita.openmoko.org
Thu Jan 31 01:54:37 CET 2008
Author: werner
Date: 2008-01-31 01:54:32 +0100 (Thu, 31 Jan 2008)
New Revision: 3988
Modified:
branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
Log:
Add on/off GSM download gpio. If we don't upgrade gsm firmware, we need to
set GPIO output high. It will affect the sound quality, when we set GPIO low.
From: Willie <willie_chen at openmoko.com>
gta02-core.patch:
- arch/arm/plat-s3c24xx/neo1973_pm_gsm.c (gsm_read, gsm_write): added
GTA02-specific handling of the GSM download signal
- arch/arm/plat-s3c24xx/neo1973_pm_gsm.c (gta01_gsm_sysfs_entries): added
dev_attr_download
- include/asm-arm/arch-s3c2410/gta02.h (GTA02v4_GPIO_nDL_GSM): renamed to
GTA02_GPIO_nDL_GSM
Modified: branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch 2008-01-30 22:24:41 UTC (rev 3987)
+++ branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch 2008-01-31 00:54:32 UTC (rev 3988)
@@ -895,7 +895,7 @@
+#define GTA02_GPIO_INT0 S3C2440_GPJ3 /* v2 + v3 + v4 only */
+#define GTA02_GPIO_nGSM_EN S3C2440_GPJ4
+#define GTA02_GPIO_3D_RESET S3C2440_GPJ5
-+#define GTA02v4_GPIO_nDL_GSM S3C2440_GPJ6 /* v4 only */
++#define GTA02_GPIO_nDL_GSM S3C2440_GPJ6 /* v4 + v5 only */
+#define GTA02_GPIO_WLAN_GPIO0 S3C2440_GPJ7
+#define GTA02v1_GPIO_BAT_ID S3C2440_GPJ8
+#define GTA02_GPIO_KEEPACT S3C2440_GPJ8
@@ -1085,7 +1085,7 @@
===================================================================
--- linux-2.6.24.orig/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
+++ linux-2.6.24/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
-@@ -19,8 +19,14 @@
+@@ -19,8 +19,15 @@
#include <linux/errno.h>
#include <asm/hardware.h>
@@ -1095,13 +1095,33 @@
+#ifdef CONFIG_MACH_NEO1973_GTA02
+#include <asm/arch/gta02.h>
+#include <linux/pcf50633.h>
++#include <asm/arch/regs-gpioj.h>
+#endif
+
struct gta01pm_priv {
int gpio_ngsm_en;
struct console *con;
-@@ -70,27 +76,51 @@
+@@ -54,8 +61,16 @@
+ if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_RST))
+ goto out_1;
+ } else if (!strcmp(attr->attr.name, "download")) {
+- if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_DNLOAD))
+- goto out_1;
++#ifdef CONFIG_MACH_NEO1973_GTA01
++ if (machine_is_neo1973_gta01())
++ if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_DNLOAD))
++ goto out_1;
++#endif
++#ifdef CONFIG_MACH_NEO1973_GTA02
++ if (machine_is_neo1973_gta02())
++ if (s3c2410_gpio_getpin(GTA02_GPIO_nDL_GSM))
++ goto out_1;
++#endif
+ }
+ return strlcpy(buf, "0\n", 3);
+@@ -70,32 +85,63 @@
+
if (!strcmp(attr->attr.name, "power_on")) {
if (on) {
- dev_info(dev, "powering up GSM, thus disconnecting "
@@ -1158,7 +1178,29 @@
}
} else if (!strcmp(attr->attr.name, "reset")) {
s3c2410_gpio_setpin(GTA01_GPIO_MODEM_RST, on);
-@@ -158,8 +188,16 @@
+ } else if (!strcmp(attr->attr.name, "download")) {
+- s3c2410_gpio_setpin(GTA01_GPIO_MODEM_DNLOAD, on);
++#ifdef CONFIG_MACH_NEO1973_GTA01
++ if (machine_is_neo1973_gta01())
++ s3c2410_gpio_setpin(GTA01_GPIO_MODEM_DNLOAD, on);
++#endif
++#ifdef CONFIG_MACH_NEO1973_GTA02
++ if (machine_is_neo1973_gta02())
++ s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, on);
++#endif
+ }
+
+ return count;
+@@ -134,7 +180,7 @@
+ static struct attribute *gta01_gsm_sysfs_entries[] = {
+ &dev_attr_power_on.attr,
+ &dev_attr_reset.attr,
+- NULL,
++ &dev_attr_download.attr,
+ NULL
+ };
+
+@@ -158,8 +204,16 @@
gta01_gsm.gpio_ngsm_en = GTA01Bv2_GPIO_nGSM_EN;
s3c2410_gpio_setpin(GTA01v3_GPIO_nGSM_EN, 0);
break;
@@ -1176,7 +1218,7 @@
"some PM features not available!!!\n",
system_rev);
break;
-@@ -175,9 +213,13 @@
+@@ -175,9 +229,13 @@
break;
}
More information about the commitlog
mailing list