summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-ks8695/ks8695-headers-r0.patch
blob: 257eb7d1c8294897d0e419153b6ec56dfe064084 (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
This patch inludes the architecture support headers.
And also a boot time ID stub for the loader.


diff -Naur linux-2.6.16/arch/arm/Kconfig linux-2.6.16.ks8695/arch/arm/Kconfig
diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/debug-macro.S linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/debug-macro.S
--- linux-2.6.16/include/asm-arm/arch-ks8695/debug-macro.S	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/debug-macro.S	2006-02-17 11:57:24.000000000 +1000
@@ -0,0 +1,37 @@
+/*
+ * linux/include/asm-arm/arch-ks8695/debug-macro.S
+ *
+ * Debugging macro include header
+ *
+ *  Copyright (C) 1994-1999 Russell King
+ *  Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
+ *  (C) Copyright 2006 Greg Ungerer <gerg@snapgear.com>
+ *
+ * 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.
+ */
+
+.macro addruart,rx
+	mrc	p15, 0, \rx, c1, c0
+	tst	\rx, #1                 @ MMU enabled?
+	moveq	\rx, #0x03000000	@ 0x03ffe000
+	orreq	\rx, \rx, #0x00ff0000
+	movne	\rx, #0xff000000	@ 0xff00e000
+	orr	\rx, \rx, #0x0000e000
+.endm
+
+.macro senduart,rd,rx
+	str	\rd, [\rx, #0x4]
+.endm
+
+.macro waituart,rd,rx
+1:	ldr	\rd, [\rx, #0x14]
+	and	\rd, \rd, #0x40		@ check TEMT bit
+	teq	\rd, #0x40
+	bne	1b
+.endm
+
+.macro busyuart,rd,rx
+.endm
+
diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/dma.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/dma.h
--- linux-2.6.16/include/asm-arm/arch-ks8695/dma.h	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/dma.h	2006-02-20 13:39:13.000000000 +1000
@@ -0,0 +1,26 @@
+/*
+ *  linux/include/asm-arm/arch-ks8695/dma.h
+ *
+ *  Copyright (C) 1997,1998 Russell King
+ *
+ * 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
+ */
+#ifndef __ASM_ARCH_DMA_H
+#define __ASM_ARCH_DMA_H
+
+#define MAX_DMA_CHANNELS	0
+#define MAX_DMA_ADDRESS		0xffffffff
+
+#endif /* __ASM_ARCH_DMA_H */
diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/entry-macro.S linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/entry-macro.S
--- linux-2.6.16/include/asm-arm/arch-ks8695/entry-macro.S	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/entry-macro.S	2006-02-20 10:39:00.000000000 +1000
@@ -0,0 +1,28 @@
+/*
+ * include/asm-arm/arch-ks8695/entry-macro.S
+ *
+ * Low-level IRQ helper macros for KS8695 based platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+.macro	disable_fiq
+.endm
+
+
+.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+	ldr	\irqnr, =KS8695_IO_VIRT+KS8695_INT_MASK_STATUS
+	ldr	\irqstat, [\irqnr]		@ get masked status
+
+	mov	\irqnr, #0
+1001:	tst	\irqstat, #1
+	bne	1002f
+	add	\irqnr, \irqnr, #1
+	mov	\irqstat, \irqstat, lsr #1
+	cmp	\irqnr, #32
+	bcc	1001b
+1002:	@ EQ will be set if we reach
+.endm
+
diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/hardware.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/hardware.h
--- linux-2.6.16/include/asm-arm/arch-ks8695/hardware.h	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/hardware.h	2006-03-15 00:22:13.000000000 +1000
@@ -0,0 +1,38 @@
+/*
+ *  linux/include/asm-arm/arch-ks8695/hardware.h
+ *
+ *  This file contains the hardware definitions of the KS8695.
+ *
+ *  Copyright (C) 2002 Micrel 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 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
+ */
+#ifndef __ASM_ARCH_HARDWARE_H
+#define __ASM_ARCH_HARDWARE_H
+
+/*
+ * Virtual memory mapping of the KS8695 internal register area.
+ * This is a static mapping, set up early in kernel startup.
+ */
+#define	KS8695_IO_VIRT		0xFF000000
+#define	KS8695_REG(x)		(KS8695_IO_VIRT + (x))
+
+#define	pcibios_assign_all_busses()	1
+#define	PCIBIOS_MIN_IO		0x00000100
+#define	PCIBIOS_MIN_MEM		0x00010000
+#define	PCI_MEMORY_VADDR	KS8695P_PCIBG_MEM_BASE
+#define	PCI_IO_VADDR		KS8695P_PCIBG_IO_BASE
+
+#endif /* __ASM_ARCH_HARDWARE_H */
diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/io.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/io.h
--- linux-2.6.16/include/asm-arm/arch-ks8695/io.h	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/io.h	2006-03-15 00:22:13.000000000 +1000
@@ -0,0 +1,31 @@
+/*
+ *  linux/include/asm-arm/arch-ks8695/io.h
+ *
+ *  Copyright (C) 1999 ARM Limited
+ *
+ * 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
+ */
+#ifndef __ASM_ARCH_IO_H
+#define __ASM_ARCH_IO_H
+
+#include <asm/hardware.h>
+
+#define IO_SPACE_LIMIT		0xffffffff
+
+#define __io(a)                 (a)
+#define __mem_pci(a)		((unsigned long) (a))
+#define __mem_isa(a)		((unsigned long) (a))
+
+#endif /* __ASM_ARCH_IO_H */
diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/irqs.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/irqs.h
--- linux-2.6.16/include/asm-arm/arch-ks8695/irqs.h	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/irqs.h	2006-03-15 00:22:13.000000000 +1000
@@ -0,0 +1,98 @@
+/*
+ *  linux/include/asm-arm/arch-ks8695/irqs.h
+ *
+ *  Copyright (C) 1999 ARM Limited
+ *  Copyright (C) 2000 Deep Blue Solutions Ltd.
+ *
+ * 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
+ */
+
+#ifndef __ASM_ARCH_IRQS_H
+#define __ASM_ARCH_IRQS_H 1
+
+/*
+ * IRQ definitions
+ */
+#define KS8695_INT_EXT_INT0                    2
+#define KS8695_INT_EXT_INT1                    3
+#define KS8695_INT_EXT_INT2                    4
+#define KS8695_INT_EXT_INT3                    5
+#define KS8695_INT_TIMERINT0                   6
+#define KS8695_INT_TIMERINT1                   7 
+#define KS8695_INT_UART_TX                     8
+#define KS8695_INT_UART_RX                     9
+#define KS8695_INT_UART_LINE_ERR               10
+#define KS8695_INT_UART_MODEMS                 11
+#define KS8695_INT_LAN_STOP_RX                 12
+#define KS8695_INT_LAN_STOP_TX                 13
+#define KS8695_INT_LAN_BUF_RX_STATUS           14
+#define KS8695_INT_LAN_BUF_TX_STATUS           15
+#define KS8695_INT_LAN_RX_STATUS               16
+#define KS8695_INT_LAN_TX_STATUS               17
+#define KS8695_INT_HPAN_STOP_RX                18
+#define KS8695_INT_HPNA_STOP_TX                19
+#define KS8695_INT_HPNA_BUF_RX_STATUS          20
+#define KS8695_INT_HPNA_BUF_TX_STATUS          21
+#define KS8695_INT_HPNA_RX_STATUS              22
+#define KS8695_INT_HPNA_TX_STATUS              23
+#define KS8695_INT_BUS_ERROR                   24
+#define KS8695_INT_WAN_STOP_RX                 25
+#define KS8695_INT_WAN_STOP_TX                 26
+#define KS8695_INT_WAN_BUF_RX_STATUS           27
+#define KS8695_INT_WAN_BUF_TX_STATUS           28
+#define KS8695_INT_WAN_RX_STATUS               29
+#define KS8695_INT_WAN_TX_STATUS               30
+
+#define KS8695_INT_UART                        KS8695_INT_UART_TX
+
+/*
+ * IRQ bit masks
+ */
+#define KS8695_INTMASK_EXT_INT0                (1 << KS8695_INT_EXT_INT0)
+#define KS8695_INTMASK_EXT_INT1                (1 << KS8695_INT_EXT_INT1)
+#define KS8695_INTMASK_EXT_INT2                (1 << KS8695_INT_EXT_INT2)
+#define KS8695_INTMASK_EXT_INT3                (1 << KS8695_INT_EXT_INT3)
+#define KS8695_INTMASK_TIMERINT0               (1 << KS8695_INT_TIMERINT0)
+#define KS8695_INTMASK_TIMERINT1               (1 << KS8695_INT_TIMERINT1)
+#define KS8695_INTMASK_UART_TX                 (1 << KS8695_INT_UART_TX)
+#define KS8695_INTMASK_UART_RX                 (1 << KS8695_INT_UART_RX)
+#define KS8695_INTMASK_UART_LINE_ERR           (1 << KS8695_INT_UART_LINE_ERR)
+#define KS8695_INTMASK_UART_MODEMS             (1 << KS8695_INT_UART_MODEMS)
+#define KS8695_INTMASK_LAN_STOP_RX             (1 << KS8695_INT_LAN_STOP_RX)
+#define KS8695_INTMASK_LAN_STOP_TX             (1 << KS8695_INT_LAN_STOP_TX)
+#define KS8695_INTMASK_LAN_BUF_RX_STATUS       (1 << KS8695_INT_LAN_BUF_RX_STATUS)
+#define KS8695_INTMASK_LAN_BUF_TX_STATUS       (1 << KS8695_INT_LAN_BUF_TX_STATUS)
+#define KS8695_INTMASK_LAN_RX_STATUS           (1 << KS8695_INT_LAN_RX_STATUS)
+#define KS8695_INTMASK_LAN_TX_STATUS           (1 << KS8695_INT_LAN_RX_STATUS)
+#define KS8695_INTMASK_HPAN_STOP_RX            (1 << KS8695_INT_HPAN_STOP_RX)
+#define KS8695_INTMASK_HPNA_STOP_TX            (1 << KS8695_INT_HPNA_STOP_TX)
+#define KS8695_INTMASK_HPNA_BUF_RX_STATUS      (1 << KS8695_INT_HPNA_BUF_RX_STATUS)
+#define KS8695_INTMAKS_HPNA_BUF_TX_STATUS      (1 << KS8695_INT_HPNA_BUF_TX_STATUS)
+#define KS8695_INTMASK_HPNA_RX_STATUS          (1 << KS8695_INT_HPNA_RX_STATUS)
+#define KS8695_INTMASK_HPNA_TX_STATUS          (1 << KS8695_INT_HPNA_TX_STATUS)
+#define KS8695_INTMASK_BUS_ERROR               (1 << KS8695_INT_BUS_ERROR)
+#define KS8695_INTMASK_WAN_STOP_RX             (1 << KS8695_INT_WAN_STOP_RX)
+#define KS8695_INTMASK_WAN_STOP_TX             (1 << KS8695_INT_WAN_STOP_TX)
+#define KS8695_INTMASK_WAN_BUF_RX_STATUS       (1 << KS8695_INT_WAN_BUF_RX_STATUS)
+#define KS8695_INTMASK_WAN_BUF_TX_STATUS       (1 << KS8695_INT_WAN_BUF_TX_STATUS)
+#define KS8695_INTMASK_WAN_RX_STATUS           (1 << KS8695_INT_WAN_RX_STATUS)
+#define KS8695_INTMASK_WAN_TX_STATUS           (1 << KS8695_INT_WAN_TX_STATUS)
+
+#define KS8695_SC_VALID_INT                    0xFFFFFFFF
+
+
+#define NR_IRQS		(32)
+
+#endif /* __ASM_ARCH_IRQS_H */
diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/ks8695-pci.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/ks8695-pci.h
--- linux-2.6.16/include/asm-arm/arch-ks8695/ks8695-pci.h	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/ks8695-pci.h	2006-03-22 22:51:21.000000000 +1000
@@ -0,0 +1,68 @@
+/*
+ * 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
+ */
+#ifndef __ASM_ARCH_PLATFORM_PCI_H
+#define __ASM_ARCH_PLATFORM_PCI_H 1
+
+/* PCI memory related defines */
+#define KS8695P_PCIBG_MEM_BASE      0x60000000  /* memory base for bridge*/  
+#define KS8695P_PCI_MEM_BASE	    0x60000000UL/* memory base in PCI space */
+#define KS8695P_PCI_MEM_SIZE	    0x20000000UL/* 512M, can be extended */
+#define KS8695P_PCI_MEM_MASK	    0xE0000000  /* 512M */
+
+/* PCI IO related defines */
+#define KS8695P_PCIBG_IO_BASE       0x10000000  /* io base for bridge */
+#define KS8695P_PCI_IO_BASE         0x10000000
+#define KS8695P_PCI_IO_SIZE         0x00010000  /* 64K */
+#define KS8695P_PCI_IO_MASK         0xFF800000  /* 64K range */
+
+/* new registers specific to KS8695P */
+/* PCI related */
+#define	KS8695_CRCFID		0x2000
+#define	KS8695_CRCFCS		0x2004
+#define	KS8695_CRCFRV		0x2008
+#define	KS8695_CRCFLT		0x200c
+#define	KS8695_CRCBMA		0x2010
+#define	KS8695_CRCBA0		0x2014
+#define	KS8695_CRCSID		0x202c
+#define	KS8695_CRCFIT		0x203c
+
+/* bridge configuration related registers */
+#define	KS8695_PBCA		0x2100
+#define	KS8695_PBCD		0x2104
+
+/* bridge mode related registers */
+#define	KS8695_PBM		0x2200
+#define	KS8695_PBCS		0x2204
+#define	KS8695_PMBA		0x2208
+#define	KS8695_PMBAC		0x220c
+#define	KS8695_PMBAM		0x2210
+#define	KS8695_PMBAT		0x2214
+#define	KS8695_PIOBA		0x2218
+#define	KS8695_PIOBAC		0x221c
+#define	KS8695_PIOBAM		0x2220
+#define	KS8695_PIOBAT		0x2224
+
+/* bits for registers */
+/* 0x2200 */
+#define	PBM_BRIDGE_MODE		0x80000000
+
+/* 0x2204 */
+#define	PBCS_SW_RESET		0x80000000
+
+/* 0x220c */
+#define	PMBAC_TRANS_ENABLE	0x80000000
+
+#endif /* __ASM_ARCH_PLATFORM_PCI_H */
diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/ks8695-regs.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/ks8695-regs.h
--- linux-2.6.16/include/asm-arm/arch-ks8695/ks8695-regs.h	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/ks8695-regs.h	2006-03-22 22:51:21.000000000 +1000
@@ -0,0 +1,341 @@
+/*
+ * 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
+ */
+#ifndef __ASM_ARCH_KS8695_REGS_H
+#define __ASM_ARCH_KS8695_REGS_H 1
+
+/* Physical IO address space of KS8695 internal peripheral registers */
+#define KS8695_IO_BASE			0x03FF0000
+#define KS8695_IO_SIZE			0x00010000
+
+#define KS8695_SYSTEN_CONFIG		0x00
+#define KS8695_SYSTEN_BUS_CLOCK		0x04
+
+/* bus clock definitions*/
+#define KS8695_BUS_CLOCK_125MHZ		0x0
+#define KS8695_BUS_CLOCK_100MHZ		0x1
+#define KS8695_BUS_CLOCK_62MHZ		0x2
+#define KS8695_BUS_CLOCK_50MHZ		0x3
+#define KS8695_BUS_CLOCK_41MHZ		0x4
+#define KS8695_BUS_CLOCK_33MHZ		0x5
+#define KS8695_BUS_CLOCK_31MHZ		0x6
+#define KS8695_BUS_CLOCK_25MHZ		0x7
+
+/* i/o control registers offset difinitions */
+#define KS8695_IO_CTRL0			0x4000
+#define KS8695_IO_CTRL1			0x4004
+#define KS8695_IO_CTRL2			0x4008
+#define KS8695_IO_CTRL3			0x400C
+
+/* memory control registers offset difinitions */
+#define KS8695_MEM_CTRL0		0x4010
+#define KS8695_MEM_CTRL1		0x4014
+#define KS8695_MEM_CTRL2		0x4018
+#define KS8695_MEM_CTRL3		0x401C
+#define KS8695_MEM_GENERAL		0x4020
+#define KS8695_SDRAM_CTRL0		0x4030 
+#define KS8695_SDRAM_CTRL1		0x4034
+#define KS8695_SDRAM_GENERAL		0x4038
+#define KS8695_SDRAM_BUFFER		0x403C
+#define KS8695_SDRAM_REFRESH		0x4040    
+
+/* WAN control registers offset difinitions */
+#define KS8695_WAN_DMA_TX		0x6000
+#define KS8695_WAN_DMA_RX		0x6004
+#define KS8695_WAN_DMA_TX_START		0x6008    
+#define KS8695_WAN_DMA_RX_START		0x600C    
+#define KS8695_WAN_TX_LIST		0x6010
+#define KS8695_WAN_RX_LIST		0x6014
+#define KS8695_WAN_MAC_LOW		0x6018
+#define KS8695_WAN_MAC_HIGH		0x601C
+#define KS8695_WAN_MAC_ELOW		0x6080
+#define KS8695_WAN_MAC_EHIGH		0x6084
+
+/* LAN control registers offset difinitions */
+#define KS8695_LAN_DMA_TX		0x8000
+#define KS8695_LAN_DMA_RX		0x8004
+#define KS8695_LAN_DMA_TX_START		0x8008    
+#define KS8695_LAN_DMA_RX_START		0x800C    
+#define KS8695_LAN_TX_LIST		0x8010
+#define KS8695_LAN_RX_LIST		0x8014
+#define KS8695_LAN_MAC_LOW		0x8018
+#define KS8695_LAN_MAC_HIGH		0x801C
+#define KS8695_LAN_MAC_ELOW		0X8080
+#define KS8695_LAN_MAC_EHIGH		0X8084
+
+/* HPNA control registers offset difinitions */
+#define KS8695_HPNA_DMA_TX		0xA000
+#define KS8695_HPNA_DMA_RX		0xA004
+#define KS8695_HPNA_DMA_TX_START	0xA008    
+#define KS8695_HPNA_DMA_RX_START	0xA00C    
+#define KS8695_HPNA_TX_LIST		0xA010
+#define KS8695_HPNA_RX_LIST		0xA014
+#define KS8695_HPNA_MAC_LOW		0xA018
+#define KS8695_HPNA_MAC_HIGH		0xA01C
+#define KS8695_HPNA_MAC_ELOW		0xA080
+#define KS8695_HPNA_MAC_EHIGH		0xA084
+
+/* UART control registers offset difinitions */
+#define KS8695_UART_RX_BUFFER		0xE000
+#define KS8695_UART_TX_HOLDING		0xE004
+
+#define KS8695_UART_FIFO_CTRL		0xE008
+#define KS8695_UART_FIFO_TRIG01		0x00
+#define KS8695_UART_FIFO_TRIG04		0x80
+#define KS8695_UART_FIFO_TXRST		0x03
+#define KS8695_UART_FIFO_RXRST		0x02
+#define KS8695_UART_FIFO_FEN		0x01
+
+#define KS8695_UART_LINE_CTRL		0xE00C
+#define KS8695_UART_LINEC_BRK		0x40
+#define KS8695_UART_LINEC_EPS		0x10
+#define KS8695_UART_LINEC_PEN		0x08
+#define KS8695_UART_LINEC_STP2		0x04
+#define KS8695_UART_LINEC_WLEN8		0x03
+#define KS8695_UART_LINEC_WLEN7		0x02
+#define KS8695_UART_LINEC_WLEN6		0x01
+#define KS8695_UART_LINEC_WLEN5		0x00
+
+#define KS8695_UART_MODEM_CTRL		0xE010
+#define KS8695_UART_MODEMC_RTS		0x02
+#define KS8695_UART_MODEMC_DTR		0x01
+
+#define KS8695_UART_LINE_STATUS		0xE014
+#define KS8695_UART_LINES_TXFE		0x20
+#define KS8695_UART_LINES_BE		0x10
+#define KS8695_UART_LINES_FE		0x08
+#define KS8695_UART_LINES_PE		0x04
+#define KS8695_UART_LINES_OE		0x02
+#define KS8695_UART_LINES_RXFE		0x01
+#define KS8695_UART_LINES_ANY		(KS8695_UART_LINES_OE | \
+					 KS8695_UART_LINES_BE | \
+					 KS8695_UART_LINES_PE | \
+					 KS8695_UART_LINES_FE)
+
+#define KS8695_UART_MODEM_STATUS	0xE018
+#define KS8695_UART_MODEM_DCD		0x80
+#define KS8695_UART_MODEM_DSR		0x20
+#define KS8695_UART_MODEM_CTS		0x10
+#define KS8695_UART_MODEM_DDCD		0x08
+#define KS8695_UART_MODEM_DDSR		0x02
+#define KS8695_UART_MODEM_DCTS		0x01
+#define KS8695_UART_MODEM_ANY		0xFF
+
+#define KS8695_UART_DIVISOR		0xE01C
+#define KS8695_UART_STATUS		0xE020
+
+/* Interrupt controlller registers offset difinitions */
+#define KS8695_INT_CONTL		0xE200
+#define KS8695_INT_ENABLE		0xE204
+#define KS8695_INT_ENABLE_MODEM		0x0800
+#define KS8695_INT_ENABLE_ERR		0x0400
+#define KS8695_INT_ENABLE_RX		0x0200
+#define KS8695_INT_ENABLE_TX		0x0100
+#define	KS8695_INT_UART_MASK		0x0f00
+
+#define KS8695_INT_STATUS		0xE208
+#define KS8695_INT_WAN_PRIORITY		0xE20C
+#define KS8695_INT_HPNA_PRIORITY	0xE210
+#define KS8695_INT_LAN_PRIORITY		0xE214
+#define KS8695_INT_TIMER_PRIORITY	0xE218
+#define KS8695_INT_UART_PRIORITY	0xE21C
+#define KS8695_INT_EXT_PRIORITY		0xE220
+#define KS8695_INT_CHAN_PRIORITY	0xE224
+#define KS8695_INT_BUSERROR_PRO		0xE228
+#define KS8695_INT_MASK_STATUS		0xE22C
+#define KS8695_FIQ_PEND_PRIORITY	0xE230
+#define KS8695_IRQ_PEND_PRIORITY	0xE234
+
+/* timer registers offset difinitions */
+#define KS8695_TIMER_CTRL		0xE400
+#define KS8695_TIMER1			0xE404
+#define KS8695_TIMER0			0xE408
+#define KS8695_TIMER1_PCOUNT		0xE40C
+#define KS8695_TIMER0_PCOUNT		0xE410
+
+/* GPIO registers offset difinitions */
+#define KS8695_GPIO_MODE		0xE600
+#define KS8695_GPIO_CTRL		0xE604
+#define KS8695_GPIO_DATA		0xE608
+
+/* SWITCH registers offset difinitions */
+#define KS8695_SWITCH_CTRL0		0xE800
+#define KS8695_SWITCH_CTRL1		0xE804
+#define KS8695_SWITCH_PORT1		0xE808
+#define KS8695_SWITCH_PORT2		0xE80C
+#define KS8695_SWITCH_PORT3		0xE810
+#define KS8695_SWITCH_PORT4		0xE814
+#define KS8695_SWITCH_PORT5 		0xE818
+#define KS8695_SWITCH_LUE_CTRL		0xE824
+#define KS8695_SWITCH_LUE_HIGH		0xE828
+#define KS8695_SWITCH_LUE_LOW		0xE82C
+
+/* some differences between the KS8695(X) and KS8695P */
+#ifdef CONFIG_PCI
+#define KS8695_SWITCH_AUTO0		0xE848
+#define KS8695_SWITCH_AUTO1		0xE84C
+#define KS8695_SWITCH_ADVANCED		0xE860
+#define KS8695_DSCP_HIGH		0xE864
+#define KS8695_DSCP_LOW			0xE868
+#define KS8695_SWITCH_MAC_HIGH		0xE86C
+#define KS8695_SWITCH_MAC_LOW		0xE870
+#define KS8695_LAN12_POWERMAGR		0xE874
+#define KS8695_LAN34_POWERMAGR		0xE878
+#else
+#define KS8695_SWITCH_AUTO0		0xE81C
+#define KS8695_SWITCH_AUTO1		0xE820
+#define KS8695_SWITCH_ADVANCED		0xE830
+#define KS8695_DSCP_HIGH		0xE834
+#define KS8695_DSCP_LOW			0xE838
+#define KS8695_SWITCH_MAC_HIGH		0xE83C
+#define KS8695_SWITCH_MAC_LOW		0xE840
+#define KS8695_LAN12_POWERMAGR		0xE84C
+#define KS8695_LAN34_POWERMAGR		0xE850
+#endif
+
+/* miscellaneours registers difinitions */
+#define KS8695_MANAGE_COUNTER		0xE844
+#define KS8695_MANAGE_DATA		0xE848
+
+#define KS8695_DEVICE_ID		0xEA00
+#define KS8695_REVISION_ID		0xEA04
+
+#define KS8695_MISC_CONTROL		0xEA08
+#define KS8695_WAN_CONTROL		0xEA0C
+#define KS8695_WAN_POWERMAGR		0xEA10
+#define KS8695_WAN_PHY_CONTROL		0xEA14
+#define KS8695_WAN_PHY_STATUS		0xEA18
+
+
+/*
+ * The following are all new in the KS8695P.
+ */
+#ifdef CONFIG_PCI
+
+/* most bit definition are same as KS8695, except few new bits */
+#define KS8695_SEC0			0xE800
+#define KS8695_SEC1			0xE804
+
+/* new bits */
+#define	KS8695_SEC0_BACKOFF_EN		0x80000000
+#define	KS8695_SEC0_FRAME_LEN_CHECK	0x00020000
+#define	KS8695_SEC0_DMA_HALF_DUPLEX	0x00000010
+
+/* new bits */
+#define	KS8695_SEC1_NO_IEEE_AN		0x00000800
+#define	KS8695_SEC1_TPID_MODE		0x00000400
+#define	KS8695_SEC1_NO_TX_8021X_FLOW_CTRL 0x00000080
+#define	KS8695_SEC1_NO_RX_8021X_FLOW_CTRL 0x00000040
+#define	KS8695_SEC1_HUGE_PACKET		0x00000020
+#define	KS8695_SEC1_8021Q_VLAN_EN	0x00000010
+#define	KS8695_SEC1_MII_10BT		0x00000002
+#define	KS8695_SEC1_NULL_VID		0x00000001
+
+/* Port 1-4 and 5 Configuration Register Set 1 */
+#define KS8695_SEP1C1			0xE80C
+#define KS8695_SEP2C1			0xE818
+#define KS8695_SEP3C1			0xE824
+#define KS8695_SEP4C1			0xE830
+#define KS8695_SEP5C1			0xE83C
+
+/* Port 1-4 and 5 Configuration Register Set 2 */
+#define KS8695_SEP1C2			0xE810
+#define KS8695_SEP2C2			0xE81C
+#define KS8695_SEP3C2			0xE828
+#define KS8695_SEP4C2			0xE834
+#define KS8695_SEP5C2			0xE840
+
+#define	KS8695_SEPC2_VLAN_FILTER	0x10000000
+#define	KS8695_SEPC2_DISCARD_NON_PVID	0x08000000
+#define	KS8695_SEPC2_FORCE_FLOW_CTRL	0x04000000
+#define	KS8695_SEPC2_BACK_PRESSURE_EN	0x02000000
+
+#define	KS8695_SEPC2_TX_H_RATECTRL_MASK	0x00FFF000
+#define	KS8695_SEPC2_TX_L_RATECTRL_MASK	0x00000FFF
+
+/* Port 1-4 and 5 Configuration Register Set 3 */
+#define KS8695_SEP1C3			0xE814
+#define KS8695_SEP2C3			0xE820
+#define KS8695_SEP3C3			0xE82C
+#define KS8695_SEP4C3			0xE838
+#define KS8695_SEP5C3			0xE844
+
+#define	KS8695_SEPC3_RX_H_RATECTRL_MASK	0xFFF00000
+#define	KS8695_SEPC3_RX_L_RATECTRL_MASK	0x000FFF00
+#define	KS8695_SEPC3_RX_DIF_RATECTRL_EN	0x00000080
+#define	KS8695_SEPC3_RX_L_RATECTRL_EN	0x00000040
+#define	KS8695_SEPC3_RX_H_RATECTRL_EN	0x00000020
+#define	KS8695_SEPC3_RX_L_RATEFLOW_EN	0x00000010
+#define	KS8695_SEPC3_RX_H_RATEFLOW_EN	0x00000008
+#define	KS8695_SEPC3_TX_DIF_RATECTRL_EN	0x00000004
+#define	KS8695_SEPC3_TX_L_RATECTRL_EN	0x00000002
+#define	KS8695_SEPC3_TX_H_RATECTRL_EN	0x00000001
+
+/* Port auto negotiation related registers */
+#define KS8695_SEP12AN			0xE848
+#define KS8695_SEP34AN			0xE84C
+
+/* Indirect Access Control register */
+#define KS8695_SEIAC			0xE850
+#define KS8695_SEIADH2			0xE854
+#define KS8695_SEIADH1			0xE858
+#define KS8695_SEIADL			0xE85C
+
+#define	KS8695_SEIAC_READ		0x00001000
+#define	KS8695_SEIAC_WRITE		0x00000000
+#define	KS8695_SEIAC_TAB_STATIC		0x00000000
+#define	KS8695_SEIAC_TAB_VLAN		0x00000400
+#define	KS8695_SEIAC_TAB_DYNAMIC	0x00000800
+#define	KS8695_SEIAC_TAB_MIB		0x00000C00
+#define	KS8695_SEIAC_INDEX_MASK		0x000003FF
+
+/* Advanced Feature Control register */
+#define KS8695_SEAFC			0xE860
+#define KS8695_SEDSCPH			0xE864
+#define KS8695_SEDSCPL			0xE868
+#define KS8695_SEMAH			0xE86C
+#define KS8695_SEMAL			0xE870
+
+/* LAN PHY power management related registers */
+#define KS8695_LPPM12			0xE874
+#define KS8695_LPPM34			0xE878
+
+/* new bits */
+#define	KS8695_LPPM_PHY_LOOPBACK	0x4000
+#define	KS8695_LPPM_RMT_LOOPBACK	0x2000
+#define	KS8695_LPPM_PHY_ISOLATE		0x1000
+#define	KS8695_LPPM_SOFT_RESET		0x0800
+#define	KS8695_LPPM_FORCE_LINK		0x0400
+
+/* new bits */
+#define	KS8695_LPPM_PHY_LOOPBACK	0x4000
+#define	KS8695_LPPM_RMT_LOOPBACK	0x2000
+#define	KS8695_LPPM_PHY_ISOLATE		0x1000
+#define	KS8695_LPPM_SOFT_RESET		0x0800
+#define	KS8695_LPPM_FORCE_LINK		0x0400
+
+/* Digital Testing Status and Control Registers */
+#define KS8695_SEDTS			0xE87C
+#define KS8695_SEATCS			0xE880
+
+/* new bits for WAN PHY Power mangement register */
+#define	KS8695_WPPM_PHY_LOOPBACK	0x00004000
+#define	KS8695_WPPM_RMT_LOOPBACK	0x00002000
+#define	KS8695_WPPM_PHY_ISOLATION	0x00001000
+#define	KS8695_WPPM_FORCE_LINK		0x00000400
+
+#endif /* CONFIG_PCI */
+
+#endif /* __ASM_ARCH_KS8695_REGS_H */
diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/memory.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/memory.h
--- linux-2.6.16/include/asm-arm/arch-ks8695/memory.h	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/memory.h	2006-03-22 23:45:56.000000000 +1000
@@ -0,0 +1,44 @@
+/*
+ *  linux/include/asm-arm/arch-ks8695/memory.h
+ *
+ *  Copyright (C) 2002 Micrel 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 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
+ */
+#ifndef __ASM_ARCH_MEMORY_H
+#define __ASM_ARCH_MEMORY_H
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/ks8695-regs.h>
+#include <asm/arch/ks8695-pci.h>
+
+/*
+ * All the current machines based on this I know of have RAM based at
+ * address 0. Lets deal with any that don't if/when we hit them.
+ */
+#define PHYS_OFFSET	UL(0x00000000)              
+
+/*
+ * Virtual view <-> DMA view memory address translations
+ * virt_to_bus: Used to translate the virtual address to an
+ *              address suitable to be passed to set_dma_addr
+ * bus_to_virt: Used to convert an address for DMA operations
+ *              to an address that the kernel can use.
+ * On KS8695, physical and bus address are same for dram
+ */
+#define __virt_to_bus(x)	((x) - PAGE_OFFSET  + KS8695P_PCI_MEM_BASE)
+#define __bus_to_virt(x)	((x) - KS8695P_PCI_MEM_BASE + PAGE_OFFSET)
+
+#endif /* __ASM_ARCH_MEMORY_H */
diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/param.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/param.h
--- linux-2.6.16/include/asm-arm/arch-ks8695/param.h	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/param.h	2006-02-20 13:39:13.000000000 +1000
@@ -0,0 +1,20 @@
+/*
+ *  linux/include/asm-arm/arch-ks8695/param.h
+ *
+ *  Copyright (C) 1999 ARM Limited
+ *
+ * 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
+ */
+
diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/system.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/system.h
--- linux-2.6.16/include/asm-arm/arch-ks8695/system.h	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/system.h	2006-02-21 10:07:50.000000000 +1000
@@ -0,0 +1,48 @@
+/*
+ *  linux/include/asm-arm/arch-ks8695/system.h
+ *
+ *  Copyright (C) 2002 Micrel 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 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
+ */
+#ifndef __ASM_ARCH_SYSTEM_H
+#define __ASM_ARCH_SYSTEM_H
+
+#include <asm/io.h>
+#include <asm/arch/ks8695-regs.h>
+
+static void arch_idle(void)
+{
+	/*
+	 * This should do all the clock switching
+	 * and wait for interrupt tricks
+	 */
+	cpu_do_idle();
+}
+
+static inline void arch_reset(char mode)
+{
+	unsigned int val;
+
+	/* To reset, use the watchdog timer */
+	val = __raw_readl(KS8695_REG(KS8695_TIMER_CTRL)) & 0x02;
+	__raw_writel(val, KS8695_REG(KS8695_TIMER_CTRL));
+	val = (10 << 8) | 0xFF;
+	__raw_writel(val, KS8695_REG(KS8695_TIMER0));
+	val = __raw_readl(KS8695_REG(KS8695_TIMER_CTRL)) | 0x01;
+	__raw_writel(val, KS8695_REG(KS8695_TIMER_CTRL));
+}
+
+#endif /* __ASM_ARCH_SYSTEM_H */
diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/timex.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/timex.h
--- linux-2.6.16/include/asm-arm/arch-ks8695/timex.h	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/timex.h	2006-03-15 22:44:05.000000000 +1000
@@ -0,0 +1,26 @@
+/*
+ *  linux/include/asm-arm/arch-ks8695/timex.h
+ *
+ *  Copyright (C) 1999 ARM Limited
+ *
+ * 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
+ */
+
+#ifndef __ASM_ARCH_TIMEX_H
+#define __ASM_ARCH_TIMEX_H 1
+
+#define CLOCK_TICK_RATE		(25000000)
+
+#endif /* __ASM_ARCH_TIMEX_H */
diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/uncompress.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/uncompress.h
--- linux-2.6.16/include/asm-arm/arch-ks8695/uncompress.h	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/uncompress.h	2006-03-15 00:22:13.000000000 +1000
@@ -0,0 +1,60 @@
+/*
+ *  linux/include/asm-arm/arch-ks8695/uncompress.h
+ *
+ *  Copyright (C) 1999 ARM Limited
+ *
+ * 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 <asm/arch/ks8695-regs.h>
+
+/*
+ * These access routines operate on the physical address space.
+ */
+static inline unsigned int ks8695_getreg(unsigned int r)
+{
+	return *((unsigned int *) (KS8695_IO_BASE + r));
+}
+
+static inline void ks8695_setreg(unsigned int r, unsigned int v)
+{
+	*((unsigned int *) (KS8695_IO_BASE + r)) = v;
+}
+
+static void putc(char c)
+{
+	while ((ks8695_getreg(KS8695_UART_LINE_STATUS) & KS8695_UART_LINES_TXFE) == 0)
+		;
+
+	ks8695_setreg(KS8695_UART_TX_HOLDING, c);
+}
+
+
+static void putstr(const char *s)
+{
+	while (*s) {
+		putc(*s);
+		if (*s == '\n')
+			putc('\r');
+		s++;
+	}
+}
+
+/*
+ * nothing to do
+ */
+#define arch_decomp_setup()
+
+#define arch_decomp_wdog()
diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/vmalloc.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/vmalloc.h
--- linux-2.6.16/include/asm-arm/arch-ks8695/vmalloc.h	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/vmalloc.h	2006-02-20 13:39:13.000000000 +1000
@@ -0,0 +1,26 @@
+/*
+ *  linux/include/asm-arm/arch-ks8695/vmalloc.h
+ *
+ *  Copyright (C) 2000 Russell King.
+ *
+ * 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
+ */
+
+#ifndef	__ASM_ARCH_VMALLOC_H
+#define	__ASM_ARCH_VMALLOC_H 1
+
+#define VMALLOC_END       (PAGE_OFFSET + 0x10000000)
+
+#endif /* __ASM_ARCH_VMALLOC_H */
diff -Naur linux-2.6.16/arch/arm/boot/compressed/head-ks8695.S linux-2.6.16.ks8695/arch/arm/boot/compressed/head-ks8695.S
--- linux-2.6.16/arch/arm/boot/compressed/head-ks8695.S	1970-01-01 10:00:00.000000000 +1000
+++ linux-2.6.16.ks8695/arch/arm/boot/compressed/head-ks8695.S	2006-03-20 13:55:24.000000000 +1000
@@ -0,0 +1,5 @@
+#include <asm/mach-types.h>
+
+	.section	".start", "ax"
+	mov	r7, #(MACH_TYPE_KS8695 & 0xff)
+	orr	r7, r7, #(MACH_TYPE_KS8695 & 0xff00)
diff -Naur linux-2.6.16/arch/arm/boot/compressed/Makefile linux-2.6.16.ks8695/arch/arm/boot/compressed/Makefile
--- linux-2.6.16/arch/arm/boot/compressed/Makefile	2006-03-20 15:53:29.000000000 +1000
+++ linux-2.6.16.ks8695/arch/arm/boot/compressed/Makefile	2006-03-21 17:07:45.000000000 +1000
@@ -46,6 +46,10 @@
 OBJS		+= head-sharpsl.o
 endif
 
+ifeq ($(CONFIG_ARCH_KS8695),y)
+OBJS		+= head-ks8695.o
+endif
+
 ifeq ($(CONFIG_ARCH_AT91RM9200),y)
 OBJS		+= head-at91rm9200.o
 endif

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php