summaryrefslogtreecommitdiff
path: root/packages/linux/linux-h6300-omap1-2.6.12-rc5/h6300_omap1_2612rc5.patch
blob: 7e2f452850a10bfaf8fc809f091e69e2de1834dd (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
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
diff -Naur linux-2.6.12-rc5_omap1/arch/arm/mach-omap/clock.c linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/clock.c
--- linux-2.6.12-rc5_omap1/arch/arm/mach-omap/clock.c	2005-08-23 22:36:30.426733413 +0300
+++ linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/clock.c	2005-08-23 22:38:07.446289831 +0300
@@ -21,6 +21,7 @@
 #include <asm/arch/usb.h>
 
 #include "clock.h"
+#include <asm/mach-types.h>
 
 static LIST_HEAD(clocks);
 static DECLARE_MUTEX(clocks_sem);
@@ -447,8 +448,17 @@
 static struct clk mclk_1510 = {
 	.name		= "mclk",
 	/* Direct from ULPD, no parent. May be enabled by ext hardware. */
+#if 0
 	.rate		= 12000000,
 	.flags		= CLOCK_IN_OMAP1510 | RATE_FIXED,
+#else
+	.flags		= CLOCK_IN_OMAP1510,
+	.enable_reg	= COM_CLK_DIV_CTRL_SEL,
+	.enable_bit	= COM_ULPD_PLL_CLK_REQ,
+	.set_rate	= &set_ext_clk_rate,
+	.round_rate	= &round_ext_clk_rate,
+	.init		= &init_ext_clk,
+#endif
 };
 
 static struct clk mclk_16xx = {
@@ -1247,6 +1257,9 @@
 	clk_use(&armxor_ck);
 	clk_use(&armtim_ck);
 
+	if (machine_is_h6300())
+		clk_enable(&lcd_ck);
+
 	if (cpu_is_omap1510())
 		clk_enable(&arm_gpio_ck);
 
diff -Naur linux-2.6.12-rc5_omap1/arch/arm/mach-omap/dma.c linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/dma.c
--- linux-2.6.12-rc5_omap1/arch/arm/mach-omap/dma.c	2005-08-23 22:36:30.615703332 +0300
+++ linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/dma.c	2005-08-23 22:38:07.480284420 +0300
@@ -671,6 +671,7 @@
 	unsigned long top, bottom;
 	int es;
 	u16 w;
+	u16 l;
 	unsigned long en, fn;
 	long ei, fi;
 	unsigned long vxres;
@@ -769,6 +770,10 @@
 	}
 
 	if (omap_dma_in_1510_mode()) {
+		l = omap_readw(OMAP1510_DMA_LCD_CTRL);
+		l &= ~(1 << 6);
+		omap_writew (l, OMAP1510_DMA_LCD_CTRL);
+
 		omap_writew(top >> 16, OMAP1510_DMA_LCD_TOP_F1_U);
 		omap_writew(top, OMAP1510_DMA_LCD_TOP_F1_L);
 		omap_writew(bottom >> 16, OMAP1510_DMA_LCD_BOT_F1_U);
@@ -893,7 +898,6 @@
 	w = omap_readw(OMAP1610_DMA_LCD_CCR);
 	w |= 1 << 7;
 	omap_writew(w, OMAP1610_DMA_LCD_CCR);
-
 	lcd_dma.active = 1;
 }
 
diff -Naur linux-2.6.12-rc5_omap1/arch/arm/mach-omap/mcbsp.c linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/mcbsp.c
--- linux-2.6.12-rc5_omap1/arch/arm/mach-omap/mcbsp.c	2005-08-23 22:36:31.270599085 +0300
+++ linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/mcbsp.c	2005-08-23 22:38:07.481284261 +0300
@@ -760,3 +760,4 @@
 EXPORT_SYMBOL(omap_mcbsp_xmit_buffer);
 EXPORT_SYMBOL(omap_mcbsp_recv_buffer);
 EXPORT_SYMBOL(omap_mcbsp_set_spi_mode);
+EXPORT_SYMBOL(omap_mcbsp_pollwrite);
diff -Naur linux-2.6.12-rc5_omap1/arch/arm/mach-omap/omap1/board-h6300.c linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/omap1/board-h6300.c
--- linux-2.6.12-rc5_omap1/arch/arm/mach-omap/omap1/board-h6300.c	1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/omap1/board-h6300.c	2005-08-23 22:38:07.482284102 +0300
@@ -0,0 +1,143 @@
+/*
+ * linux/arch/arm/mach-omap/board-generic.c
+ *
+ * Modified from board-h6300.c
+ *
+ * Code for generic OMAP board. Should work on many OMAP systems where
+ * the device drivers take care of all the necessary hardware initialization.
+ * Do not put any board specific code to this file; create a new machine
+ * type if you need custom low-level initializations.
+ *
+ * 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/device.h>
+#include <linux/delay.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+
+#include <asm/hardware.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/flash.h>
+#include <asm/mach/map.h>
+
+#include <asm/arch/gpio.h>
+#include <asm/arch/tc.h>
+#include <asm/arch/usb.h>
+
+#include "../common.h"
+
+static int __initdata h6300_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
+
+static struct mtd_partition h6300_partitions[] = {
+	/* bootloader (U-Boot, etc) in first sector */
+	{
+	      .name		= "bootloader",
+	      .offset		= 0,
+	      .size		= SZ_128K,
+	      .mask_flags	= MTD_WRITEABLE, /* force read-only */
+	},
+	/* bootloader params in the next sector */
+	{
+	      .name		= "params",
+	      .offset		= MTDPART_OFS_APPEND,
+	      .size		= SZ_128K,
+	      .mask_flags	= 0,
+	},
+	/* kernel */
+	{
+	      .name		= "kernel",
+	      .offset		= MTDPART_OFS_APPEND,
+	      .size		= SZ_2M,
+	      .mask_flags	= 0
+	},
+	/* rest of flash1 is a file system */
+	{
+	      .name		= "rootfs",
+	      .offset		= MTDPART_OFS_APPEND,
+	      .size		= SZ_16M - SZ_2M - 2 * SZ_128K,
+	      .mask_flags	= 0
+	},
+	/* file system */
+	{
+	      .name		= "filesystem",
+	      .offset		= MTDPART_OFS_APPEND,
+	      .size		= MTDPART_SIZ_FULL,
+	      .mask_flags	= 0
+	}
+};
+
+static struct flash_platform_data h6300_flash_data = {
+	.map_name	= "cfi_probe",
+	.width		= 2,
+	.parts		= h6300_partitions,
+	.nr_parts	= ARRAY_SIZE(h6300_partitions),
+};
+
+static struct resource h6300_flash_resource = {
+	.start		= OMAP_CS0_PHYS,
+	.end		= OMAP_CS0_PHYS + SZ_32M - 1,
+	.flags		= IORESOURCE_MEM,
+};
+
+static struct platform_device h6300_flash_device = {
+	.name		= "omapflash",
+	.id		= 0,
+	.dev		= {
+		.platform_data	= &h6300_flash_data,
+	},
+	.num_resources	= 1,
+	.resource	= &h6300_flash_resource,
+};
+
+static struct platform_device *h6300_devices[] __initdata = {
+	&h6300_flash_device,
+};
+
+static void __init h6300_init_irq(void)
+{
+	omap_init_irq();
+	omap_gpio_init();
+}
+
+/* assume no Mini-AB port */
+
+static struct omap_usb_config h6300_usb_config __initdata = {
+	.hmc_mode	      = 0,
+	.register_dev	  = 1,
+	.pins[0]        = 0,
+};
+
+static struct omap_board_config_kernel h6300_config[] = {
+	{ OMAP_TAG_USB,           &h6300_usb_config },
+};
+
+static void __init h6300_init(void)
+{
+	platform_add_devices(h6300_devices, ARRAY_SIZE(h6300_devices));
+	h6300_config[0].data = &h6300_usb_config;
+
+	omap_board_config = h6300_config;
+	omap_board_config_size = ARRAY_SIZE(h6300_config);
+}
+
+static void __init h6300_map_io(void)
+{
+	omap_map_common_io();
+	omap_serial_init(h6300_serial_ports);
+}
+
+MACHINE_START(H6300, "HP IPaq H6300")
+	MAINTAINER("Everett Coleman II <gcc80x86@fuzzyneural.net>")
+	BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000)
+	BOOT_PARAMS(0x10000100)
+	MAPIO(h6300_map_io)
+	INITIRQ(h6300_init_irq)
+	INIT_MACHINE(h6300_init)
+	.timer		= &omap_timer,
+MACHINE_END
diff -Naur linux-2.6.12-rc5_omap1/arch/arm/mach-omap/omap1/Kconfig linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/omap1/Kconfig
--- linux-2.6.12-rc5_omap1/arch/arm/mach-omap/omap1/Kconfig	2005-08-23 22:36:31.495563275 +0300
+++ linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/omap1/Kconfig	2005-08-23 22:38:07.515278850 +0300
@@ -26,6 +26,12 @@
           TI OMAP 1510 or 1610 Innovator board support. Say Y here if you
           have such a board.
 
