aboutsummaryrefslogtreecommitdiffstats
path: root/packages/linux/linux-ezx-2.6.21/patches/ezx-core.patch
blob: 711a8a467bde27bb52321bef691617e62b64ea49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
Index: linux-2.6.21/arch/arm/boot/compressed/head-xscale.S
===================================================================
--- linux-2.6.21.orig/arch/arm/boot/compressed/head-xscale.S	2007-09-23 13:27:06.000000000 -0300
+++ linux-2.6.21/arch/arm/boot/compressed/head-xscale.S	2007-09-23 13:27:19.000000000 -0300
@@ -53,3 +53,6 @@
 		str	r1, [r0, #0x18]
 #endif
 
+#ifdef CONFIG_ARCH_EZX
+		mov	r7, #MACH_TYPE_EZX
+#endif
Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig
===================================================================
--- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig	2007-09-23 13:27:06.000000000 -0300
+++ linux-2.6.21/arch/arm/mach-pxa/Kconfig	2007-09-23 13:27:19.000000000 -0300
@@ -37,6 +37,10 @@
 	bool "Keith und Koep Trizeps4 DIMM-Module"
 	select PXA27x
 
+config PXA_EZX
+	bool "Motorola EZX Platform"
+	select PXA_SSP
+
 endchoice
 
 if PXA_SHARPSL
@@ -71,6 +75,35 @@
 
 endif
 
+if PXA_EZX
+
+choice
+	prompt "Select target EZX device"
+
+config PXA_EZX_E680
+	bool "Motorola E680 GSM Phone"
+	select PXA27x
+
+config PXA_EZX_A780
+	bool "Motorola A780 GSM Phone"
+	select PXA27x
+
+config PXA_EZX_E2
+	bool "Motorola E2 GSM Phone"
+	select PXA27x
+
+config PXA_EZX_A1200
+	bool "Motorola A1200 GSM Phone"
+	select PXA27x
+
+config PXA_EZX_E6
+	bool "Motorola E6 GSM Phone"
+	select PXA27x
+
+endchoice
+
+endif
+
 endmenu
 
 config MACH_POODLE
@@ -144,4 +177,5 @@
 	tristate
 	help
 	  Enable support for PXA2xx SSP ports
+
 endif
Index: linux-2.6.21/arch/arm/mach-pxa/Makefile
===================================================================
--- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile	2007-09-23 13:27:06.000000000 -0300
+++ linux-2.6.21/arch/arm/mach-pxa/Makefile	2007-09-23 13:27:19.000000000 -0300
@@ -18,6 +18,12 @@
 obj-$(CONFIG_MACH_AKITA)	+= akita-ioexp.o
 obj-$(CONFIG_MACH_POODLE)	+= poodle.o corgi_ssp.o
 obj-$(CONFIG_MACH_TOSA)         += tosa.o
+obj-$(CONFIG_PXA_EZX)		+= ezx.o
+obj-$(CONFIG_PXA_EZX_A780)	+= ezx-a780.o
+obj-$(CONFIG_PXA_EZX_E680)	+= ezx-e680.o
+obj-$(CONFIG_PXA_EZX_E2)	+= ezx-e2.o
+obj-$(CONFIG_PXA_EZX_A1200)	+= ezx-a1200.o
+obj-$(CONFIG_PXA_EZX_E6)	+= ezx-e6.o
 
 # Support for blinky lights
 led-y := leds.o
Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.21/arch/arm/mach-pxa/ezx.c	2007-09-23 13:27:19.000000000 -0300
@@ -0,0 +1,118 @@
+/*
+ *  ezx.c - Common code for EZX platform.
+ *
+ *  Copyright (c) 2005-2007 OpenEZX Team (www.openezx.org)
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/fb.h>
+#include <linux/delay.h>
+
+#include <asm/arch/pxafb.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/ohci.h>
+#include <asm/arch/ezx.h>
+
+#include "generic.h"
+
+/* EZX PXA Framebuffer */
+void ezx_lcd_power(int on, struct fb_var_screeninfo *var)
+{
+	if (on) {
+		mdelay(1);
+		GPSR3 = 0x00100000;
+		mdelay(10);
+		GPCR3 = 0x00100000;
+		GPDR3 |= 0x00100000;
+	} else {
+		GPSR3 = 0x00100000;
+		PGSR3 |= 0x00100000;
+		mdelay(41);
+		LCCR0 &= ~LCCR0_LDM;	/* disable lcd disable done interrupt */
+		LCCR0 |= LCCR0_DIS;	/* normal disable lcd */
+		mdelay(18);
+	}
+}
+EXPORT_SYMBOL(ezx_lcd_power);
+
+/* failsafe if we are not using the backlight platform driver */
+#ifndef CONFIG_BACKLIGHT_EZX
+void ezx_backlight_power(int on)
+{
+       if (on) {
+               pxa_gpio_mode(GPIO16_PWM0_MD);
+               pxa_set_cken(CKEN0_PWM0, 1);
+               PWM_CTRL0 = 0;
+               PWM_PWDUTY0 = 0x3ff;
+               PWM_PERVAL0 = 0x3ff;
+       } else {
+               PWM_CTRL0 = 0;
+               PWM_PWDUTY0 = 0x0;
+               PWM_PERVAL0 = 0x3FF;
+               pxa_set_cken(CKEN0_PWM0, 0);
+       }
+}
+#else
+void ezx_backlight_power(int on){}
+#endif
+EXPORT_SYMBOL(ezx_backlight_power);
+
+/* OHCI Controller */
+static int ezx_ohci_init(struct device *dev)
+{
+	/* for A780 support (connected with Neptune) */
+	pxa_gpio_mode(GPIO30_USB_P3_2);	/* GPIO30 - USB_P3_2/ICL_TXENB */
+	pxa_gpio_mode(GPIO31_USB_P3_6);	/* GPIO31 - USB_P3_6/ICL_VPOUT */
+	pxa_gpio_mode(GPIO90_USB_P3_5);	/* GPIO90 - USB_P3_5/ICL_VPIN */
+	pxa_gpio_mode(GPIO91_USB_P3_1);	/* GPIO91 - USB_P3_1/ICL_XRXD */
+	pxa_gpio_mode(GPIO56_USB_P3_4);	/* GPIO56 - USB_P3_4/ICL_VMOUT */
+	pxa_gpio_mode(GPIO113_USB_P3_3);/* GPIO113 - USB_P3_3/ICL_VMIN */
+	UP3OCR = 0x00000002;
+
+	UHCHR = UHCHR & ~(UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE);
+
+	return 0;
+}
+
+static struct pxaohci_platform_data ezx_ohci_platform_data = {
+	.port_mode	= PMM_NPS_MODE,
+	.init		= ezx_ohci_init,
+};
+
+
+static struct platform_device *devices[] __initdata = {
+};
+
+static int __init ezx_init(void)
+{
+	CKEN = CKEN9_OSTIMER | CKEN22_MEMC;
+
+	pxa_gpio_mode(GPIO_ICL_FFRXD_MD);
+	pxa_gpio_mode(GPIO_ICL_FFTXD_MD);
+	pxa_gpio_mode(GPIO_ICL_FFCTS_MD);
+	pxa_gpio_mode(GPIO_ICL_FFRTS_MD);
+
+	pxa_gpio_mode(GPIO42_BTRXD_MD);
+	pxa_gpio_mode(GPIO43_BTTXD_MD);
+	pxa_gpio_mode(GPIO44_BTCTS_MD);
+	pxa_gpio_mode(GPIO45_BTRTS_MD);
+
+	/* Standard UART */
+	pxa_gpio_mode(GPIO46_STRXD_MD);
+	pxa_gpio_mode(GPIO47_STTXD_MD);
+
+	pxa_set_ohci_info(&ezx_ohci_platform_data);
+
+	platform_add_devices(devices, ARRAY_SIZE(devices));
+
+	return 0;
+}
+
+subsys_initcall(ezx_init);
Index: linux-2.6.21/include/asm-arm/arch-pxa/ezx.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.21/include/asm-arm/arch-pxa/ezx.h	2007-09-23 13:27:19.000000000 -0300
@@ -0,0 +1,225 @@
+/*
+ *  linux/include/asm-arm/arch-pxa/ezx.h
+ *
+ *  Specific macro defines for Motorola Ezx Development Platform
+ *
+ *  Author:     Zhuang Xiaofan
+ *  Created:    Nov 25, 2003
+ *  Copyright:  Motorola Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/* support E680 p3 and ealier PCB */
+//#define   E680_P3_AND_EARLY
+
+#define GPIO_is_high(x) (GPLR(x) & GPIO_bit(x))
+#define set_GPIO(x) (GPSR(x) = GPIO_bit(x))
+#define clr_GPIO(x) (GPCR(x) = GPIO_bit(x))
+
+/*
+ * Flags in memory for sleep use
+ */
+#define FLAG_ADDR       PHYS_OFFSET
+#define RESUME_ADDR     (PHYS_OFFSET + 4)
+#define BPSIG_ADDR      (PHYS_OFFSET + 8)
+
+#define USER_OFF_FLAG   0x5a5a5a5a
+#define SLEEP_FLAG      0x6b6b6b6b
+#define OFF_FLAG        0x7c7c7c7c
+#define REFLASH_FLAG    0x0C1D2E3F
+#define PASS_THRU_FLAG	0x12345678
+
+#define WDI_FLAG        0xbb00dead
+#define NO_FLAG         0xaa00dead
+
+/*
+ * GPIO control pin, have to change when hardware lock down
+ */
+
+#ifdef E680_P3_AND_EARLY
+
+/* shakehand  with BP's PIN  */
+#define GPIO_BP_RDY            0       /* BP_RDY     */
+#define GPIO_BB_WDI            13      /* BB_WDI     */
+#define GPIO_BB_WDI2           3       /* BB_WDI2    */
+#define GPIO_BB_RESET          57      /* BB_RESET   */
+#define GPIO_MCU_INT_SW        115     /* MCU_INT_SW */
+#define GPIO_TC_MM_EN          89      /* TC_MM_EN   */
+
+/* control PCAP direct PIN */
+#define GPIO_WDI_AP            4       /* WDI_AP                       */
+#define GPIO_SYS_RESTART       55      /* restart PCAP power           */
+#define GPIO_AP_STANDBY        28      /* make pcap enter standby mode */
+
+/* communicate with PCAP's PIN  */
+#define GPIO_PCAP_SEC_INT      1       /* PCAP interrupt PIN to AP     */
+#define GPIO_SPI_CLK           23      /* PCAP SPI port clock          */
+#define GPIO_SPI_CE            24      /* PCAP SPI port SSPFRM         */
+#define GPIO_SPI_MOSI          25      /* PCAP SPI port SSPTXD         */
+#define GPIO_SPI_MISO          26      /* PCAP SPI port SSPRXD         */
+
+/*  blue tooth control PIN   */
+#define GPIO_BT_WAKEUP         2       /* AP wake up bluetooth module        */
+#define GPIO_BT_HOSTWAKE       14      /* bluetooth module wake up Ap module */
+#define GPIO_BT_RESET          56      /* AP reset bluetooth module          */
+
+/* control LCD high - OFF low -- ON  */
+#define GPIO_LCD_OFF           116     /* control LCD                */
+
+/*  FFUART PIN              */
+#define GPIO_ICL_FFRXD_MD      (34 | GPIO_ALT_FN_1_IN)
+#define GPIO_ICL_FFCTS_MD      (35 | GPIO_ALT_FN_1_IN)
+#define GPIO_ICL_FFTXD_MD      (39 | GPIO_ALT_FN_2_OUT)
+#define GPIO_ICL_FFRTS_MD      (41 | GPIO_ALT_FN_2_OUT)
+
+#elif defined(A780_P1_AND_EARLY)
+
+/* shakehand  with BP's PIN  */
+#define GPIO_BP_RDY            0       /* BP_RDY     */
+#define GPIO_BB_WDI            13      /* BB_WDI     */
+#define GPIO_BB_WDI2           3       /* BB_WDI2    */
+#define GPIO_BB_RESET          82      /* BB_RESET   */
+#define GPIO_MCU_INT_SW        57      /* MCU_INT_SW */
+#define GPIO_TC_MM_EN          89      /* TC_MM_EN   */
+
+/* control PCAP direct PIN */
+#define GPIO_WDI_AP            4       /* WDI_AP                       */
+#define GPIO_SYS_RESTART       55      /* restart PCAP power           */
+#define GPIO_AP_STANDBY        28      /* make pcap enter standby mode */
+
+/* communicate with PCAP's PIN  */
+#define GPIO_PCAP_SEC_INT      1       /* PCAP interrupt PIN to AP     */
+#define GPIO_SPI_CLK           29      /* PCAP SPI port clock          */
+#define GPIO_SPI_CE            24      /* PCAP SPI port SSPFRM         */
+#define GPIO_SPI_MOSI          25      /* PCAP SPI port SSPTXD         */
+#define GPIO_SPI_MISO          26      /* PCAP SPI port SSPRXD         */
+
+/*  blue tooth control PIN   */
+#define GPIO_BT_WAKEUP         2       /* AP wake up bluetooth module        */
+#define GPIO_BT_HOSTWAKE       14      /* bluetooth module wake up Ap module */
+#define GPIO_BT_RESET          56      /* AP reset bluetooth module          */
+
+/* control LCD high - OFF low -- ON  */
+#define GPIO_LCD_OFF           116     /* control LCD                */
+
+/*  FFUART PIN              */
+#define GPIO_ICL_FFRXD_MD      (53 | GPIO_ALT_FN_1_IN)
+#define GPIO_ICL_FFCTS_MD      (35 | GPIO_ALT_FN_1_IN)
+#define GPIO_ICL_FFTXD_MD      (39 | GPIO_ALT_FN_2_OUT)
+#define GPIO_ICL_FFRTS_MD      (41 | GPIO_ALT_FN_2_OUT)
+
+#else
+
+/* shakehand  with BP's PIN  */
+#define GPIO_BP_RDY            0       /* BP_RDY     */
+#define GPIO_BB_WDI            13      /* BB_WDI     */
+#define GPIO_BB_WDI2           3       /* BB_WDI2    */
+#define GPIO_BB_RESET          82      /* BB_RESET   */
+#define GPIO_MCU_INT_SW        57      /* MCU_INT_SW */
+#define GPIO_TC_MM_EN          99      /* TC_MM_EN   */
+
+/* control PCAP direct PIN */
+#define GPIO_WDI_AP            4       /* WDI_AP                       */
+#define GPIO_SYS_RESTART       55      /* restart PCAP power           */
+//#define GPIO_AP_STANDBY        28      /* make pcap enter standby mode */
+
+/* communicate with PCAP's PIN  */
+#define GPIO_PCAP_SEC_INT      1       /* PCAP interrupt PIN to AP     */
+#define GPIO_SPI_CLK           29      /* PCAP SPI port clock          */
+#define GPIO_SPI_CE            24      /* PCAP SPI port SSPFRM         */
+#define GPIO_SPI_MOSI          25      /* PCAP SPI port SSPTXD         */
+#define GPIO_SPI_MISO          26      /* PCAP SPI port SSPRXD         */
+
+/*  blue tooth control PIN   */
+#define GPIO_BT_WAKEUP         28      /* AP wake up bluetooth module  */
+#define GPIO_BT_HOSTWAKE       14      /* AP wake up bluetooth module  */
+#define GPIO_BT_RESET          48      /* AP reset bluetooth module    */
+
+/* control LCD high - OFF low -- ON  */
+#define GPIO_LCD_OFF           116     /* control LCD                */
+
+/*  FFUART PIN              */
+#define GPIO_ICL_FFRXD_MD      (53 | GPIO_ALT_FN_1_IN)
+#define GPIO_ICL_FFCTS_MD      (35 | GPIO_ALT_FN_1_IN)
+#define GPIO_ICL_FFTXD_MD      (39 | GPIO_ALT_FN_2_OUT)
+#define GPIO_ICL_FFRTS_MD      (41 | GPIO_ALT_FN_2_OUT)
+
+#endif
+/*
+ * ezx platform, wake up source edge detect bit
+ */
+#define PEDR_INT_SEC            1
+
+#define GPIO_FLIP_PIN          12
+/*E680 screen lock button*/
+
+#define GPIO_LOCK_SCREEN_PIN    GPIO_FLIP_PIN
+
+/* MMC interface */
+#define GPIO_MMC_DETECT         11
+#define GPIO_MMC_CLK            32
+#define GPIO_MMC_DATA0          92
+#define GPIO_MMC_WP		107
+#define GPIO_MMC_DATA1          109
+#define GPIO_MMC_DATA2          110
+#define GPIO_MMC_DATA3          111
+#define GPIO_MMC_CMD            112
+
+/* interface function */
+#define GPIO_MMC_CLK_MD         (GPIO_MMC_CLK | GPIO_ALT_FN_2_OUT)
+#define GPIO_MMC_DATA0_MD       (GPIO_MMC_DATA0 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT)
+#define GPIO_MMC_DATA1_MD       (GPIO_MMC_DATA1 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT)
+#define GPIO_MMC_DATA2_MD       (GPIO_MMC_DATA2 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT)
+#define GPIO_MMC_DATA3_MD       (GPIO_MMC_DATA3 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT)
+
+#define GPIO_MMC_CMD_MD         (GPIO_MMC_CMD | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT)
+
+/* EMU GPIO 119 ---MUX2 120 --- MUX1   */
+#define GPIO_EMU_MUX1      120
+#define GPIO_EMU_MUX2      119
+#define GPIO_SNP_INT_CTL   86
+#define GPIO_SNP_INT_IN    87
+
+
+/* audio related pins  */
+#define AP_13MHZ_OUTPUT_PIN  9
+
+#ifdef CONFIG_ARCH_EZX_E680
+#define GPIO_VA_SEL_BUL     79
+#define GPIO_FLT_SEL_BUL    80		/* out filter select pin */
+#define GPIO_MIDI_RESET    78		/* GPIO used by MIDI chipset */
+#define GPIO_MIDI_CS       33
+#define GPIO_MIDI_IRQ      15
+#define GPIO_MIDI_NPWE     49
+#define GPIO_MIDI_RDY      18
+#endif
+
+#ifdef CONFIG_ARCH_EZX_A780
+#define GPIO_HW_ATTENUATE_A780	96	/* hw noise attenuation be used or bypassed, for receiver or louderspeaker mode */
+#endif
+
+
+/* bp status pin */
+#define GPIO_BP_STATE       41
+
+/* define usb related pin  */
+#define GPIO34_TXENB        34
+#define GPIO35_XRXD         35
+#define GPIO36_VMOUT        36
+#define GPIO39_VPOUT        39
+#define GPIO40_VPIN         40
+#define GPIO53_VMIN         53
+
+/* USB client 6 pin defination */
+#define GPIO34_TXENB_MD     (GPIO34_TXENB | GPIO_ALT_FN_1_OUT)
+#define GPIO35_XRXD_MD      (GPIO35_XRXD | GPIO_ALT_FN_2_IN )
+#define GPIO36_VMOUT_MD     (GPIO36_VMOUT | GPIO_ALT_FN_1_OUT)
+#define GPIO39_VPOUT_MD     (GPIO39_VPOUT | GPIO_ALT_FN_1_OUT)
+#define GPIO40_VPIN_MD      (GPIO40_VPIN | GPIO_ALT_FN_3_IN )
+#define GPIO53_VMIN_MD      (GPIO53_VMIN | GPIO_ALT_FN_2_IN )
+
+#define GPIO53_FFRXD_MD     (53 | GPIO_ALT_FN_1_IN)
+
Index: linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h
===================================================================
--- linux-2.6.21.orig/include/asm-arm/arch-pxa/pxa-regs.h	2007-09-23 13:27:13.000000000 -0300
+++ linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h	2007-09-23 13:27:19.000000000 -0300
@@ -856,6 +856,8 @@
 #define UP2OCR_HXOE		(1 << 17)	/* Host Port 2 Transceiver Output Enable */
 #define UP2OCR_SEOS		(1 << 24)	/* Single-Ended Output Select */
 
+#define UP3OCR		__REG(0x40600024)  /* USB Port 3 Output Control register */
+
 #define UDCCSN(x)	__REG2(0x40600100, (x) << 2)
 #define UDCCSR0         __REG(0x40600100) /* UDC Control/Status register - Endpoint 0 */
 #define UDCCSR0_SA	(1 << 7)	/* Setup Active */
@@ -1259,6 +1261,7 @@
 #define GPIO33_nCS_5		33	/* chip select 5 */
 #define GPIO34_FFRXD		34	/* FFUART receive */
 #define GPIO34_MMCCS0		34	/* MMC Chip Select 0 */
+#define GPIO34_USB_P2_2		34	/* USB Port2 Pin 2 */
 #define GPIO35_FFCTS		35	/* FFUART Clear to send */
 #define GPIO36_FFDCD		36	/* FFUART Data carrier detect */
 #define GPIO37_FFDSR		37	/* FFUART data set ready */
@@ -1372,6 +1375,7 @@
 #define GPIO18_RDY_MD		(18 | GPIO_ALT_FN_1_IN)
 #define GPIO19_DREQ1_MD		(19 | GPIO_ALT_FN_1_IN)
 #define GPIO20_DREQ0_MD		(20 | GPIO_ALT_FN_1_IN)
+#define GPIO22_SCLK2_MD		(22 | GPIO_ALT_FN_3_IN)
 #define GPIO23_SCLK_MD		(23 | GPIO_ALT_FN_2_OUT)
 #define GPIO24_SFRM_MD		(24 | GPIO_ALT_FN_2_OUT)
 #define GPIO25_STXD_MD		(25 | GPIO_ALT_FN_2_OUT)
@@ -1382,23 +1386,33 @@
 #define GPIO28_BITCLK_OUT_I2S_MD	(28 | GPIO_ALT_FN_1_OUT)
 #define GPIO29_SDATA_IN_AC97_MD	(29 | GPIO_ALT_FN_1_IN)
 #define GPIO29_SDATA_IN_I2S_MD	(29 | GPIO_ALT_FN_2_IN)
+#define GPIO29_SCLK_MD		(29 | GPIO_ALT_FN_3_IN)
 #define GPIO30_SDATA_OUT_AC97_MD	(30 | GPIO_ALT_FN_2_OUT)
 #define GPIO30_SDATA_OUT_I2S_MD	(30 | GPIO_ALT_FN_1_OUT)
+#define GPIO30_USB_P3_2		(30 | GPIO_ALT_FN_3_OUT)
 #define GPIO31_SYNC_I2S_MD	(31 | GPIO_ALT_FN_1_OUT)
 #define GPIO31_SYNC_AC97_MD	(31 | GPIO_ALT_FN_2_OUT)
+#define GPIO31_USB_P3_6		(31 | GPIO_ALT_FN_3_OUT)
 #define GPIO32_SDATA_IN1_AC97_MD	(32 | GPIO_ALT_FN_1_IN)
 #define GPIO32_SYSCLK_I2S_MD	(32 | GPIO_ALT_FN_1_OUT)
 #define GPIO32_MMCCLK_MD		( 32 | GPIO_ALT_FN_2_OUT)
 #define GPIO33_nCS_5_MD		(33 | GPIO_ALT_FN_2_OUT)
 #define GPIO34_FFRXD_MD		(34 | GPIO_ALT_FN_1_IN)
 #define GPIO34_MMCCS0_MD	(34 | GPIO_ALT_FN_2_OUT)
+#define GPIO34_USB_P2_2_MD	(34 | GPIO_ALT_FN_1_OUT)
 #define GPIO35_FFCTS_MD		(35 | GPIO_ALT_FN_1_IN)
+#define GPIO35_USB_P2_1_MD	(35 | GPIO_ALT_FN_2_IN)
 #define GPIO36_FFDCD_MD		(36 | GPIO_ALT_FN_1_IN)
+#define GPIO36_USB_P2_4_MD	(36 | GPIO_ALT_FN_1_OUT)
 #define GPIO37_FFDSR_MD		(37 | GPIO_ALT_FN_1_IN)
+#define GPIO37_SFRM2_MD		(37 | GPIO_ALT_FN_2_IN)
 #define GPIO38_FFRI_MD		(38 | GPIO_ALT_FN_1_IN)
+#define GPIO38_STXD2_MD		(38 | GPIO_ALT_FN_2_OUT)
 #define GPIO39_MMCCS1_MD	(39 | GPIO_ALT_FN_1_OUT)
 #define GPIO39_FFTXD_MD		(39 | GPIO_ALT_FN_2_OUT)
+#define GPIO39_USB_P2_6_MD	(39 | GPIO_ALT_FN_1_OUT)
 #define GPIO40_FFDTR_MD		(40 | GPIO_ALT_FN_2_OUT)
+#define GPIO40_USB_P2_5_MD	(40 | GPIO_ALT_FN_3_IN)
 #define GPIO41_FFRTS_MD		(41 | GPIO_ALT_FN_2_OUT)
 #define GPIO42_BTRXD_MD		(42 | GPIO_ALT_FN_1_IN)
 #define GPIO42_HWRXD_MD		(42 | GPIO_ALT_FN_3_IN)
@@ -1423,13 +1437,17 @@
 #define GPIO51_HWRTS_MD         (51 | GPIO_ALT_FN_1_OUT)
 #define GPIO51_nPIOW_MD		(51 | GPIO_ALT_FN_2_OUT)
 #define GPIO52_nPCE_1_MD	(52 | GPIO_ALT_FN_2_OUT)
+#define GPIO52_SCLK3_MD		(52 | GPIO_ALT_FN_2_OUT)
 #define GPIO53_nPCE_2_MD	(53 | GPIO_ALT_FN_2_OUT)
 #define GPIO53_MMCCLK_MD	(53 | GPIO_ALT_FN_1_OUT)
+#define GPIO53_FFRXD_MD		(53 | GPIO_ALT_FN_1_IN)
+#define GPIO53_USB_P2_3_MD	(53 | GPIO_ALT_FN_2_IN)
 #define GPIO54_MMCCLK_MD	(54 | GPIO_ALT_FN_1_OUT)
 #define GPIO54_nPCE_2_MD	(54 | GPIO_ALT_FN_2_OUT)
 #define GPIO54_pSKTSEL_MD	(54 | GPIO_ALT_FN_2_OUT)
 #define GPIO55_nPREG_MD		(55 | GPIO_ALT_FN_2_OUT)
 #define GPIO56_nPWAIT_MD	(56 | GPIO_ALT_FN_1_IN)
+#define GPIO56_USB_P3_4		(56 | GPIO_ALT_FN_1_OUT)
 #define GPIO57_nIOIS16_MD	(57 | GPIO_ALT_FN_1_IN)
 #define GPIO58_LDD_0_MD		(58 | GPIO_ALT_FN_2_OUT)
 #define GPIO59_LDD_1_MD		(59 | GPIO_ALT_FN_2_OUT)
@@ -1465,13 +1483,19 @@
 #define GPIO80_nCS_4_MD		(80 | GPIO_ALT_FN_2_OUT)
 #define GPIO81_NSSP_CLK_OUT 	(81 | GPIO_ALT_FN_1_OUT)
 #define GPIO81_NSSP_CLK_IN  	(81 | GPIO_ALT_FN_1_IN)
+#define GPIO81_STXD3_MD		(81 | GPIO_ALT_FN_1_OUT)
 #define GPIO82_NSSP_FRM_OUT 	(82 | GPIO_ALT_FN_1_OUT)
 #define GPIO82_NSSP_FRM_IN  	(82 | GPIO_ALT_FN_1_IN)
 #define GPIO83_NSSP_TX      	(83 | GPIO_ALT_FN_1_OUT)
 #define GPIO83_NSSP_RX      	(83 | GPIO_ALT_FN_2_IN)
+#define GPIO83_SFRM3_MD		(83 | GPIO_ALT_FN_1_IN)
 #define GPIO84_NSSP_TX      	(84 | GPIO_ALT_FN_1_OUT)
 #define GPIO84_NSSP_RX      	(84 | GPIO_ALT_FN_2_IN)
 #define GPIO85_nPCE_1_MD	(85 | GPIO_ALT_FN_1_OUT)
+#define GPIO88_SRXD2_MD		(88 | GPIO_ALT_FN_2_IN)
+#define GPIO89_SRXD3_MD		(89 | GPIO_ALT_FN_1_IN)
+#define GPIO90_USB_P3_5		(90 | GPIO_ALT_FN_2_IN)
+#define GPIO91_USB_P3_1		(91 | GPIO_ALT_FN_2_IN)
 #define GPIO92_MMCDAT0_MD	(92 | GPIO_ALT_FN_1_OUT)
 #define GPIO102_nPCE_1_MD	(102 | GPIO_ALT_FN_1_OUT)
 #define GPIO104_pSKTSEL_MD	(104 | GPIO_ALT_FN_1_OUT)
@@ -1483,6 +1507,7 @@
 #define GPIO112_MMCCMD_MD	(112 | GPIO_ALT_FN_1_OUT)
 #define GPIO113_I2S_SYSCLK_MD	(113 | GPIO_ALT_FN_1_OUT)
 #define GPIO113_AC97_RESET_N_MD	(113 | GPIO_ALT_FN_2_OUT)
+#define GPIO113_USB_P3_3	(113 | GPIO_ALT_FN_3_IN)
 #define GPIO117_I2CSCL_MD	(117 | GPIO_ALT_FN_1_IN)
 #define GPIO118_I2CSDA_MD	(118 | GPIO_ALT_FN_1_IN)
 
@@ -1498,6 +1523,7 @@
 #define PFER		__REG(0x40F00014)  /* Power Manager GPIO Falling-Edge Detect Enable Register */
 #define PEDR		__REG(0x40F00018)  /* Power Manager GPIO Edge Detect Status Register */
 #define PCFR		__REG(0x40F0001C)  /* Power Manager General Configuration Register */
+#define PGSR(x)		(__REG(0x40F00020 + ((unsigned long)(x)/32*4)))
 #define PGSR0		__REG(0x40F00020)  /* Power Manager GPIO Sleep State Register for GP[31-0] */
 #define PGSR1		__REG(0x40F00024)  /* Power Manager GPIO Sleep State Register for GP[63-32] */
 #define PGSR2		__REG(0x40F00028)  /* Power Manager GPIO Sleep State Register for GP[84-64] */
Index: linux-2.6.21/arch/arm/boot/compressed/head.S
===================================================================
--- linux-2.6.21.orig/arch/arm/boot/compressed/head.S	2007-09-23 13:27:06.000000000 -0300
+++ linux-2.6.21/arch/arm/boot/compressed/head.S	2007-09-23 13:27:19.000000000 -0300
@@ -117,6 +117,9 @@
 		mov	r0, r0
 		.endr
 
+		mov     r1, #0x300              @ mach_id 0x363 is official EZX
+		orr     r1, r1, #0x63           @ bootloader JUMP doesn't set r1
+
 		b	1f
 		.word	0x016f2818		@ Magic numbers to help the loader
 		.word	start			@ absolute load/run zImage address
Index: linux-2.6.21/include/asm-arm/arch-pxa/uncompress.h
===================================================================
--- linux-2.6.21.orig/include/asm-arm/arch-pxa/uncompress.h	2007-09-23 13:27:06.000000000 -0300
+++ linux-2.6.21/include/asm-arm/arch-pxa/uncompress.h	2007-09-23 13:27:19.000000000 -0300
@@ -14,14 +14,14 @@
 #define STUART		((volatile unsigned long *)0x40700000)
 #define HWUART		((volatile unsigned long *)0x41600000)
 
-#define UART		FFUART
+#define UART		STUART
 
 
 static inline void putc(char c)
 {
-	while (!(UART[5] & 0x20))
+/*	while (!(UART[5] & 0x40))
 		barrier();
-	UART[0] = c;
+	UART[0] = c;*/
 }
 
 /*
Index: linux-2.6.21/arch/arm/mm/init.c
===================================================================
--- linux-2.6.21.orig/arch/arm/mm/init.c	2007-09-23 13:27:07.000000000 -0300
+++ linux-2.6.21/arch/arm/mm/init.c	2007-09-23 13:27:19.000000000 -0300
@@ -241,6 +241,10 @@
 	 */
 	reserve_bootmem_node(pgdat, boot_pfn << PAGE_SHIFT,
 			     boot_pages << PAGE_SHIFT);
+#ifdef CONFIG_PXA_EZX
+	/* reserve the first page memory for exiting sleep and user off */
+	reserve_bootmem_node(pgdat, PHYS_OFFSET, PAGE_SIZE);
+#endif
 
 #ifdef CONFIG_BLK_DEV_INITRD
 	/*
Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c	2007-09-23 13:27:19.000000000 -0300
@@ -0,0 +1,88 @@
+/*
+ *  ezx-a780.c - Code specific to A780 GSM Phone.
+ *
+ *  Copyright (c) 2007 OpenEZX Team (www.openezx.org)
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ */
+
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/fb.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/pxafb.h>
+#include <asm/arch/ezx.h>
+
+#include "generic.h"
+
+extern void ezx_lcd_power(int, struct fb_var_screeninfo *);
+extern void ezx_backlight_power(int);
+
+static struct pxafb_mode_info mode_a780 = {
+	.pixclock	= 150000,
+	.xres		= 240,
+	.yres		= 320,
+	.bpp		= 16,
+	.hsync_len	= 10,
+	.left_margin	= 20,
+	.right_margin	= 10,
+	.vsync_len	= 2,
+	.upper_margin	= 3,
+	.lower_margin	= 2,
+	.sync		= FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+};
+
+static struct pxafb_mach_info a780_fb_info = {
+	.modes		= &mode_a780,
+	.num_modes	= 1,
+	.lccr0		= 0x002008F8,
+	.lccr3		= 0x0430FF09,
+	.pxafb_backlight_power = &ezx_backlight_power,
+	.pxafb_lcd_power = &ezx_lcd_power,
+};
+
+static struct platform_device *devices[] __initdata = {
+};
+
+static void __init a780_init(void)
+{
+	/* setup sleep mode values */
+	PWER  = 0xc0007803;		// disable usb, GPIO15 NC
+	PFER  = 0x00007803;
+	PRER  = 0x00001802;
+	PGSR0 = 0x00000010;
+	PGSR1 = 0x02800000;
+	PGSR2 = 0x00040000;
+	PGSR3 = 0x00000008;
+	PCFR  = PCFR_DC_EN | PCFR_FS | PCFR_FP | PCFR_OPDE;
+	PSLR  = 0x05800f00;
+
+	set_pxa_fb_info(&a780_fb_info);
+
+        /* clear EMU MUX1/MUX2 (low) to close the audio path to EMU */
+	pxa_gpio_mode(GPIO_EMU_MUX1|GPIO_OUT);
+        clr_GPIO(GPIO_EMU_MUX1);
+	pxa_gpio_mode(GPIO_EMU_MUX2|GPIO_OUT);
+        clr_GPIO(GPIO_EMU_MUX2);
+
+        platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+MACHINE_START(EZX, "Motorola Ezx Platform")
+	/* Maintainer: OpenEZX Team (www.openezx.org) */
+	.phys_io 	= 0x40000000,
+	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
+	.boot_params	= 0xa0000100,
+	.map_io		= pxa_map_io,
+	.init_irq	= pxa_init_irq,
+	.timer		= &pxa_timer,
+	.init_machine	= a780_init,
+MACHINE_END
Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e2.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.21/arch/arm/mach-pxa/ezx-e2.c	2007-09-23 13:27:19.000000000 -0300
@@ -0,0 +1,70 @@
+/*
+ *  ezx-e2.c - Code specific to E2 GSM Phone.
+ *
+ *  Copyright (c) 2007 OpenEZX Team (www.openezx.org)
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/fb.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/pxafb.h>
+#include <asm/arch/ezx.h>
+
+#include "generic.h"
+
+extern void ezx_lcd_power(int, struct fb_var_screeninfo *);
+extern void ezx_backlight_power(int);
+
+static struct pxafb_mode_info mode_e2 = {
+       .pixclock = 192308,
+       .xres = 240,
+       .yres = 320,
+       .bpp = 8,
+       .hsync_len = 10,
+       .left_margin = 20,
+       .right_margin = 10,
+       .vsync_len = 2,
+       .upper_margin = 3,
+       .lower_margin = 2,
+       .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+};
+
+static struct pxafb_mach_info e2_fb_info = {
+       .modes = &mode_e2,
+       .num_modes = 1,
+       .lccr0 = 0x022008B8,
+       .lccr3 = 0xC130FF13,
+       .pxafb_backlight_power = &ezx_backlight_power,
+       .pxafb_lcd_power = &ezx_lcd_power,
+};
+
+static struct platform_device *devices[] __initdata = {
+};
+
+static void __init e2_init(void)
+{
+	set_pxa_fb_info(&e2_fb_info);
+
+	platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+MACHINE_START(EZX, "Motorola Ezx Platform")
+	/* Maintainer: OpenEZX Team (www.openezx.org) */
+	.phys_io 	= 0x40000000,
+	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
+	.boot_params	= 0xa0000200,
+	.map_io		= pxa_map_io,
+	.init_irq	= pxa_init_irq,
+	.timer		= &pxa_timer,
+	.init_machine	= e2_init,
+MACHINE_END
Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c	2007-09-23 13:27:19.000000000 -0300
@@ -0,0 +1,87 @@
+/*
+ *  ezx-e680.c - Code specific to E680 GSM Phone.
+ *
+ *  Copyright (c) 2007 OpenEZX Team (www.openezx.org)
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/fb.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/pxafb.h>
+#include <asm/arch/ezx.h>
+
+#include "generic.h"
+
+extern void ezx_lcd_power(int, struct fb_var_screeninfo *);
+extern void ezx_backlight_power(int);
+
+static struct pxafb_mode_info mode_e680 = {
+	.pixclock	= 150000,
+	.xres		= 240,
+	.yres		= 320,
+	.bpp		= 16,
+	.hsync_len	= 10,
+	.left_margin	= 20,
+	.right_margin	= 10,
+	.vsync_len	= 2,
+	.upper_margin	= 3,
+	.lower_margin	= 2,
+	.sync		= FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+};
+
+static struct pxafb_mach_info e680_fb_info = {
+	.modes		= &mode_e680,
+	.num_modes	= 1,
+	.lccr0		= 0x002008F8,
+	.lccr3		= 0x0430FF09,
+	.pxafb_backlight_power = &ezx_backlight_power,
+	.pxafb_lcd_power = &ezx_lcd_power,
+};
+
+static struct platform_device *devices[] __initdata = {
+};
+
+static void __init e680_init(void)
+{
+	/* setup sleep mode values */
+	PWER  = 0xc000f803;		// disable usb 0xdc00f803;
+	PFER  = 0x0000f803;
+	PRER  = 0x00001802;
+	PGSR0 = 0x00000010;
+	PGSR1 = 0x02800000;
+	PGSR2 = 0x00040000;
+	PGSR3 = 0x00000000;
+	PCFR  = PCFR_DC_EN | PCFR_FS | PCFR_FP | PCFR_OPDE;
+	PSLR  = 0x05800f00;
+
+	set_pxa_fb_info(&e680_fb_info);
+
+        /* clear EMU MUX1/MUX2 (low) to close the audio path to EMU */
+	pxa_gpio_mode(GPIO_EMU_MUX1|GPIO_OUT);
+        clr_GPIO(GPIO_EMU_MUX1);
+	pxa_gpio_mode(GPIO_EMU_MUX2|GPIO_OUT);
+        clr_GPIO(GPIO_EMU_MUX2);
+
+	platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+MACHINE_START(EZX, "Motorola Ezx Platform")
+	/* Maintainer: OpenEZX Team (www.openezx.org) */
+	.phys_io 	= 0x40000000,
+	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
+	.boot_params	= 0xa0000100,
+	.map_io		= pxa_map_io,
+	.init_irq	= pxa_init_irq,
+	.timer		= &pxa_timer,
+	.init_machine	= e680_init,
+MACHINE_END
Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a1200.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.21/arch/arm/mach-pxa/ezx-a1200.c	2007-09-23 13:27:19.000000000 -0300
@@ -0,0 +1,70 @@
+/*
+ *  ezx-a1200.c - Code specific to A1200 GSM Phone.
+ *
+ *  Copyright (c) 2007 OpenEZX Team (www.openezx.org)
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/fb.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/pxafb.h>
+#include <asm/arch/ezx.h>
+
+#include "generic.h"
+
+extern void ezx_lcd_power(int, struct fb_var_screeninfo *);
+extern void ezx_backlight_power(int);
+
+static struct pxafb_mode_info mode_a1200 = {
+       .pixclock = 192308,
+       .xres = 240,
+       .yres = 320,
+       .bpp = 8,
+       .hsync_len = 10,
+       .left_margin = 20,
+       .right_margin = 10,
+       .vsync_len = 2,
+       .upper_margin = 3,
+       .lower_margin = 2,
+       .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+};
+
+static struct pxafb_mach_info a1200_fb_info = {
+       .modes = &mode_a1200,
+       .num_modes = 1,
+       .lccr0 = 0x022008B8,
+       .lccr3 = 0xC130FF13,
+       .pxafb_backlight_power = &ezx_backlight_power,
+       .pxafb_lcd_power = &ezx_lcd_power,
+};
+
+static struct platform_device *devices[] __initdata = {
+};
+
+static void __init a1200_init(void)
+{
+	set_pxa_fb_info(&a1200_fb_info);
+
+	platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+MACHINE_START(EZX, "Motorola Ezx Platform")
+	/* Maintainer: OpenEZX Team (www.openezx.org) */
+	.phys_io 	= 0x40000000,
+	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
+	.boot_params	= 0xa0000200,
+	.map_io		= pxa_map_io,
+	.init_irq	= pxa_init_irq,
+	.timer		= &pxa_timer,
+	.init_machine	= a1200_init,
+MACHINE_END
Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e6.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.21/arch/arm/mach-pxa/ezx-e6.c	2007-09-23 13:27:19.000000000 -0300
@@ -0,0 +1,70 @@
+/*
+ *  ezx-e6.c - Code specific to E6 GSM Phone.
+ *
+ *  Copyright (c) 2007 OpenEZX Team (www.openezx.org)
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/fb.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/pxafb.h>
+#include <asm/arch/ezx.h>
+
+#include "generic.h"
+
+extern void ezx_lcd_power(int, struct fb_var_screeninfo *);
+extern void ezx_backlight_power(int);
+
+static struct pxafb_mode_info mode_e6 = {
+       .pixclock = 192308,
+       .xres = 240,
+       .yres = 320,
+       .bpp = 8,
+       .hsync_len = 10,
+       .left_margin = 20,
+       .right_margin = 10,
+       .vsync_len = 2,
+       .upper_margin = 3,
+       .lower_margin = 2,
+       .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+};
+
+static struct pxafb_mach_info e6_fb_info = {
+       .modes = &mode_e6,
+       .num_modes = 1,
+       .lccr0 = 0x022008B8,
+       .lccr3 = 0xC130FF13,
+       .pxafb_backlight_power = &ezx_backlight_power,
+       .pxafb_lcd_power = &ezx_lcd_power,
+};
+
+static struct platform_device *devices[] __initdata = {
+};
+
+static void __init e6_init(void)
+{
+	set_pxa_fb_info(&e6_fb_info);
+
+	platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+MACHINE_START(EZX, "Motorola Ezx Platform")
+	/* Maintainer: OpenEZX Team (www.openezx.org) */
+	.phys_io 	= 0x40000000,
+	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
+	.boot_params	= 0xa0000200,
+	.map_io		= pxa_map_io,
+	.init_irq	= pxa_init_irq,
+	.timer		= &pxa_timer,
+	.init_machine	= e6_init,
+MACHINE_END