Add the infrastructure to detect RouterBOOT and use USB
[openwrt/svn-archive/archive.git] / target / linux / adm5120-2.6 / files / include / asm-mips / mach-adm5120 / adm5120_info.h
1 /*
2 * $Id$
3 *
4 * Copyright (C) 2007 OpenWrt.org
5 * Copyright (C) Gabor Juhos <juhosg@freemail.hu>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13 #ifndef _ADM5120_INFO_H
14 #define _ADM5120_INFO_H
15
16 #include <linux/types.h>
17
18 struct adm5120_info {
19 unsigned int product_code;
20 unsigned int revision;
21 unsigned int cpu_package;
22 unsigned int nand_boot;
23 unsigned long cpu_speed;
24 unsigned int boot_loader;
25 unsigned int board_type;
26 unsigned int iface_num;
27 unsigned int has_usb;
28 };
29
30 #define CPU_SPEED_175 175000000
31 #define CPU_SPEED_200 200000000
32 #define CPU_SPEED_225 225000000
33 #define CPU_SPEED_250 250000000
34
35 #define CPU_PACKAGE_PQFP 0
36 #define CPU_PACKAGE_BGA 1
37
38 #define BOOT_LOADER_UNKNOWN 0
39 #define BOOT_LOADER_CFE 1
40 #define BOOT_LOADER_UBOOT 2
41 #define BOOT_LOADER_MYLOADER 3
42 #define BOOT_LOADER_ROUTERBOOT 4
43 #define BOOT_LOADER_LAST 4
44
45 #define BOARD_TYPE_UNKNOWN 0
46 #define BOARD_TYPE_WP54G_WRT 1
47 #define BOARD_TYPE_WP54G 2
48 #define BOARD_TYPE_WP54AG 3
49 #define BOARD_TYPE_WPP54G 4
50 #define BOARD_TYPE_WPP54AG 5
51 #define BOARD_TYPE_NP28G 6
52 #define BOARD_TYPE_NP28GHS 7
53 #define BOARD_TYPE_NP27G 8
54 #define BOARD_TYPE_WP54Gv1C 9
55 #define BOARD_TYPE_RB_111 10
56 #define BOARD_TYPE_RB_112 11
57 #define BOARD_TYPE_RB_133 12
58 #define BOARD_TYPE_RB_133C 13
59 #define BOARD_TYPE_RB_150 14
60 #define BOARD_TYPE_RB_153 15
61 #define BOART_TYPE_LAST 15
62
63 extern struct adm5120_info adm5120_info;
64 extern void adm5120_info_init(void);
65
66 static inline int adm5120_has_pci(void)
67 {
68 return (adm5120_info.cpu_package == CPU_PACKAGE_BGA);
69 }
70
71 #endif /* _ADM5120_INFO_H */