+config MACH_H6300
+	bool "HP IPaq H6300"
+	depends on ARCH_OMAP1 && ARCH_OMAP1510
+	help
+			HP IPaq H6300 series
+
 config MACH_OMAP_H2
 	bool "TI H2 Support"
 	depends on ARCH_OMAP1 && ARCH_OMAP16XX
diff -Naur linux-2.6.12-rc5_omap1/arch/arm/mach-omap/omap1/Makefile linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/omap1/Makefile
--- linux-2.6.12-rc5_omap1/arch/arm/mach-omap/omap1/Makefile	2005-08-23 22:36:31.564552293 +0300
+++ linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/omap1/Makefile	2005-08-23 22:38:07.516278691 +0300
@@ -9,6 +9,7 @@
 # Specific board support
 obj-$(CONFIG_MACH_OMAP_H2)		+= board-h2.o
 obj-$(CONFIG_MACH_OMAP_INNOVATOR)	+= board-innovator.o
+obj-$(CONFIG_MACH_H6300)	+= board-h6300.o
 obj-$(CONFIG_MACH_OMAP_GENERIC)		+= board-generic.o
 obj-$(CONFIG_MACH_OMAP_PERSEUS2)	+= board-perseus2.o
 obj-$(CONFIG_MACH_OMAP_OSK)		+= board-osk.o
diff -Naur linux-2.6.12-rc5_omap1/drivers/input/touchscreen/omap/Makefile linux-2.6.12-rc5_omap1_h6300/drivers/input/touchscreen/omap/Makefile
--- linux-2.6.12-rc5_omap1/drivers/input/touchscreen/omap/Makefile	2005-08-23 22:36:32.554394729 +0300
+++ linux-2.6.12-rc5_omap1_h6300/drivers/input/touchscreen/omap/Makefile	2005-08-23 22:38:07.550273279 +0300
@@ -8,5 +8,6 @@
 objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_H3) += ts_hx.o
 objs-$(CONFIG_ARCH_OMAP1510)$(CONFIG_MACH_OMAP_INNOVATOR) += ts_inn1510.o
 objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_OSK) += ts_osk.o
+objs-$(CONFIG_ARCH_OMAP1510)$(CONFIG_MACH_H6300) += ts_hx.o
 
 omapts-objs := omap_ts.o $(objs-yy)
diff -Naur linux-2.6.12-rc5_omap1/drivers/input/touchscreen/omap/omap_ts.c linux-2.6.12-rc5_omap1_h6300/drivers/input/touchscreen/omap/omap_ts.c
--- linux-2.6.12-rc5_omap1/drivers/input/touchscreen/omap/omap_ts.c	2005-08-23 22:36:32.555394570 +0300
+++ linux-2.6.12-rc5_omap1_h6300/drivers/input/touchscreen/omap/omap_ts.c	2005-08-23 22:38:07.551273120 +0300
@@ -39,14 +39,14 @@
 
 #include <asm/mach-types.h>
 
