1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#include <common.h>
25#include <command.h>
26#include <asm/au1x00.h>
27#include <asm/mipsregs.h>
28#include <asm/io.h>
29
30phys_size_t initdram(int board_type)
31{
32
33
34 return 64*1024*1024;
35}
36
37#define BCSR_PCMCIA_PC0DRVEN 0x0010
38#define BCSR_PCMCIA_PC0RST 0x0080
39
40
41void write_one_tlb( int index, u32 pagemask, u32 hi, u32 low0, u32 low1 );
42
43int checkboard (void)
44{
45#if defined(CONFIG_IDE_PCMCIA) && 0
46 u16 status;
47#endif
48
49 volatile u32 *sys_counter = (volatile u32*)SYS_COUNTER_CNTRL;
50 u32 proc_id;
51
52 *sys_counter = 0x100;
53
54 proc_id = read_c0_prid();
55
56 switch (proc_id >> 24) {
57 case 0:
58 puts ("Board: Pb1000\n");
59 printf ("CPU: Au1000 396 MHz, id: 0x%02x, rev: 0x%02x\n",
60 (proc_id >> 8) & 0xFF, proc_id & 0xFF);
61 break;
62 case 1:
63 puts ("Board: Pb1500\n");
64 printf ("CPU: Au1500, id: 0x%02x, rev: 0x%02x\n",
65 (proc_id >> 8) & 0xFF, proc_id & 0xFF);
66 break;
67 case 2:
68 puts ("Board: Pb1100\n");
69 printf ("CPU: Au1100, id: 0x%02x, rev: 0x%02x\n",
70 (proc_id >> 8) & 0xFF, proc_id & 0xFF);
71 break;
72 default:
73 printf ("Unsupported cpu %d, proc_id=0x%x\n", proc_id >> 24, proc_id);
74 }
75
76 set_io_port_base(0);
77
78#if defined(CONFIG_IDE_PCMCIA) && 0
79
80
81 status = 4;
82 *pcmcia_bcsr = status;
83
84 status |= BCSR_PCMCIA_PC0DRVEN;
85 *pcmcia_bcsr = status;
86 au_sync();
87
88 udelay(300*1000);
89
90 status |= BCSR_PCMCIA_PC0RST;
91 *pcmcia_bcsr = status;
92 au_sync();
93
94 udelay(100*1000);
95
96
97
98
99#if 0
100
101 write_one_tlb(20,
102 0x01ffe000,
103 CONFIG_SYS_PCMCIA_IO_BASE,
104 0x3C000017,
105 0x3C200017);
106
107 write_one_tlb(21,
108 0x01ffe000,
109 CONFIG_SYS_PCMCIA_ATTR_BASE,
110 0x3D000017,
111 0x3D200017);
112#endif
113 write_one_tlb(22,
114 0x01ffe000,
115 CONFIG_SYS_PCMCIA_MEM_ADDR,
116 0x3E000017,
117 0x3E200017);
118#endif
119
120 return 0;
121}
122