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#include <common.h>
31#include <74xx_7xx.h>
32#include "../include/memory.h"
33#include "../include/pci.h"
34#include "../include/mv_gen_reg.h"
35#include <net.h>
36#include <netdev.h>
37
38#include "eth.h"
39#include "mpsc.h"
40#include "i2c.h"
41#include "64360.h"
42#include "mv_regs.h"
43
44#undef DEBUG
45
46
47#define MAP_PCI
48
49#ifdef DEBUG
50#define DP(x) x
51#else
52#define DP(x)
53#endif
54
55
56
57
58
59
60
61
62
63
64
65
66void board_prebootm_init (void);
67unsigned int INTERNAL_REG_BASE_ADDR = CONFIG_SYS_GT_REGS;
68int display_mem_map (void);
69
70
71
72
73
74
75
76
77
78
79
80void my_remap_gt_regs (u32 cur_loc, u32 new_loc)
81{
82 u32 temp;
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100 temp = in_le32 ((u32 *) (new_loc + INTERNAL_SPACE_DECODE));
101 if ((temp & 0xffff) == new_loc >> 16)
102 return;
103
104 temp = (in_le32 ((u32 *) (cur_loc + INTERNAL_SPACE_DECODE)) &
105 0xffff0000) | (new_loc >> 16);
106
107 out_le32 ((u32 *) (cur_loc + INTERNAL_SPACE_DECODE), temp);
108
109 while (GTREGREAD (INTERNAL_SPACE_DECODE) != temp);
110}
111
112#ifdef CONFIG_PCI
113
114static void gt_pci_config (void)
115{
116 unsigned int stat;
117 unsigned int val = 0x00fff864;
118
119
120
121
122
123 if ((GTREGREAD (PCI_0_MODE) & (BIT4 | BIT5)) != 0) {
124 GT_REG_WRITE (PCI_0_CONFIG_ADDR, BIT31 | val);
125
126 GT_REG_READ (PCI_0_CONFIG_DATA_VIRTUAL_REG, &stat);
127
128 GT_REG_WRITE (PCI_0_CONFIG_ADDR, BIT31 | val);
129 GT_REG_WRITE (PCI_0_CONFIG_DATA_VIRTUAL_REG,
130 (stat & 0xffff0000) | CONFIG_SYS_PCI_IDSEL);
131
132 }
133 if ((GTREGREAD (PCI_1_MODE) & (BIT4 | BIT5)) != 0) {
134 GT_REG_WRITE (PCI_1_CONFIG_ADDR, BIT31 | val);
135 GT_REG_READ (PCI_1_CONFIG_DATA_VIRTUAL_REG, &stat);
136
137 GT_REG_WRITE (PCI_1_CONFIG_ADDR, BIT31 | val);
138 GT_REG_WRITE (PCI_1_CONFIG_DATA_VIRTUAL_REG,
139 (stat & 0xffff0000) | CONFIG_SYS_PCI_IDSEL);
140 }
141
142
143 PCI_MASTER_ENABLE (0, SELF);
144 PCI_MASTER_ENABLE (1, SELF);
145
146
147 GT_REG_READ (BASE_ADDR_ENABLE, &stat);
148 stat |= (1 << 11) | (1 << 12) | (1 << 13) | (1 << 16) | (1 << 17) | (1
149 <<
150 18);
151 stat &= ~((1 << 9) | (1 << 10) | (1 << 14) | (1 << 15));
152 GT_REG_WRITE (BASE_ADDR_ENABLE, stat);
153
154
155
156
157 GT_REG_WRITE (PCI_0_IO_BASE_ADDR, CONFIG_SYS_PCI0_IO_BASE >> 16);
158 GT_REG_WRITE (PCI_0I_O_ADDRESS_REMAP, CONFIG_SYS_PCI0_IO_BASE >> 16);
159 GT_REG_WRITE (PCI_0_IO_SIZE, (CONFIG_SYS_PCI0_IO_SIZE - 1) >> 16);
160
161 GT_REG_WRITE (PCI_0_MEMORY0_BASE_ADDR, CONFIG_SYS_PCI0_MEM_BASE >> 16);
162 GT_REG_WRITE (PCI_0MEMORY0_ADDRESS_REMAP, CONFIG_SYS_PCI0_MEM_BASE >> 16);
163 GT_REG_WRITE (PCI_0_MEMORY0_SIZE, (CONFIG_SYS_PCI0_MEM_SIZE - 1) >> 16);
164
165 GT_REG_WRITE (PCI_1_IO_BASE_ADDR, CONFIG_SYS_PCI1_IO_BASE >> 16);
166 GT_REG_WRITE (PCI_1I_O_ADDRESS_REMAP, CONFIG_SYS_PCI1_IO_BASE >> 16);
167 GT_REG_WRITE (PCI_1_IO_SIZE, (CONFIG_SYS_PCI1_IO_SIZE - 1) >> 16);
168
169 GT_REG_WRITE (PCI_1_MEMORY0_BASE_ADDR, CONFIG_SYS_PCI1_MEM_BASE >> 16);
170 GT_REG_WRITE (PCI_1MEMORY0_ADDRESS_REMAP, CONFIG_SYS_PCI1_MEM_BASE >> 16);
171 GT_REG_WRITE (PCI_1_MEMORY0_SIZE, (CONFIG_SYS_PCI1_MEM_SIZE - 1) >> 16);
172
173
174
175 GT_REG_WRITE (PCI_0TIMEOUT_RETRY, 0x0);
176 GT_REG_WRITE (PCI_1TIMEOUT_RETRY, 0x0);
177
178
179 GT_REG_WRITE (PCI_0BASE_ADDRESS_REGISTERS_ENABLE, 0xfffffdfe);
180 GT_REG_WRITE (PCI_1BASE_ADDRESS_REGISTERS_ENABLE, 0xfffffdfe);
181
182
183#ifdef MAP_PCI
184 for (stat = 0; stat <= PCI_HOST1; stat++)
185 pciWriteConfigReg (stat,
186 PCI_INTERNAL_REGISTERS_MEMORY_MAPPED_BASE_ADDRESS,
187 SELF, CONFIG_SYS_GT_REGS);
188#endif
189
190}
191#endif
192
193
194static void gt_cpu_config (void)
195{
196 cpu_t cpu = get_cpu_type ();
197 ulong tmp;
198
199
200 tmp = GTREGREAD (CPU_CONFIGURATION);
201
202
203#ifndef CONFIG_SYS_GT_DUAL_CPU
204 tmp |= CPU_CONF_SINGLE_CPU;
205#endif
206
207 tmp &= ~CPU_CONF_AACK_DELAY_2;
208
209 tmp |= CPU_CONF_DP_VALID;
210 tmp |= CPU_CONF_AP_VALID;
211
212 tmp |= CPU_CONF_PIPELINE;
213
214 GT_REG_WRITE (CPU_CONFIGURATION, tmp);
215
216
217 tmp = GTREGREAD (CPU_MASTER_CONTROL);
218
219 tmp |= CPU_MAST_CTL_ARB_EN;
220
221 if ((cpu == CPU_7400) ||
222 (cpu == CPU_7410) || (cpu == CPU_7455) || (cpu == CPU_7450)) {
223
224 tmp |= CPU_MAST_CTL_CLEAN_BLK;
225 tmp |= CPU_MAST_CTL_FLUSH_BLK;
226
227 } else {
228
229
230
231 tmp &= ~CPU_MAST_CTL_CLEAN_BLK;
232 tmp &= ~CPU_MAST_CTL_FLUSH_BLK;
233 }
234 GT_REG_WRITE (CPU_MASTER_CONTROL, tmp);
235}
236
237
238
239
240
241
242int board_early_init_f (void)
243{
244 uchar sram_boot = 0;
245
246
247
248
249
250
251
252
253
254 my_remap_gt_regs (CONFIG_SYS_DFL_GT_REGS, CONFIG_SYS_GT_REGS);
255
256
257#ifdef CONFIG_PCI
258 gt_pci_config ();
259#endif
260
261 GT_REG_WRITE (CPU_INTERRUPT_MASK_REGISTER_LOW, 0);
262 GT_REG_WRITE (CPU_INTERRUPT_MASK_REGISTER_HIGH, 0);
263
264 GT_REG_WRITE (CPU_INTERRUPT_1_MASK_REGISTER_LOW, 0);
265 GT_REG_WRITE (CPU_INTERRUPT_1_MASK_REGISTER_HIGH, 0);
266
267 GT_REG_WRITE (PCI_0INTERRUPT_CAUSE_MASK_REGISTER_LOW, 0);
268 GT_REG_WRITE (PCI_0INTERRUPT_CAUSE_MASK_REGISTER_HIGH, 0);
269 GT_REG_WRITE (PCI_1INTERRUPT_CAUSE_MASK_REGISTER_LOW, 0);
270 GT_REG_WRITE (PCI_1INTERRUPT_CAUSE_MASK_REGISTER_HIGH, 0);
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 if (memoryGetDeviceBaseAddress (DEVICE0) == CONFIG_SYS_DFL_BOOTCS_BASE)
301 sram_boot = 1;
302 if (!sram_boot)
303 memoryMapDeviceSpace (DEVICE0, CONFIG_SYS_DEV0_SPACE, CONFIG_SYS_DEV0_SIZE);
304
305 memoryMapDeviceSpace (DEVICE1, CONFIG_SYS_DEV1_SPACE, CONFIG_SYS_DEV1_SIZE);
306 memoryMapDeviceSpace (DEVICE2, CONFIG_SYS_DEV2_SPACE, CONFIG_SYS_DEV2_SIZE);
307 memoryMapDeviceSpace (DEVICE3, CONFIG_SYS_DEV3_SPACE, CONFIG_SYS_DEV3_SIZE);
308
309
310
311#ifdef CONFIG_SYS_DEV0_PAR
312 if (!sram_boot)
313 GT_REG_WRITE (DEVICE_BANK0PARAMETERS, CONFIG_SYS_DEV0_PAR);
314#endif
315
316#ifdef CONFIG_SYS_DEV1_PAR
317 GT_REG_WRITE (DEVICE_BANK1PARAMETERS, CONFIG_SYS_DEV1_PAR);
318#endif
319#ifdef CONFIG_SYS_DEV2_PAR
320 GT_REG_WRITE (DEVICE_BANK2PARAMETERS, CONFIG_SYS_DEV2_PAR);
321#endif
322
323#ifdef CONFIG_SYS_32BIT_BOOT_PAR
324
325 if (GTREGREAD (DEVICE_BOOT_BANK_PARAMETERS) & (0x3 << 20)) {
326
327 GT_REG_WRITE (DEVICE_BANK3PARAMETERS, CONFIG_SYS_8BIT_BOOT_PAR);
328 GT_REG_WRITE (DEVICE_BOOT_BANK_PARAMETERS,
329 CONFIG_SYS_32BIT_BOOT_PAR);
330 } else {
331
332 GT_REG_WRITE (DEVICE_BANK3PARAMETERS, CONFIG_SYS_32BIT_BOOT_PAR);
333 GT_REG_WRITE (DEVICE_BOOT_BANK_PARAMETERS, CONFIG_SYS_8BIT_BOOT_PAR);
334 }
335#else
336
337
338#endif
339
340
341 gt_cpu_config ();
342
343
344 GT_REG_WRITE (MPP_CONTROL0, CONFIG_SYS_MPP_CONTROL_0);
345 GT_REG_WRITE (MPP_CONTROL1, CONFIG_SYS_MPP_CONTROL_1);
346 GT_REG_WRITE (MPP_CONTROL2, CONFIG_SYS_MPP_CONTROL_2);
347 GT_REG_WRITE (MPP_CONTROL3, CONFIG_SYS_MPP_CONTROL_3);
348
349 GT_REG_WRITE (GPP_LEVEL_CONTROL, CONFIG_SYS_GPP_LEVEL_CONTROL);
350 DEBUG_LED0_ON ();
351 DEBUG_LED1_ON ();
352 DEBUG_LED2_ON ();
353
354 return 0;
355}
356
357
358
359int misc_init_r ()
360{
361 icache_enable ();
362#ifdef CONFIG_SYS_L2
363 l2cache_enable ();
364#endif
365#ifdef CONFIG_MPSC
366
367 mpsc_sdma_init ();
368 mpsc_init2 ();
369#endif
370
371#if 0
372
373 dcache_lock ();
374#endif
375 return 0;
376}
377
378void after_reloc (ulong dest_addr, gd_t * gd)
379{
380
381
382
383 if (memoryGetDeviceBaseAddress (DEVICE0) == CONFIG_SYS_DFL_BOOTCS_BASE) {
384 memoryMapDeviceSpace (DEVICE0, CONFIG_SYS_DEV0_SPACE, CONFIG_SYS_DEV0_SIZE);
385 memoryMapDeviceSpace (BOOT_DEVICE, CONFIG_SYS_DFL_BOOTCS_BASE, _8M);
386 }
387 display_mem_map ();
388
389 board_init_r (gd, dest_addr);
390
391}
392
393
394
395
396
397
398
399
400
401int checkboard (void)
402{
403 int l_type = 0;
404
405 printf ("BOARD: %s\n", CONFIG_SYS_BOARD_NAME);
406 return (l_type);
407}
408
409
410void debug_led (int led, int mode)
411{
412 volatile int *addr = 0;
413 int dummy;
414
415 if (mode == 1) {
416 switch (led) {
417 case 0:
418 addr = (int *) ((unsigned int) CONFIG_SYS_DEV1_SPACE |
419 0x08000);
420 break;
421
422 case 1:
423 addr = (int *) ((unsigned int) CONFIG_SYS_DEV1_SPACE |
424 0x0c000);
425 break;
426
427 case 2:
428 addr = (int *) ((unsigned int) CONFIG_SYS_DEV1_SPACE |
429 0x10000);
430 break;
431 }
432 } else if (mode == 0) {
433 switch (led) {
434 case 0:
435 addr = (int *) ((unsigned int) CONFIG_SYS_DEV1_SPACE |
436 0x14000);
437 break;
438
439 case 1:
440 addr = (int *) ((unsigned int) CONFIG_SYS_DEV1_SPACE |
441 0x18000);
442 break;
443
444 case 2:
445 addr = (int *) ((unsigned int) CONFIG_SYS_DEV1_SPACE |
446 0x1c000);
447 break;
448 }
449 }
450
451 dummy = *addr;
452}
453
454int display_mem_map (void)
455{
456 int i, j;
457 unsigned int base, size, width;
458
459
460 printf ("SD (DDR) RAM\n");
461 for (i = 0; i <= BANK3; i++) {
462 base = memoryGetBankBaseAddress (i);
463 size = memoryGetBankSize (i);
464 if (size != 0) {
465 printf ("BANK%d: base - 0x%08x\tsize - %dM bytes\n",
466 i, base, size >> 20);
467 }
468 }
469
470
471 for (i = 0; i <= PCI_HOST1; i++) {
472 printf ("\nCPU's PCI %d windows\n", i);
473 base = pciGetSpaceBase (i, PCI_IO);
474 size = pciGetSpaceSize (i, PCI_IO);
475 printf (" IO: base - 0x%08x\tsize - %dM bytes\n", base,
476 size >> 20);
477 for (j = 0;
478 j <=
479 PCI_REGION0
480 ;
481 j++) {
482 base = pciGetSpaceBase (i, j);
483 size = pciGetSpaceSize (i, j);
484 printf ("MEMORY %d: base - 0x%08x\tsize - %dM bytes\n", j, base, size >> 20);
485 }
486 }
487
488
489 printf ("\nDEVICES\n");
490 for (i = 0; i <= DEVICE3; i++) {
491 base = memoryGetDeviceBaseAddress (i);
492 size = memoryGetDeviceSize (i);
493 width = memoryGetDeviceWidth (i) * 8;
494 printf ("DEV %d: base - 0x%08x size - %dM bytes\twidth - %d bits", i, base, size >> 20, width);
495 if (i == 0)
496 printf ("\t- EXT SRAM (actual - 1M)\n");
497 else if (i == 1)
498 printf ("\t- RTC\n");
499 else if (i == 2)
500 printf ("\t- UART\n");
501 else
502 printf ("\t- LARGE FLASH\n");
503 }
504
505
506 base = memoryGetDeviceBaseAddress (BOOT_DEVICE);
507 size = memoryGetDeviceSize (BOOT_DEVICE);
508 width = memoryGetDeviceWidth (BOOT_DEVICE) * 8;
509 printf (" BOOT: base - 0x%08x size - %dM bytes\twidth - %d bits\n",
510 base, size >> 20, width);
511 return (0);
512}
513
514
515
516#if defined (CONFIG_SYS_DRAM_TEST)
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538static void move64 (unsigned long long *src, unsigned long long *dest)
539{
540 asm ("lfd 0, 0(3)\n\t"
541 "stfd 0, 0(4)"
542 : : : "fr0");
543 return;
544}
545
546
547#if defined (CONFIG_SYS_DRAM_TEST_DATA)
548
549unsigned long long pattern[] = {
550 0xaaaaaaaaaaaaaaaaULL,
551 0xccccccccccccccccULL,
552 0xf0f0f0f0f0f0f0f0ULL,
553 0xff00ff00ff00ff00ULL,
554 0xffff0000ffff0000ULL,
555 0xffffffff00000000ULL,
556 0x00000000ffffffffULL,
557 0x0000ffff0000ffffULL,
558 0x00ff00ff00ff00ffULL,
559 0x0f0f0f0f0f0f0f0fULL,
560 0x3333333333333333ULL,
561 0x5555555555555555ULL,
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
608int mem_test_data (void)
609{
610 unsigned long long *pmem = (unsigned long long *) CONFIG_SYS_MEMTEST_START;
611 unsigned long long temp64 = 0;
612 int num_patterns = sizeof (pattern) / sizeof (pattern[0]);
613 int i;
614 unsigned int hi, lo;
615
616 for (i = 0; i < num_patterns; i++) {
617 move64 (&(pattern[i]), pmem);
618 move64 (pmem, &temp64);
619
620
621
622
623
624 hi = (pattern[i] >> 32) & 0xffffffff;
625 lo = pattern[i] & 0xffffffff;
626
627
628 if (temp64 != pattern[i]) {
629 printf ("\n Data Test Failed, pattern 0x%08x%08x",
630 hi, lo);
631 return 1;
632 }
633 }
634
635 return 0;
636}
637#endif
638
639#if defined (CONFIG_SYS_DRAM_TEST_ADDRESS)
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661int mem_test_address (void)
662{
663 volatile unsigned int *pmem =
664 (volatile unsigned int *) CONFIG_SYS_MEMTEST_START;
665 const unsigned int size = (CONFIG_SYS_MEMTEST_END - CONFIG_SYS_MEMTEST_START) / 4;
666 unsigned int i;
667
668
669 for (i = 0; i < size; i++) {
670 pmem[i] = i;
671 }
672
673
674 for (i = 0; i < size; i++) {
675 if (pmem[i] != i) {
676 printf ("\n Address Test Failed at 0x%x", i);
677 return 1;
678 }
679 }
680 return 0;
681}
682#endif
683
684#if defined (CONFIG_SYS_DRAM_TEST_WALK)
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
712int mem_march (volatile unsigned long long *base,
713 unsigned int size,
714 unsigned long long rmask,
715 unsigned long long wmask, short read, short write)
716{
717 unsigned int i;
718 unsigned long long temp = 0;
719 unsigned int hitemp, lotemp, himask, lomask;
720
721 for (i = 0; i < size; i++) {
722 if (read != 0) {
723
724 move64 ((unsigned long long *) &(base[i]), &temp);
725 if (rmask != temp) {
726 hitemp = (temp >> 32) & 0xffffffff;
727 lotemp = temp & 0xffffffff;
728 himask = (rmask >> 32) & 0xffffffff;
729 lomask = rmask & 0xffffffff;
730
731 printf ("\n Walking one's test failed: address = 0x%08x," "\n\texpected 0x%08x%08x, found 0x%08x%08x", i << 3, himask, lomask, hitemp, lotemp);
732 return 1;
733 }
734 }
735 if (write != 0) {
736
737 move64 (&wmask, (unsigned long long *) &(base[i]));
738 }
739 }
740 return 0;
741}
742#endif
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
770int mem_test_walk (void)
771{
772 unsigned long long mask;
773 volatile unsigned long long *pmem =
774 (volatile unsigned long long *) CONFIG_SYS_MEMTEST_START;
775 const unsigned long size = (CONFIG_SYS_MEMTEST_END - CONFIG_SYS_MEMTEST_START) / 8;
776
777 unsigned int i;
778
779 mask = 0x01;
780
781 printf ("Initial Pass");
782 mem_march (pmem, size, 0x0, 0x1, 0, 1);
783
784 printf ("\b\b\b\b\b\b\b\b\b\b\b\b");
785 printf (" ");
786 printf (" ");
787 printf ("\b\b\b\b\b\b\b\b\b\b\b\b");
788
789 for (i = 0; i < 63; i++) {
790 printf ("Pass %2d", i + 2);
791 if (mem_march (pmem, size, mask, mask << 1, 1, 1) != 0) {
792
793 return 1;
794 }
795 mask = mask << 1;
796 printf ("\b\b\b\b\b\b\b");
797 }
798
799 printf ("Last Pass");
800 if (mem_march (pmem, size, 0, mask, 0, 1) != 0) {
801
802 return 1;
803 }
804 printf ("\b\b\b\b\b\b\b\b\b");
805 printf (" ");
806 printf ("\b\b\b\b\b\b\b\b\b");
807
808 return 0;
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
834int testdram (void)
835{
836 char *s;
837 int rundata, runaddress, runwalk;
838
839 s = getenv ("testdramdata");
840 rundata = (s && (*s == 'y')) ? 1 : 0;
841 s = getenv ("testdramaddress");
842 runaddress = (s && (*s == 'y')) ? 1 : 0;
843 s = getenv ("testdramwalk");
844 runwalk = (s && (*s == 'y')) ? 1 : 0;
845
846
847
848
849
850 if ((rundata == 1) || (runaddress == 1) || (runwalk == 1)) {
851 printf ("Testing RAM from 0x%08x to 0x%08x ... (don't panic... that will take a moment !!!!)\n", CONFIG_SYS_MEMTEST_START, CONFIG_SYS_MEMTEST_END);
852 }
853#ifdef CONFIG_SYS_DRAM_TEST_DATA
854 if (rundata == 1) {
855 printf ("Test DATA ... ");
856 if (mem_test_data () == 1) {
857 printf ("failed \n");
858 return 1;
859 } else
860 printf ("ok \n");
861 }
862#endif
863#ifdef CONFIG_SYS_DRAM_TEST_ADDRESS
864 if (runaddress == 1) {
865 printf ("Test ADDRESS ... ");
866 if (mem_test_address () == 1) {
867 printf ("failed \n");
868 return 1;
869 } else
870 printf ("ok \n");
871 }
872#endif
873#ifdef CONFIG_SYS_DRAM_TEST_WALK
874 if (runwalk == 1) {
875 printf ("Test WALKING ONEs ... ");
876 if (mem_test_walk () == 1) {
877 printf ("failed \n");
878 return 1;
879 } else
880 printf ("ok \n");
881 }
882#endif
883 if ((rundata == 1) || (runaddress == 1) || (runwalk == 1)) {
884 printf ("passed\n");
885 }
886 return 0;
887
888}
889#endif
890
891
892
893
894
895
896void my_remap_gt_regs_bootm (u32 cur_loc, u32 new_loc)
897{
898 u32 temp;
899
900 temp = in_le32 ((u32 *) (new_loc + INTERNAL_SPACE_DECODE));
901 if ((temp & 0xffff) == new_loc >> 16)
902 return;
903
904 temp = (in_le32 ((u32 *) (cur_loc + INTERNAL_SPACE_DECODE)) &
905 0xffff0000) | (new_loc >> 16);
906
907 out_le32 ((u32 *) (cur_loc + INTERNAL_SPACE_DECODE), temp);
908
909 while ((WORD_SWAP (*((volatile unsigned int *) (NONE_CACHEABLE |
910 new_loc |
911 (INTERNAL_SPACE_DECODE)))))
912 != temp);
913
914}
915
916void board_prebootm_init ()
917{
918
919
920 GT_REG_WRITE (PCI_1_IO_SIZE, (_64K - 1) >> 16);
921
922
923 GT_REG_WRITE (MV64360_ETH_RECEIVE_QUEUE_COMMAND_REG (0), 0x0000ff00);
924 GT_REG_WRITE (MV64360_ETH_RECEIVE_QUEUE_COMMAND_REG (1), 0x0000ff00);
925
926
927
928 my_remap_gt_regs_bootm (CONFIG_SYS_GT_REGS, BRIDGE_REG_BASE_BOOTM);
929
930 icache_disable ();
931 dcache_disable ();
932}
933
934int board_eth_init(bd_t *bis)
935{
936 return pci_eth_init(bis);
937}
938