-//#define DEBUG
+#define DEBUG
 
 #include "omap_ts.h"
 
 #define OMAP_TS_NAME	"omap_ts"
 
 static struct ts_device *__initdata ts_devs[] = {
-#if defined(CONFIG_MACH_OMAP_H2) || defined(CONFIG_MACH_OMAP_H3)
+#if defined(CONFIG_MACH_OMAP_H2) || defined(CONFIG_MACH_OMAP_H3) || defined(CONFIG_MACH_H6300)
 	&hx_ts,
 #endif
 #ifdef CONFIG_MACH_OMAP_OSK
@@ -70,8 +70,7 @@
 	input_report_abs(&(ts_omap.inputdevice), ABS_PRESSURE, data[2]);
 	input_sync(&(ts_omap.inputdevice));
 
-	DEBUG_TS("omap_ts_read: read x=%d,y=%d,p=%d\n", data[0], data[1],
-		 data[2]);
+	//DEBUG_TS("omap_ts_read: read x=%d,y=%d,p=%d\n", data[0], data[1], data[2]);
 
 	return 0;
 }
@@ -84,7 +83,7 @@
 
 	if (!ts_omap.dev->penup()) {
 		if (!ts_omap.touched) {
-			DEBUG_TS("omap_ts_timer: pen down\n");
+			//DEBUG_TS("omap_ts_timer: pen down\n");
 			input_report_key(&(ts_omap.inputdevice), BTN_TOUCH, 1);
 		}
 		ts_omap.touched = 1;
@@ -93,7 +92,7 @@
 		add_timer(&(ts_omap.ts_timer));
 	} else {
 		if (ts_omap.touched) {
-			DEBUG_TS("omap_ts_timer: pen up\n");
+			//DEBUG_TS("omap_ts_timer: pen up\n");
 			ts_omap.touched = 0;
 			input_report_abs(&(ts_omap.inputdevice), ABS_X, 0);
 			input_report_abs(&(ts_omap.inputdevice), ABS_Y, 0);
diff -Naur linux-2.6.12-rc5_omap1/drivers/input/touchscreen/omap/ts_hx.c linux-2.6.12-rc5_omap1_h6300/drivers/input/touchscreen/omap/ts_hx.c
--- linux-2.6.12-rc5_omap1/drivers/input/touchscreen/omap/ts_hx.c	2005-08-23 22:36:32.588389317 +0300
+++ linux-2.6.12-rc5_omap1_h6300/drivers/input/touchscreen/omap/ts_hx.c	2005-08-23 22:38:07.585267709 +0300
@@ -33,6 +33,7 @@
 #include <asm/arch/mux.h>
 #include <asm/arch/hardware.h>
 #include <asm/hardware/tsc2101.h>
+#include <linux/delay.h>
 
 #include "../drivers/ssi/omap-tsc2101.h"
 #include "omap_ts.h"
@@ -88,6 +89,9 @@
 	} else if (machine_is_omap_h3()) {
 		gpio = H3_GPIO_NUM;
 		omap_cfg_reg(W19_1610_GPIO48);
+	}else if (machine_is_h6300()) {
+		gpio = 2;
+		omap_cfg_reg(M14_1510_GPIO2);
 	} else
 		return -ENODEV;
 
@@ -180,5 +184,8 @@
 		omap_free_gpio(H2_GPIO_NUM);
 	else if (machine_is_omap_h3())
 		omap_free_gpio(H3_GPIO_NUM);
+	else if (machine_is_h6300())
+		omap_free_gpio(2);
+
 }
 #endif
diff -Naur linux-2.6.12-rc5_omap1/drivers/ssi/omap-tsc2101.c linux-2.6.12-rc5_omap1_h6300/drivers/ssi/omap-tsc2101.c
--- linux-2.6.12-rc5_omap1/drivers/ssi/omap-tsc2101.c	2005-08-23 22:36:33.800196420 +0300
+++ linux-2.6.12-rc5_omap1_h6300/drivers/ssi/omap-tsc2101.c	2005-08-23 22:38:07.586267550 +0300
@@ -25,6 +25,7 @@
 #include <linux/delay.h>
 
 #include <asm/system.h>
+#include <asm/arch/gpio.h>
 #include <asm/irq.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
@@ -39,7 +40,7 @@
 
 #include "omap-tsc2101.h"
 
-#if CONFIG_ARCH_OMAP16XX
+#if CONFIG_ARCH_OMAP1
 #include <../drivers/ssi/omap-uwire.h>
 #else
 #error "Unsupported configuration"
@@ -47,7 +48,7 @@
 
 #define SPIO 1
 
-static int count;
+static int count = 0;
 static spinlock_t tsc2101_lock = SPIN_LOCK_UNLOCKED;
 static struct clk  * tsc2101_mclk_ck;
 
