3e0acba329b6f0e8b3028bed5e76954255c5d1b3
[openwrt.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; /* Number of Ethernet interfaces */
27 unsigned int has_usb; /* USB controller presence flag */
28 u32 window_addr; /* Flash address */
29 u32 window_size; /* Flash size */
30 };
31
32 #define CPU_SPEED_175 175000000
33 #define CPU_SPEED_200 200000000
34 #define CPU_SPEED_225 225000000
35 #define CPU_SPEED_250 250000000
36
37 #define CPU_PACKAGE_PQFP 0
38 #define CPU_PACKAGE_BGA 1
39
40 #define BOOT_LOADER_UNKNOWN 0
41 #define BOOT_LOADER_CFE 1
42 #define BOOT_LOADER_UBOOT 2
43 #define BOOT_LOADER_MYLOADER 3
44 #define BOOT_LOADER_ROUTERBOOT 4
45 #define BOOT_LOADER_LAST 4
46
47 #define BOARD_TYPE_UNKNOWN 0
48 #define BOARD_TYPE_WP54G_WRT 1
49 #define BOARD_TYPE_WP54G 2
50 #define BOARD_TYPE_WP54AG 3
51 #define BOARD_TYPE_WPP54G 4
52 #define BOARD_TYPE_WPP54AG 5
53 #define BOARD_TYPE_NP28G 6
54 #define BOARD_TYPE_NP28GHS 7
55 #define BOARD_TYPE_NP27G 8
56 #define BOARD_TYPE_WP54Gv1C 9
57 #define BOARD_TYPE_RB_111 10
58 #define BOARD_TYPE_RB_112 11
59 #define BOARD_TYPE_RB_133 12
60 #define BOARD_TYPE_RB_133C 13
61 #define BOARD_TYPE_RB_150 14
62 #define BOARD_TYPE_RB_153 15
63 #define BOART_TYPE_LAST 15
64
65 extern struct adm5120_info adm5120_info;
66 extern void adm5120_info_init(void);
67
68 static inline int adm5120_has_pci(void)
69 {
70 return (adm5120_info.cpu_package == CPU_PACKAGE_BGA);
71 }
72
73 #endif /* _ADM5120_INFO_H */
This page took 0.039842 seconds and 3 git commands to generate.