[adm5120] add USB drivers for the NFS-101U/WU profiles
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1213-clean-gsm-flow-control.patch.patch
1 From 6da7929da1b46bccaae0f53bf7a26cdd74a3b70a Mon Sep 17 00:00:00 2001
2 From: Mike Westerhof <mwester@dls.net>
3 Date: Wed, 2 Jul 2008 22:44:01 +0100
4 Subject: [PATCH] clean-gsm-flow-control.patch
5
6 Signed-off-by: Mike Westerhof <mwester@dls.net>
7
8 arch/arm/plat-s3c24xx/neo1973_pm_gsm.c | 52 +-------
9 drivers/serial/s3c2410.c | 204 +++-----------------------------
10 2 files changed, 24 insertions(+), 232 deletions(-)
11 ---
12 arch/arm/plat-s3c24xx/neo1973_pm_gsm.c | 32 ++++++++++++++++++--------------
13 drivers/serial/s3c2410.c | 3 ++-
14 2 files changed, 20 insertions(+), 15 deletions(-)
15
16 diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c b/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
17 index d70a481..f3c9504 100644
18 --- a/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
19 +++ b/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
20 @@ -31,6 +31,18 @@
21 #include <asm/arch/regs-gpioj.h>
22 #endif
23
24 +extern void s3c24xx_serial_register_resume_dependency(struct resume_dependency *
25 + resume_dependency, int uart_index);
26 +
27 +/* flag set if we flow-controlled the GSM in our suspend routine */
28 +int gsm_auto_flowcontrolled;
29 +
30 +int gta01_gsm_enabled;
31 +EXPORT_SYMBOL(gta01_gsm_enabled);
32 +
33 +int gta_gsm_interrupts;
34 +EXPORT_SYMBOL(gta_gsm_interrupts);
35 +
36 struct gta01pm_priv {
37 int gpio_ngsm_en;
38 int gpio_ndl_gsm;
39 @@ -183,20 +195,6 @@ static DEVICE_ATTR(reset, 0644, gsm_read, gsm_write);
40 static DEVICE_ATTR(download, 0644, gsm_read, gsm_write);
41
42 #ifdef CONFIG_PM
43 -static void gsm_resume_work(struct work_struct *w)
44 -{
45 - printk(KERN_INFO "%s: waiting...\n", __FUNCTION__);
46 - if (gsm_autounlock_delay)
47 - msleep(gsm_autounlock_delay);
48 - if (gsm_auto_flowcontrolled) {
49 - if (machine_is_neo1973_gta01())
50 - s3c24xx_fake_rx_interrupt(10000);
51 - s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPH1_nRTS0);
52 - gsm_auto_flowcontrolled = 0;
53 - }
54 - printk(KERN_INFO "%s: done.\n", __FUNCTION__);
55 -}
56 -
57 static int gta01_gsm_resume(struct platform_device *pdev);
58 static int gta01_gsm_suspend(struct platform_device *pdev, pm_message_t state)
59 {
60 @@ -235,6 +233,12 @@ static int gta01_gsm_resume(struct platform_device *pdev)
61 if (machine_is_neo1973_gta02())
62 s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, gta01_gsm.gpio_ndl_gsm);
63
64 + /* If we forced flow-control on the GSM, we should also release it */
65 + if (gsm_auto_flowcontrolled) {
66 + s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPH1_nRTS0);
67 + gsm_auto_flowcontrolled = 0;
68 + }
69 +
70 return 0;
71 }
72 #else
73 diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
74 index bc6736d..73c6284 100644
75 --- a/drivers/serial/s3c2410.c
76 +++ b/drivers/serial/s3c2410.c
77 @@ -385,7 +385,8 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id)
78 if (uart_handle_sysrq_char(port, ch))
79 goto ignore_char;
80
81 - uart_insert_char(port, uerstat, S3C2410_UERSTAT_OVERRUN, ch, flag);
82 + uart_insert_char(port, uerstat, S3C2410_UERSTAT_OVERRUN, ch,
83 + flag);
84
85 ignore_char:
86 continue;
87 --
88 1.5.6.5
89
This page took 0.047789 seconds and 5 git commands to generate.