[adm5120] load board's mac address on Compex devices
[openwrt.git] / target / linux / adm5120 / files-2.6.26 / include / asm-mips / mach-adm5120 / adm5120_info.h
1 /*
2 * Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 as published
6 * by the Free Software Foundation.
7 *
8 */
9
10 #ifndef _MACH_ADM5120_INFO_H
11 #define _MACH_ADM5120_INFO_H
12
13 #include <linux/types.h>
14
15 extern unsigned int adm5120_prom_type;
16 #define ADM5120_PROM_GENERIC 0
17 #define ADM5120_PROM_CFE 1
18 #define ADM5120_PROM_MYLOADER 2
19 #define ADM5120_PROM_ROUTERBOOT 3
20 #define ADM5120_PROM_BOOTBASE 4
21 #define ADM5120_PROM_UBOOT 5
22 #define ADM5120_PROM_LAST 5
23
24 extern unsigned int adm5120_product_code;
25 extern unsigned int adm5120_revision;
26 extern unsigned int adm5120_nand_boot;
27
28 extern unsigned long adm5120_speed;
29 #define ADM5120_SPEED_175 175000000
30 #define ADM5120_SPEED_200 200000000
31 #define ADM5120_SPEED_225 225000000
32 #define ADM5120_SPEED_250 250000000
33
34 extern unsigned int adm5120_package;
35 #define ADM5120_PACKAGE_PQFP 0
36 #define ADM5120_PACKAGE_BGA 1
37
38 extern unsigned long adm5120_memsize;
39
40 /*
41 * TODO:remove adm5120_eth* variables when the switch driver will be
42 * converted into a real platform driver
43 */
44 extern unsigned int adm5120_eth_num_ports;
45 extern unsigned char adm5120_eth_macs[6][6];
46 extern unsigned char adm5120_eth_vlans[6];
47
48 extern void adm5120_soc_init(void) __init;
49 extern void adm5120_mem_init(void) __init;
50 extern void adm5120_ndelay(u32 ns);
51
52 extern void (*adm5120_board_reset)(void);
53
54 extern void adm5120_gpio_init(void) __init;
55 extern void adm5120_gpio_csx0_enable(void) __init;
56 extern void adm5120_gpio_csx1_enable(void) __init;
57 extern void adm5120_gpio_ew_enable(void) __init;
58
59 static inline int adm5120_package_pqfp(void)
60 {
61 return (adm5120_package == ADM5120_PACKAGE_PQFP);
62 }
63
64 static inline int adm5120_package_bga(void)
65 {
66 return (adm5120_package == ADM5120_PACKAGE_BGA);
67 }
68
69 static inline int adm5120_has_pci(void)
70 {
71 return (adm5120_package == ADM5120_PACKAGE_BGA);
72 }
73
74 static inline int adm5120_has_gmii(void)
75 {
76 return (adm5120_package == ADM5120_PACKAGE_BGA);
77 }
78
79 #endif /* _MACH_ADM5120_INFO_H */
This page took 0.051368 seconds and 5 git commands to generate.