[adm5120] add USB drivers for the NFS-101U/WU profiles
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1320--ARM-S3C24xx-Add-preliminary-E-TEN-glofiish-M800-s.patch
1 From eee43706c5969f5d99096dddefae3be0c41a6ed2 Mon Sep 17 00:00:00 2001
2 From: Harald Welte <laforge@gnumonks.org>
3 Date: Thu, 13 Nov 2008 08:29:11 +0000
4 Subject: [PATCH] [ARM] S3C24xx: Add preliminary E-TEN glofiish M800 support
5
6 This patch adds preliminary support for the M800. If booted
7 through haret, the system has the following working components:
8 * NAND read support
9 * framebuffer / LCM (no jbt6k74 power management yet)
10 * USB device controller (incl. Pullup)
11 * microSD card (incl. card-detect)
12 * backlight brightness control (using gta01-bl.c)
13 * input event device for power, camera and record button
14 * input event device for keyboard slide event
15 * bluetooth power control (using gta01-pm-bt)
16
17 Many things are still missing, like
18 * NAND write support
19 * GPS power control
20 * GSM/3G modem interface
21 * capsense buttons, joystick and querty-keyboard
22 * camera
23 * audio
24
25 Signed-off-by: Harald Welte <laforge@gnumonks.org>
26 ---
27 arch/arm/mach-s3c2440/Kconfig | 7 +++++++
28 arch/arm/mach-s3c2440/Makefile | 1 +
29 arch/arm/plat-s3c24xx/neo1973_pm_bt.c | 17 +++++++++++++++++
30 arch/arm/tools/mach-types | 1 +
31 drivers/input/keyboard/Kconfig | 11 +++++++++++
32 drivers/input/keyboard/Makefile | 1 +
33 drivers/mtd/nand/nand_bbt.c | 2 ++
34 7 files changed, 40 insertions(+), 0 deletions(-)
35
36 diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig
37 index 4a211d8..4c3b6b2 100644
38 --- a/arch/arm/mach-s3c2440/Kconfig
39 +++ b/arch/arm/mach-s3c2440/Kconfig
40 @@ -98,6 +98,13 @@ config NEO1973_GTA02_2440
41 Say Y here if you are using an early hardware revision
42 of the FIC/Openmoko Neo1973 GTA02 GSM Phone.
43
44 +config MACH_M800
45 + bool "E-TEN glofiish M800/X800"
46 + select CPU_S3C2442
47 + help
48 + Say Y here if you are using the E-TEN glofiish M800/X800.
49 +
50 +
51 endmenu
52
53 #source "arch/arm/mach-s3c2440/camera/Kconfig"
54 diff --git a/arch/arm/mach-s3c2440/Makefile b/arch/arm/mach-s3c2440/Makefile
55 index e3ca9e3..8617820 100644
56 --- a/arch/arm/mach-s3c2440/Makefile
57 +++ b/arch/arm/mach-s3c2440/Makefile
58 @@ -24,3 +24,4 @@ obj-$(CONFIG_ARCH_S3C2440) += mach-smdk2440.o
59 obj-$(CONFIG_MACH_NEXCODER_2440) += mach-nexcoder.o
60 obj-$(CONFIG_MACH_HXD8) += mach-hxd8.o
61 obj-$(CONFIG_MACH_NEO1973_GTA02) += mach-gta02.o
62 +obj-$(CONFIG_MACH_M800) += mach-glofiish.o
63 diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_bt.c b/arch/arm/plat-s3c24xx/neo1973_pm_bt.c
64 index dfc9ae8..dcb251b 100644
65 --- a/arch/arm/plat-s3c24xx/neo1973_pm_bt.c
66 +++ b/arch/arm/plat-s3c24xx/neo1973_pm_bt.c
67 @@ -30,6 +30,9 @@
68 #include <linux/pcf50633.h>
69 #endif
70
71 +#ifdef CONFIG_MACH_M800
72 +#include <asm/arch/glofiish.h>
73 +#endif
74
75 #define DRVMSG "FIC Neo1973 Bluetooth Power Management"
76
77 @@ -56,6 +59,14 @@ static ssize_t bt_read(struct device *dev, struct device_attribute *attr,
78 break;
79 #endif /* CONFIG_MACH_NEO1973_GTA02 */
80
81 +#ifdef CONFIG_MACH_M800
82 + case MACH_TYPE_M800:
83 + if (s3c2410_gpio_getpin(M800_GPIO_BT_POWER_1) &&
84 + s3c2410_gpio_getpin(M800_GPIO_BT_POWER_2))
85 + goto out_1;
86 + break;
87 +#endif /* CONFIG_MACH_M800 */
88 +
89 }
90 } else if (!strcmp(attr->attr.name, "reset")) {
91 switch (machine_arch_type) {
92 @@ -121,6 +132,12 @@ static ssize_t bt_write(struct device *dev, struct device_attribute *attr,
93 break;
94 #endif /* CONFIG_MACH_NEO1973_GTA02 */
95
96 +#ifdef CONFIG_MACH_M800
97 + case MACH_TYPE_M800:
98 + s3c2410_gpio_setpin(M800_GPIO_BT_POWER_1, on);
99 + s3c2410_gpio_setpin(M800_GPIO_BT_POWER_2, on);
100 + break;
101 +#endif /* CONFIG_MACH_M800 */
102 }
103 } else if (!strcmp(attr->attr.name, "reset")) {
104 /* reset is low-active, so we need to invert */
105 diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
106 index 0a9a5e7..2578091 100644
107 --- a/arch/arm/tools/mach-types
108 +++ b/arch/arm/tools/mach-types
109 @@ -1367,3 +1367,4 @@ db88f5281 MACH_DB88F5281 DB88F5281 1358
110 csb726 MACH_CSB726 CSB726 1359
111 tik27 MACH_TIK27 TIK27 1360
112 mx_uc7420 MACH_MX_UC7420 MX_UC7420 1361
113 +m800 MACH_M800 M800 1772
114 diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
115 index a61ca45..68a893f 100644
116 --- a/drivers/input/keyboard/Kconfig
117 +++ b/drivers/input/keyboard/Kconfig
118 @@ -304,6 +304,17 @@ config KEYBOARD_NEO1973
119 To compile this driver as a module, choose M here: the
120 module will be called neo1973kbd.
121
122 +config KEYBOARD_M800
123 + tristate "E-TEN glofiish M800 buttons"
124 + depends on MACH_M800
125 + default y
126 + help
127 + Say Y here to enable the buttons on the E-TEN glofiish
128 + M800 GSM phone.
129 +
130 + To compile this driver as a module, choose M here: the
131 + module will be called m800kbd.
132 +
133 config KEYBOARD_QT2410
134 tristate "QT2410 buttons"
135 depends on MACH_QT2410
136 diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile
137 index 34bfc33..005a050 100644
138 --- a/drivers/input/keyboard/Makefile
139 +++ b/drivers/input/keyboard/Makefile
140 @@ -15,6 +15,7 @@ obj-$(CONFIG_KEYBOARD_NEWTON) += newtonkbd.o
141 obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
142 obj-$(CONFIG_KEYBOARD_CORGI) += corgikbd.o
143 obj-$(CONFIG_KEYBOARD_NEO1973) += neo1973kbd.o
144 +obj-$(CONFIG_KEYBOARD_M800) += m800kbd.o
145 obj-$(CONFIG_KEYBOARD_QT2410) += qt2410kbd.o
146 obj-$(CONFIG_KEYBOARD_SPITZ) += spitzkbd.o
147 obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
148 diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
149 index 5e121ce..7e20816 100644
150 --- a/drivers/mtd/nand/nand_bbt.c
151 +++ b/drivers/mtd/nand/nand_bbt.c
152 @@ -430,8 +430,10 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf,
153
154 if (ret) {
155 this->bbt[i >> 3] |= 0x03 << (i & 0x6);
156 +#if 0
157 printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n",
158 i >> 1, (unsigned int)from);
159 +#endif
160 mtd->ecc_stats.badblocks++;
161 }
162
163 --
164 1.5.6.5
165
This page took 0.050561 seconds and 5 git commands to generate.