@@ -66,13 +67,12 @@
 	if (count++ == 0) {
 		int ret = 0;
 		/* set the Mux to provide MCLK to TSC2101 */
-		if (machine_is_omap_h3()) {
+		if (machine_is_omap_h3())
 			ret = omap_cfg_reg(V5_1710_MCLK_ON);
-		} else {
-			if (machine_is_omap_h2()) {
-				ret = omap_cfg_reg(R10_1610_MCLK_ON);
-			}
-		}
+		else if (machine_is_omap_h2())
+			ret = omap_cfg_reg(R10_1610_MCLK_ON);
+		else if (machine_is_h6300 ())
+			ret = omap_cfg_reg(R10_1610_MCLK_ON); // TODO: for now use the 1610 mux
 
 		/* Get the MCLK */
 		tsc2101_mclk_ck = clk_get(NULL, "mclk");
@@ -108,19 +108,22 @@
 	if (--count == 0) {
 		int ret = 0;
 		/* Remove the Mux to Stop MCLK to TSC2101 */
-		if (machine_is_omap_h3()) {
+		if (machine_is_omap_h3())
 			ret = omap_cfg_reg(V5_1710_MCLK_OFF);
-		} else {
-			if (machine_is_omap_h2()) {
-				ret = omap_cfg_reg(R10_1610_MCLK_OFF);
-			}
-		}
+		else if (machine_is_omap_h2())
+			ret = omap_cfg_reg(R10_1610_MCLK_OFF);
+//		else if (machine_is_h6300 ())
+//			ret = omap_cfg_reg(R10_1610_MCLK_OFF); // TODO: for now use the 1610 mux
 
 		/* Release the MCLK */
 		clk_disable(tsc2101_mclk_ck);
 		clk_put(tsc2101_mclk_ck);
 		tsc2101_mclk_ck = NULL;
 
+#if defined(CONFIG_MACH_H6300)
+		omap_free_gpio(8);
+#endif
+
 		module_put(THIS_MODULE);
 	}
 	spin_unlock(&tsc2101_lock);
@@ -130,57 +133,57 @@
 {
 
 	int ret = 0;
+	int cs  = 0;
 
-	if (machine_is_omap_h2()) {
-		ret =
-		    omap_uwire_data_transfer(1, 
-					     (((page) << 11) | (address << 5)),
-					     16, 0, NULL, 1);
-		if (ret) {
-			printk(KERN_ERR
-			       "uwire-write returned error for address %x\n",
-			       address);
-			return;
-		}
-		ret = omap_uwire_data_transfer(1, data, 16, 0, NULL, 0);
-		if (ret) {
-			printk(KERN_ERR
-			       "uwire-write returned error for address %x\n",
-			       address);
-			return;
-		}
+	if (cpu_is_omap16xx ()) {
+		if (machine_is_omap_h2())
+			cs=1;
+		if (machine_is_omap_h3())
+			cs=0;
+	} else if (cpu_is_omap15xx ()) {
+		cs=0;
 	}
-	if (machine_is_omap_h3()) {
 
-		ret =
-		    omap_uwire_data_transfer(0, ((page << 11) | (address << 5)),
-					     16, 0, NULL, 1);
-		if (ret) {
-			printk(KERN_ERR
-			       "uwire-write returned error for address %x\n",
-			       address);
-			return;
-		}
-		ret = omap_uwire_data_transfer(0, data, 16, 0, NULL, 0);
-		if (ret) {
-			printk(KERN_ERR
-			       "uwire-write returned error for address %x\n",
-			       address);
-			return;
-		}
+#if defined(CONFIG_MACH_H6300)
+	omap_set_gpio_dataout(8, 0);
+#endif
+
+	ret = omap_uwire_data_transfer(cs, 
+			(((page) << 11) | (address << 5)),
+			16, 0, NULL, 1);
+	if (ret) {
+		printk(KERN_ERR
+			"uwire-write returned error for address %x\n",
+			address);
+		omap_set_gpio_dataout(8, 1);
+		return;
+	}
+	ret = omap_uwire_data_transfer(cs, data, 16, 0, NULL, 0);
+	if (ret) {
+		printk(KERN_ERR
+			"uwire-write returned error for address %x\n",
+			address);
+		omap_set_gpio_dataout(8, 1);
+		return;
 	}
 
+#if defined(CONFIG_MACH_H6300)
+	omap_set_gpio_dataout(8, 1);
+#endif
 }
 
 void omap_tsc2101_reads(int page, u8 startaddress, u16 * data, int numregs)
 {
 	int cs = 0, i;
-	if (machine_is_omap_h2()) {
+	if (machine_is_omap_h2())
 		cs = 1;
-	}
-	if (machine_is_omap_h3()) {
+	if (machine_is_omap_h3())
 		cs = 0;
-	}
+
+#if defined(CONFIG_MACH_H6300)
+	omap_set_gpio_dataout(8, 0);
+#endif
+
 	(void)omap_uwire_data_transfer(cs, (0x8000 | (page << 11)
 					    | (startaddress << 5)),
 				       16, 0, NULL, 1);
@@ -188,11 +191,15 @@
 		omap_uwire_data_transfer(cs, 0, 0, 16, data, 1);
 	}
 	omap_uwire_data_transfer(cs, 0, 0, 16, data, 0);
+
+#if defined(CONFIG_MACH_H6300)
+	omap_set_gpio_dataout(8, 1);
+#endif
 }
 
 u16 omap_tsc2101_read(int page, u8 address)
 {
-	u16 ret;
+	u16 ret=0;
 	omap_tsc2101_reads(page, address, &ret, 1);
 	return ret;
 }
@@ -217,7 +224,6 @@
 		return err;
 	}
 #endif
-
 	if (machine_is_omap_h2()) {
 		uwire_flags = UWIRE_READ_RISING_EDGE | UWIRE_WRITE_RISING_EDGE;
 		omap_cfg_reg(N15_1610_UWIRE_CS1);
@@ -228,9 +234,22 @@
 		omap_cfg_reg(N14_1610_UWIRE_CS0);
 		omap_uwire_configure_mode(0, uwire_flags);
 	}
+	if (machine_is_h6300()) {
+		uwire_flags = UWIRE_READ_RISING_EDGE | UWIRE_WRITE_RISING_EDGE;
+		omap_cfg_reg(X1_1510_UWIRE_CS0);
+		omap_uwire_configure_mode(0, uwire_flags);
+
+		omap_request_gpio(8);
+		omap_set_gpio_dataout(8, 0);
+                omap_set_gpio_direction (8, 0);
+	}
+
 
 	/* Configure MCLK enable */
-	omap_writel(omap_readl(PU_PD_SEL_2) | (1 << 22), PU_PD_SEL_2);	
+	if (cpu_is_omap16xx ())
+		omap_writel(omap_readl(PU_PD_SEL_2) | (1 << 22), PU_PD_SEL_2);	
+	if (machine_is_h6300())
+		omap_cfg_reg(X1_1510_UWIRE_SDI);
 
 	return 0;
 }
