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