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#include <common.h>
26
27DECLARE_GLOBAL_DATA_PTR;
28
29
30
31
32
33int board_init (void)
34{
35
36
37
38#ifdef CONFIG_INFERNO
39 {
40 unsigned long temp;
41 __asm__ __volatile__(
42 "mrc p15, 0, %0, c1, c0\n"
43 "bic %0, %0, #0x00002000\n"
44 "bic %0, %0, #0x0000000f\n"
45 "orr %0, %0, #0x00001000\n"
46 "orr %0, %0, #0x00000002\n"
47 "mcr p15, 0, %0, c1, c0\n"
48
49 "mov %0, #0\n"
50 "mcr p15, 0, %0, c7, c7, 0\n"
51 "mcr p15, 0, %0, c8, c7, 0\n"
52 : "=r" (temp)
53 :
54 : "memory");
55
56 temp = 0xa0000018;
57 *(unsigned long *)temp = 0x00060006;
58
59 }
60#endif
61
62
63 gd->bd->bi_arch_number = MACH_TYPE_SHANNON;
64
65
66 gd->bd->bi_boot_params = 0xc0000100;
67
68 return 0;
69}
70
71int dram_init (void)
72{
73#if defined(PHYS_SDRAM_1) || defined(PHYS_SDRAM_2) || \
74 defined(PHYS_SDRAM_3) || defined(PHYS_SDRAM_4)
75 bd_t *bd = gd->bd;
76#endif
77
78#ifdef PHYS_SDRAM_1
79 bd->bi_dram[0].start = PHYS_SDRAM_1;
80 bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
81#endif
82
83#ifdef PHYS_SDRAM_2
84 bd->bi_dram[1].start = PHYS_SDRAM_2;
85 bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
86#endif
87
88#ifdef PHYS_SDRAM_3
89 bd->bi_dram[2].start = PHYS_SDRAM_3;
90 bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
91#endif
92
93#ifdef PHYS_SDRAM_4
94 bd->bi_dram[3].start = PHYS_SDRAM_4;
95 bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
96#endif
97
98 return (0);
99}
100