lua: Fixed some cross-platform issues for PPC (and probably other architectures)
[openwrt.git] / target / linux / adm5120 / files / include / asm-mips / mach-adm5120 / adm5120_info.h
1 /*
2 * $Id$
3 *
4 * Copyright (C) 2007 OpenWrt.org
5 * Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
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 version 2 as published
9 * by the Free Software Foundation.
10 *
11 */
12
13 #ifndef _ADM5120_INFO_H
14 #define _ADM5120_INFO_H
15
16 #include <linux/types.h>
17
18 extern unsigned int adm5120_prom_type;
19 #define ADM5120_PROM_GENERIC 0
20 #define ADM5120_PROM_CFE 1
21 #define ADM5120_PROM_MYLOADER 2
22 #define ADM5120_PROM_ROUTERBOOT 3
23 #define ADM5120_PROM_BOOTBASE 4
24 #define ADM5120_PROM_UBOOT 5
25 #define ADM5120_PROM_LAST 5
26
27 extern unsigned int adm5120_product_code;
28 extern unsigned int adm5120_revision;
29 extern unsigned int adm5120_nand_boot;
30
31 extern unsigned long adm5120_speed;
32 #define ADM5120_SPEED_175 175000000
33 #define ADM5120_SPEED_200 200000000
34 #define ADM5120_SPEED_225 225000000
35 #define ADM5120_SPEED_250 250000000
36
37 extern unsigned int adm5120_package;
38 #define ADM5120_PACKAGE_PQFP 0
39 #define ADM5120_PACKAGE_BGA 1
40
41 extern unsigned long adm5120_memsize;
42
43 /*
44 * TODO:remove adm5120_eth* variables when the switch driver will be
45 * converted into a real platform driver
46 */
47 extern unsigned int adm5120_eth_num_ports;
48 extern unsigned char adm5120_eth_macs[6][6];
49 extern unsigned char adm5120_eth_vlans[6];
50
51 extern void adm5120_soc_init(void) __init;
52 extern void adm5120_mem_init(void) __init;
53 extern void adm5120_ndelay(u32 ns);
54
55 extern void adm5120_restart(char *command);
56 extern void adm5120_halt(void);
57
58 extern void (*adm5120_board_reset)(void);
59
60 extern void adm5120_gpio_init(void) __init;
61 extern void adm5120_gpio_csx0_enable(void) __init;
62 extern void adm5120_gpio_csx1_enable(void) __init;
63 extern void adm5120_gpio_ew_enable(void) __init;
64
65 static inline int adm5120_package_pqfp(void)
66 {
67 return (adm5120_package == ADM5120_PACKAGE_PQFP);
68 }
69
70 static inline int adm5120_package_bga(void)
71 {
72 return (adm5120_package == ADM5120_PACKAGE_BGA);
73 }
74
75 static inline int adm5120_has_pci(void)
76 {
77 return (adm5120_package == ADM5120_PACKAGE_BGA);
78 }
79
80 static inline int adm5120_has_gmii(void)
81 {
82 return (adm5120_package == ADM5120_PACKAGE_BGA);
83 }
84
85 #endif /* _ADM5120_INFO_H */
This page took 0.057451 seconds and 5 git commands to generate.