6d2c5c248b38ccdefc078c1243b020dfa78fb035
[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 };
27
28 #define CPU_SPEED_175 175000000
29 #define CPU_SPEED_200 200000000
30 #define CPU_SPEED_225 225000000
31 #define CPU_SPEED_250 250000000
32
33 #define CPU_PACKAGE_PQFP 0
34 #define CPU_PACKAGE_BGA 1
35
36 #define BOOT_LOADER_UNKNOWN 0
37 #define BOOT_LOADER_CFE 1
38 #define BOOT_LOADER_UBOOT 2
39 #define BOOT_LOADER_MYLOADER 3
40 #define BOOT_LOADER_LAST 3
41
42 #define BOARD_TYPE_UNKNOWN 0
43 #define BOARD_TYPE_WP54G_WRT 1
44 #define BOARD_TYPE_WP54G 2
45 #define BOARD_TYPE_WP54AG 3
46 #define BOARD_TYPE_WPP54G 4
47 #define BOARD_TYPE_WPP54AG 5
48 #define BOARD_TYPE_NP28G 6
49 #define BOARD_TYPE_NP28GHS 7
50 #define BOARD_TYPE_NP27G 8
51 #define BOARD_TYPE_WP54Gv1C 9
52 #define BOARD_TYPE_RB_1xx 10
53
54 extern struct adm5120_info adm5120_info;
55 extern void adm5120_info_init(void);
56
57 static inline int adm5120_has_pci(void)
58 {
59 return (adm5120_info.cpu_package == CPU_PACKAGE_BGA);
60 }
61
62 #endif /* _ADM5120_INFO_H */