Sound problem on GTA02A5
Werner Almesberger
werner at openmoko.org
Thu Jan 31 01:46:28 CET 2008
Willie wrote:
> Little Sean and I test our GSM dialer on GTA02A5. GSM download pin still
> generates tick tick noise. And the hardware design isn't changed for
> GTA02A5. So we need to set GSM download output high. Thanks.
Thanks ! I've finally applied it (revision 3988), sorry for the delay.
I made some changes, though. Namely, the construct
#ifdef CONFIG_MACH_NEO1973_GTA02
do_something();
#endif
#ifdef CONFIG_MACH_NEO1973_GTA01
do_something_else();
#endif
doesn't do what one may be led to expect. Since it's okay (and in fact
the default) to build a kernel that runs on both GTA01 and GTA02, this
would become
do_something();
do_something_else();
which is almost certainly not what you want :)
So I've added run-time checking of the architecture. I've also reordered
the GTA01 and GTA02 sections to be in ascending order (i.e., GTA01
before GTA02).
The differences relative to your patch are below.
- Werner
---------------------------------- cut here -----------------------------------
Index: linux-2.6.24/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
===================================================================
--- 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
@@ -61,13 +61,15 @@
if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_RST))
goto out_1;
} else if (!strcmp(attr->attr.name, "download")) {
-#ifdef CONFIG_MACH_NEO1973_GTA02
- if (s3c2410_gpio_getpin(GTA02_GPIO_nDL_GSM))
- goto out_1;
-#endif
#ifdef CONFIG_MACH_NEO1973_GTA01
- if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_DNLOAD))
- goto out_1;
+ 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
}
@@ -132,11 +134,13 @@
} else if (!strcmp(attr->attr.name, "reset")) {
s3c2410_gpio_setpin(GTA01_GPIO_MODEM_RST, on);
} else if (!strcmp(attr->attr.name, "download")) {
-#ifdef CONFIG_MACH_NEO1973_GTA02
- s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, on);
-#endif
#ifdef CONFIG_MACH_NEO1973_GTA01
- s3c2410_gpio_setpin(GTA01_GPIO_MODEM_DNLOAD, on);
+ 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
}
More information about the openmoko-kernel
mailing list