2 * DB1200/PB1200 / DB1550 / DB1300 board support.
4 * These 4 boards can reliably be supported in a single kernel image.
7 #include <asm/mach-au1x00/au1000.h>
8 #include <asm/mach-db1x00/bcsr.h>
10 int __init
db1200_board_setup(void);
11 int __init
db1200_dev_setup(void);
12 int __init
db1300_board_setup(void);
13 int __init
db1300_dev_setup(void);
14 int __init
db1550_board_setup(void);
15 int __init
db1550_dev_setup(void);
16 int __init
db1550_pci_setup(int);
18 static const char *board_type_str(void)
20 switch (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI
))) {
21 case BCSR_WHOAMI_PB1200_DDR1
:
22 case BCSR_WHOAMI_PB1200_DDR2
:
24 case BCSR_WHOAMI_DB1200
:
26 case BCSR_WHOAMI_DB1300
:
28 case BCSR_WHOAMI_DB1550
:
30 case BCSR_WHOAMI_PB1550_SDR
:
31 case BCSR_WHOAMI_PB1550_DDR
:
38 const char *get_system_type(void)
40 return board_type_str();
43 void __init
board_setup(void)
47 switch (alchemy_get_cputype()) {
48 case ALCHEMY_CPU_AU1550
:
49 ret
= db1550_board_setup();
51 case ALCHEMY_CPU_AU1200
:
52 ret
= db1200_board_setup();
54 case ALCHEMY_CPU_AU1300
:
55 ret
= db1300_board_setup();
58 pr_err("unsupported CPU on board\n");
62 panic("cannot initialize board support\n");
65 int __init
db1235_arch_init(void)
67 int id
= BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI
));
68 if (id
== BCSR_WHOAMI_DB1550
)
69 return db1550_pci_setup(0);
70 else if ((id
== BCSR_WHOAMI_PB1550_SDR
) ||
71 (id
== BCSR_WHOAMI_PB1550_DDR
))
72 return db1550_pci_setup(1);
76 arch_initcall(db1235_arch_init
);
78 int __init
db1235_dev_init(void)
80 switch (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI
))) {
81 case BCSR_WHOAMI_PB1200_DDR1
:
82 case BCSR_WHOAMI_PB1200_DDR2
:
83 case BCSR_WHOAMI_DB1200
:
84 return db1200_dev_setup();
85 case BCSR_WHOAMI_DB1300
:
86 return db1300_dev_setup();
87 case BCSR_WHOAMI_DB1550
:
88 case BCSR_WHOAMI_PB1550_SDR
:
89 case BCSR_WHOAMI_PB1550_DDR
:
90 return db1550_dev_setup();
94 device_initcall(db1235_dev_init
);