@@ -243,5 +262,5 @@
 
 MODULE_AUTHOR("Texas Instruments");
 MODULE_DESCRIPTION
-    ("Glue audio driver for the TI OMAP1610/OMAP1710 TSC2101 codec.");
+    ("Glue audio driver for the TI TSC2101 codec.");
 MODULE_LICENSE("GPL");
diff -Naur linux-2.6.12-rc5_omap1/drivers/ssi/omap-uwire.c linux-2.6.12-rc5_omap1_h6300/drivers/ssi/omap-uwire.c
--- linux-2.6.12-rc5_omap1/drivers/ssi/omap-uwire.c	2005-08-23 22:36:33.827192123 +0300
+++ linux-2.6.12-rc5_omap1_h6300/drivers/ssi/omap-uwire.c	2005-08-23 22:38:07.586267550 +0300
@@ -205,6 +205,11 @@
 		omap_cfg_reg(N14_1610_UWIRE_CS0);
 		omap_cfg_reg(N15_1610_UWIRE_CS1);
 	}
+
+	if (machine_is_h6300 ()) {
+		omap_cfg_reg(X1_1510_UWIRE_CS0);
+		omap_cfg_reg(X1_1510_UWIRE_CS3);
+	}
 	if (machine_is_omap_perseus2()) {
 		/* configure pins: MPU_UW_nSCS1, MPU_UW_SDO, MPU_UW_SCLK */
 		int val = omap_readl(OMAP730_IO_CONF_9) & ~0x00EEE000;
diff -Naur linux-2.6.12-rc5_omap1/drivers/usb/gadget/omap_udc.c linux-2.6.12-rc5_omap1_h6300/drivers/usb/gadget/omap_udc.c
--- linux-2.6.12-rc5_omap1/drivers/usb/gadget/omap_udc.c	2005-08-23 22:36:33.937174616 +0300
+++ linux-2.6.12-rc5_omap1_h6300/drivers/usb/gadget/omap_udc.c	2005-08-23 22:38:07.653256887 +0300
@@ -2101,7 +2101,7 @@
 	/* boards that don't have VBUS sensing can't autogate 48MHz;
 	 * can't enter deep sleep while a gadget driver is active.
 	 */
-	if (machine_is_omap_innovator() || machine_is_omap_osk())
+	if (machine_is_omap_innovator() || machine_is_omap_osk() || machine_is_h6300())
 		omap_vbus_session(&udc->gadget, 1);
 
 done:
@@ -2119,7 +2119,7 @@
 	if (!driver || driver != udc->driver)
 		return -EINVAL;
 
-	if (machine_is_omap_innovator() || machine_is_omap_osk())
+	if (machine_is_omap_innovator() || machine_is_omap_osk() || machine_is_h6300())
 		omap_vbus_session(&udc->gadget, 0);
 
 	if (udc->transceiver)
@@ -2727,7 +2727,7 @@
 		hmc = HMC_1510;
 		type = "(unknown)";
 
-		if (machine_is_omap_innovator()) {
+		if (machine_is_omap_innovator() || machine_is_h6300()) {
 			/* just set up software VBUS detect, and then
 			 * later rig it so we always report VBUS.
 			 * FIXME without really sensing VBUS, we can't
@@ -2957,6 +2957,11 @@
 
 static int __init udc_init(void)
 {
+#ifdef USE_DMA
+	if (machine_is_h6300())
+		use_dma=0;
+#endif
+
 	INFO("%s, version: " DRIVER_VERSION
 #ifdef	USE_ISO
 		" (iso)"
diff -Naur linux-2.6.12-rc5_omap1/drivers/usb/gadget/omap_udc.h linux-2.6.12-rc5_omap1_h6300/drivers/usb/gadget/omap_udc.h
--- linux-2.6.12-rc5_omap1/drivers/usb/gadget/omap_udc.h	2005-08-23 22:36:33.939174298 +0300
+++ linux-2.6.12-rc5_omap1_h6300/drivers/usb/gadget/omap_udc.h	2005-08-23 22:37:10.616335999 +0300
@@ -174,6 +174,7 @@
 	unsigned			ep0_set_config:1;
 	unsigned			ep0_reset_config:1;
 	unsigned			ep0_setup:1;
+
 	struct completion		*done;
 };
 
diff -Naur linux-2.6.12-rc5_omap1/drivers/video/omap/lcd_h6300.c linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/lcd_h6300.c
--- linux-2.6.12-rc5_omap1/drivers/video/omap/lcd_h6300.c	1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/lcd_h6300.c	2005-08-23 22:38:07.655256568 +0300
@@ -0,0 +1,90 @@
+/*
+ * File: drivers/video/omap_new/lcd-inn1510.c
+ *
+ * LCD panel support for the TI OMAP1510 Innovator board
+ *
+ * Copyright (C) 2004 Nokia Corporation
+ * Author: Imre Deak <imre.deak@nokia.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#include <linux/module.h>
+#include <asm/io.h>
+
+
+#include "omapfb.h"
+
+// #define OMAPFB_DBG 1
+
+#include "debug.h"
+
+static int h6300_panel_init(struct lcd_panel *panel)
+{
+	DBGENTER(1);
+	DBGLEAVE(1);
+	return 0;
+}
+
+static void h6300_panel_cleanup(struct lcd_panel *panel)
+{
+	DBGENTER(1);
+	DBGLEAVE(1);
+}
+
+static int h6300_panel_enable(struct lcd_panel *panel)
+{
+	DBGENTER(1);
+	DBGLEAVE(1);
+	return 0;
+}
+
+static void h6300_panel_disable(struct lcd_panel *panel)
+{
+	DBGENTER(1);
+	DBGLEAVE(1);
+}
+
+static unsigned long h6300_panel_get_caps(struct lcd_panel *panel)
+{
+	return 0;
+}
+
+static struct lcdc_video_mode mode240x320 = {
+	.x_res = 240,
+	.y_res = 320,
+	.pixel_clock = 12500,
+	.bpp = 16,
+	.hsw = 12,
+	.hfp = 10,
+	.hbp = 10,
+	.vsw = 3,
+	.vfp = 10,
+	.vbp = 3,
+	.pcd = 4,
+};
+
+struct lcd_panel h6300_panel = {
+	.name       = "h6300",
+	.config	    = LCD_PANEL_TFT,
+	.video_mode = &mode240x320,
+
+	.init	 = h6300_panel_init,
+	.cleanup = h6300_panel_cleanup,
+	.enable  = h6300_panel_enable,
+	.disable = h6300_panel_disable,
+	.get_caps= h6300_panel_get_caps,
+};
+
diff -Naur linux-2.6.12-rc5_omap1/drivers/video/omap/Makefile linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/Makefile
--- linux-2.6.12-rc5_omap1/drivers/video/omap/Makefile	2005-08-23 22:36:34.395101723 +0300
+++ linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/Makefile	2005-08-23 22:38:07.656256409 +0300
@@ -11,6 +11,7 @@
 objs-y$(CONFIG_MACH_OMAP_H2) += lcd_h2.o
 objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1610.o
 objs-$(CONFIG_ARCH_OMAP1510)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o
+objs-$(CONFIG_ARCH_OMAP1510)$(CONFIG_MACH_H6300) += lcd_h6300.o
 objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o
 objs-$(CONFIG_ARCH_OMAP730)$(CONFIG_MACH_OMAP_PERSEUS2) += lcd_p2.o
 
diff -Naur linux-2.6.12-rc5_omap1/drivers/video/omap/omapfb.h linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/omapfb.h
--- linux-2.6.12-rc5_omap1/drivers/video/omap/omapfb.h	2005-08-23 22:36:34.397101404 +0300
+++ linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/omapfb.h	2005-08-23 22:38:07.688251316 +0300
@@ -316,6 +316,7 @@
 extern struct lcd_panel osk_panel;
 extern struct lcd_panel innovator1610_panel;
 extern struct lcd_panel innovator1510_panel;
+extern struct lcd_panel h6300_panel;
 
 extern struct lcd_ctrl omapfb_lcdc_ctrl;
 
diff -Naur linux-2.6.12-rc5_omap1/drivers/video/omap/omapfb_main.c linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/omapfb_main.c
--- linux-2.6.12-rc5_omap1/drivers/video/omap/omapfb_main.c	2005-08-23 22:36:34.472089467 +0300
+++ linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/omapfb_main.c	2005-08-23 22:38:07.690250998 +0300
@@ -108,6 +108,9 @@
 	&innovator1610_panel,
 #endif
 #endif
+#ifdef CONFIG_MACH_H6300
+	&h6300_panel,
+#endif
 };
 
 static struct lcd_ctrl *ctrls[] = {
@@ -1881,6 +1884,8 @@
 			def_name = "inn1610";
 		if (machine_is_omap_innovator() && cpu_is_omap1510())
 			def_name = "inn1510";
+		if (machine_is_h6300())
+			def_name = "h6300";
 		if (def_name == NULL)
 			return -1;
 		strncpy(name, def_name, sizeof(name) - 1);
diff -Naur linux-2.6.12-rc5_omap1/include/asm-arm/arch-omap/board-h6300.h linux-2.6.12-rc5_omap1_h6300/include/asm-arm/arch-omap/board-h6300.h
--- linux-2.6.12-rc5_omap1/include/asm-arm/arch-omap/board-h6300.h	1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.12-rc5_omap1_h6300/include/asm-arm/arch-omap/board-h6300.h	2005-08-23 22:38:07.726245268 +0300
@@ -0,0 +1,40 @@
+/*
+ * linux/include/asm-arm/arch-omap/board-innovator.h
+ *
+ * Copyright (C) 2001 RidgeRun, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef __ASM_ARCH_H6300_H
+#define __ASM_ARCH_H6300_H
+
+#ifndef OMAP_SDRAM_DEVICE
+#define OMAP_SDRAM_DEVICE			D256M_1X16_4B
+#endif
+
+#define OMAP1510P1_IMIF_PRI_VALUE		0x00
+#define OMAP1510P1_EMIFS_PRI_VALUE		0x00
+#define OMAP1510P1_EMIFF_PRI_VALUE		0x00
+
+#define NR_FPGA_IRQS		24
+#define NR_IRQS                 IH_BOARD_BASE + NR_FPGA_IRQS
+
+#endif /* __ASM_ARCH_H6300_H */
diff -Naur linux-2.6.12-rc5_omap1/include/asm-arm/arch-omap/hardware.h linux-2.6.12-rc5_omap1_h6300/include/asm-arm/arch-omap/hardware.h
--- linux-2.6.12-rc5_omap1/include/asm-arm/arch-omap/hardware.h	2005-08-23 22:36:34.980008616 +0300
+++ linux-2.6.12-rc5_omap1_h6300/include/asm-arm/arch-omap/hardware.h	2005-08-23 22:38:07.727245109 +0300
@@ -299,6 +299,10 @@
 #include "board-innovator.h"
 #endif
 
+#ifdef CONFIG_MACH_H6300
+#include "board-h6300.h"
+#endif
+
 #ifdef CONFIG_MACH_OMAP_H2
 #include "board-h2.h"
 #endif
diff -Naur linux-2.6.12-rc5_omap1/include/asm-arm/arch-omap/mux.h linux-2.6.12-rc5_omap1_h6300/include/asm-arm/arch-omap/mux.h
--- linux-2.6.12-rc5_omap1/include/asm-arm/arch-omap/mux.h	2005-08-23 22:36:35.014003205 +0300
+++ linux-2.6.12-rc5_omap1_h6300/include/asm-arm/arch-omap/mux.h	2005-08-23 22:38:07.795234287 +0300
@@ -250,9 +250,16 @@
 	U18_1610_UWIRE_SDI,
 	W21_1610_UWIRE_SDO,
 	N14_1610_UWIRE_CS0,
-	P15_1610_UWIRE_CS0,
+	P15_1610_UWIRE_CS3,
 	N15_1610_UWIRE_CS1,
 
+	/* OMAP-1510 uWire */
+	X1_1510_UWIRE_CS3,
+	X1_1510_UWIRE_CS0,
+	X1_1510_UWIRE_SCLK,
+	X1_1510_UWIRE_SDO,
+	X1_1510_UWIRE_SDI,
+
 	/* OMAP-1610 Flash */
 	L3_1610_FLASH_CS2B_OE,
 	M8_1610_FLASH_CS2B_WE,
@@ -481,6 +488,13 @@
 MUX_CFG("P15_1610_UWIRE_CS3",	 8,   12,    1,	  1,  22,   0,	  1,	 1,  1)
 MUX_CFG("N15_1610_UWIRE_CS1",	 7,   18,    2,	  1,  14,   0,	 NA,	 0,  1)
 
+/* OMAP-1510 uWire */
+MUX_CFG("X1_1510_UWIRE_CS3",  8, 12, 1, NA, 0, 0,  NA, 0, 1)
+MUX_CFG("X1_1510_UWIRE_CS0",  8, 9,  1, NA, 0, 0,  NA, 0, 1)
+MUX_CFG("X1_1510_UWIRE_SCLK", 8, 6,  0, NA, 0, 0,  NA, 0, 1)
+MUX_CFG("X1_1510_UWIRE_SDO",  8, 3,  0, NA, 0, 0,  NA, 0, 1)
+MUX_CFG("X1_1510_UWIRE_SDI",  8, 0,  0, 1,  18, 1, NA, 0, 1)
+
 /* OMAP-1610 Flash */
 MUX_CFG("L3_1610_FLASH_CS2B_OE",10,    6,    1,	 NA,   0,   0,	 NA,	 0,  1)
 MUX_CFG("M8_1610_FLASH_CS2B_WE",10,    3,    1,	 NA,   0,   0,	 NA,	 0,  1)
@@ -545,7 +559,8 @@
 /* MCLK Settings */
 MUX_CFG("V5_1710_MCLK_ON",	 B,   15,    0,	  NA,   0,   0,   NA,	 0,  0)
 MUX_CFG("V5_1710_MCLK_OFF",	 B,   15,    6,	  NA,   0,   0,   NA,	 0,  0)
-MUX_CFG("R10_1610_MCLK_ON",	 B,   18,    0,	  NA,  22,   0,	  NA,	 1,  0)
+/* orig: MUX_CFG("R10_1610_MCLK_ON",	 B,   18,    0,	  NA,  22,   0,	  NA,	 1,  0) */
+MUX_CFG("R10_1610_MCLK_ON",	 B,   18,    0,	  NA,  22,   0,	  NA,	 1,  1)
 MUX_CFG("R10_1610_MCLK_OFF",	 B,   18,    6,	  2,   22,   1,	  2,	 1,  1)
 
 /* CompactFlash controller, conflicts with MMC1 */
diff -Naur linux-2.6.12-rc5_omap1/include/asm-arm/cpu-single.h linux-2.6.12-rc5_omap1_h6300/include/asm-arm/cpu-single.h
--- linux-2.6.12-rc5_omap1/include/asm-arm/cpu-single.h	2005-05-25 06:31:20.000000000 +0300
+++ linux-2.6.12-rc5_omap1_h6300/include/asm-arm/cpu-single.h	2005-08-23 22:38:07.817230785 +0300
@@ -41,4 +41,4 @@
 extern void cpu_dcache_clean_area(void *, int);
 extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
 extern void cpu_set_pte(pte_t *ptep, pte_t pte);
-extern volatile void cpu_reset(unsigned long addr);
+extern void cpu_reset(unsigned long addr);
diff -Naur linux-2.6.12-rc5_omap1/Makefile linux-2.6.12-rc5_omap1_h6300/Makefile
--- linux-2.6.12-rc5_omap1/Makefile	2005-08-23 22:36:35.409940179 +0300
+++ linux-2.6.12-rc5_omap1_h6300/Makefile	2005-08-23 22:38:07.818230626 +0300
@@ -11,7 +11,7 @@
 # expect to learn how to build the kernel reading this file.
 
 # Add custom flags here to avoid conflict with updates
-EXTRAVERSION := $(EXTRAVERSION)-omap2
+EXTRAVERSION := $(EXTRAVERSION)-omap1-h6300
 
 # Do not print "Entering directory ..."
 MAKEFLAGS += --no-print-directory
diff -Naur linux-2.6.12-rc5_omap1/sound/oss/Kconfig linux-2.6.12-rc5_omap1_h6300/sound/oss/Kconfig
--- linux-2.6.12-rc5_omap1/sound/oss/Kconfig	2005-08-23 22:36:35.439935405 +0300
+++ linux-2.6.12-rc5_omap1_h6300/sound/oss/Kconfig	2005-08-23 22:38:07.849225692 +0300
@@ -12,7 +12,7 @@
 
 config SOUND_OMAP_TSC2101
 	tristate "TSC2101 Stereo Codec"
-	depends on SOUND_OMAP && ( MACH_OMAP_H2 || MACH_OMAP_H3 )
+	depends on SOUND_OMAP && ARCH_OMAP1
 	select OMAP_TSC2101
 	select OMAP_UWIRE if ARCH_OMAP
 	---help---
diff -Naur linux-2.6.12-rc5_omap1/sound/oss/omap-audio.c linux-2.6.12-rc5_omap1_h6300/sound/oss/omap-audio.c
--- linux-2.6.12-rc5_omap1/sound/oss/omap-audio.c	2005-08-23 22:36:35.498926014 +0300
+++ linux-2.6.12-rc5_omap1_h6300/sound/oss/omap-audio.c	2005-08-23 22:38:07.895218371 +0300
@@ -56,8 +56,8 @@
 
 /***************************** MACROS ************************************/
 
-#undef DEBUG
-//#define DEBUG
+//#undef DEBUG
+#define DEBUG
 #ifdef DEBUG
 #define DPRINTK  printk
 #define FN_IN printk("[omap_audio.c:[%s] start\n", __FUNCTION__)
diff -Naur linux-2.6.12-rc5_omap1/sound/oss/omap-audio-tsc2101.c linux-2.6.12-rc5_omap1_h6300/sound/oss/omap-audio-tsc2101.c
--- linux-2.6.12-rc5_omap1/sound/oss/omap-audio-tsc2101.c	2005-08-23 22:36:35.557916624 +0300
+++ linux-2.6.12-rc5_omap1_h6300/sound/oss/omap-audio-tsc2101.c	2005-08-23 22:38:07.897218053 +0300
@@ -48,7 +48,7 @@
 #include "omap-audio.h"
 #include "omap-audio-dma-intfc.h"
 #include <asm/arch/mcbsp.h>
-#if CONFIG_ARCH_OMAP16XX
+#if CONFIG_ARCH_OMAP1
 #include <../drivers/ssi/omap-uwire.h>
 #include <asm/arch/dsp_common.h>
 #else
@@ -70,12 +70,14 @@
 
 #define CODEC_NAME		 "TSC2101"
 
-#if CONFIG_ARCH_OMAP16XX
-#define PLATFORM_NAME "OMAP16XX"
+#if CONFIG_ARCH_OMAP1
+#define PLATFORM_NAME "OMAP"
 #endif
 
 #if CONFIG_ARCH_OMAP16XX
 #define OMAP_DSP_BASE        0xE0000000
+#elif CONFIG_ARCH_OMAP1510
+#define OMAP_DSP_BASE        0xE0000000
 #endif
 
 /* Define to set the tsc as the master w.r.t McBSP */
@@ -91,9 +93,15 @@
 
 /* Select the McBSP For Audio */
 #if CONFIG_ARCH_OMAP16XX
-#define AUDIO_MCBSP                   OMAP_MCBSP1
+# define AUDIO_MCBSP                   OMAP_MCBSP1
+# define AUDIO_DMA_TX                  OMAP_DMA_MCBSP1_TX
+# define AUDIO_DMA_RX                  OMAP_DMA_MCBSP1_RX
+#elif CONFIG_ARCH_OMAP1510
+#	define AUDIO_MCBSP                   OMAP_MCBSP1
+# define AUDIO_DMA_TX                  OMAP_DMA_MCBSP1_TX
+# define AUDIO_DMA_RX                  OMAP_DMA_MCBSP1_RX
 #else
-#error "UnSupported Configuration"
+#	error "UnSupported Configuration"
 #endif
 
 #define REC_MASK 			          (SOUND_MASK_LINE | SOUND_MASK_MIC)
@@ -123,18 +131,18 @@
 
 /*********** Debug Macros ********/
 /* To Generate a rather shrill tone -test the entire path */
-//#define TONE_GEN
+#define TONE_GEN
 /* To Generate a tone for each keyclick - test the tsc,spi paths*/
-//#define TEST_KEYCLICK
+#define TEST_KEYCLICK
 /* To dump the tsc registers for debug */
-//#define TSC_DUMP_REGISTERS
+#define TSC_DUMP_REGISTERS
 
 #ifdef DPRINTK
 #undef DPRINTK
 #endif
 #undef DEBUG
 
-//#define DEBUG
+#define DEBUG
 #ifdef DEBUG
 #define DPRINTK(ARGS...)  printk(KERN_INFO "<%s>: ",__FUNCTION__);printk(ARGS)
 #define FN_IN printk(KERN_INFO "[%s]: start\n", __FUNCTION__)
@@ -149,13 +157,13 @@
 
 static audio_stream_t output_stream = {
 	.id              = "TSC2101 out",
-	.dma_dev         = OMAP_DMA_MCBSP1_TX,
+	.dma_dev         = AUDIO_DMA_TX,
 	.input_or_output = FMODE_WRITE
 };
 
 static audio_stream_t input_stream = {
 	.id              = "TSC2101 in",
-	.dma_dev         = OMAP_DMA_MCBSP1_RX,
+	.dma_dev         = AUDIO_DMA_RX,
 	.input_or_output = FMODE_READ
 };
 
@@ -215,6 +223,17 @@
 };
 
 static struct omap_mcbsp_reg_cfg initial_config = {
+#if CONFIG_MACH_H6300
+	.spcr2 = 0x0005,
+	.spcr1 = 0x0005,
+	.rcr2  = 0x8041,
+	.rcr1  = 0x8041,
+	.xcr2  = 0x00a1,
+	.xcr1  = 0x00a1,
+	.srgr2 = 0xb000,
+	.srgr1 = 0xb000,
+	.pcr0  = 0x0081,
+#else
 	.spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
 	.spcr1 = RINTM(3) | RRST,
 	.rcr2  = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
@@ -230,14 +249,13 @@
 #if CONFIG_MACH_OMAP_H2
 	.pcr0  = CLKXM | CLKRM | FSXP | FSRP | CLKXP | CLKRP,
 #elif CONFIG_MACH_OMAP_H3
-
-#ifndef TSC_MASTER
+#	ifndef TSC_MASTER
 	.pcr0  = FSXM | FSRM | CLKXM | CLKRM | CLKXP | CLKRP,
-#else
+#		else
 	.pcr0  = CLKRM | SCLKME | FSXP | FSRP | CLKXP | CLKRP,
-#endif				/* tsc Master defs */
-
+#	endif				/* tsc Master defs */
 #endif				/* platform specific inits */
+#endif
 };
 
 /***************************** MODULES SPECIFIC FUNCTION PROTOTYPES ********************/
@@ -1218,5 +1236,5 @@
 
 MODULE_AUTHOR("Texas Instruments");
 MODULE_DESCRIPTION
-    ("Glue audio driver for the TI OMAP1610/OMAP1710 TSC2101 codec.");
+    ("Glue audio driver for the TI OMAP TSC2101 codec.");
 MODULE_LICENSE("GPL");