4 * Copyright (C) 2007 OpenWrt.org
5 * Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
23 #ifndef _ADM5120_INFO_H
24 #define _ADM5120_INFO_H
26 #include <linux/types.h>
28 extern unsigned int adm5120_prom_type
;
29 #define ADM5120_PROM_GENERIC 0
30 #define ADM5120_PROM_CFE 1
31 #define ADM5120_PROM_MYLOADER 2
32 #define ADM5120_PROM_ROUTERBOOT 3
33 #define ADM5120_PROM_BOOTBASE 4
34 #define ADM5120_PROM_UBOOT 5
35 #define ADM5120_PROM_LAST 5
37 extern unsigned int adm5120_product_code
;
38 extern unsigned int adm5120_revision
;
39 extern unsigned int adm5120_nand_boot
;
41 extern unsigned long adm5120_speed
;
42 #define ADM5120_SPEED_175 175000000
43 #define ADM5120_SPEED_200 200000000
44 #define ADM5120_SPEED_225 225000000
45 #define ADM5120_SPEED_250 250000000
47 extern unsigned int adm5120_package
;
48 #define ADM5120_PACKAGE_PQFP 0
49 #define ADM5120_PACKAGE_BGA 1
51 extern unsigned long adm5120_memsize
;
54 * TODO:remove adm5120_eth* variables when the switch driver will be
55 * converted into a real platform driver
57 extern unsigned int adm5120_eth_num_ports
;
58 extern unsigned char adm5120_eth_macs
[6][6];
59 extern unsigned char adm5120_eth_vlans
[6];
61 extern void adm5120_soc_init(void) __init
;
62 extern void adm5120_mem_init(void) __init
;
63 extern void adm5120_time_init(void) __init
;
64 extern void adm5120_ndelay(u32 ns
);
66 extern void adm5120_restart(char *command
);
67 extern void adm5120_halt(void);
69 extern void (*adm5120_board_reset
)(void);
71 extern void adm5120_gpio_init(void) __init
;
72 extern void adm5120_gpio_csx0_enable(void) __init
;
73 extern void adm5120_gpio_csx1_enable(void) __init
;
74 extern void adm5120_gpio_ew_enable(void) __init
;
76 static inline int adm5120_package_pqfp(void)
78 return (adm5120_package
== ADM5120_PACKAGE_PQFP
);
81 static inline int adm5120_package_bga(void)
83 return (adm5120_package
== ADM5120_PACKAGE_BGA
);
86 static inline int adm5120_has_pci(void)
88 return (adm5120_package
== ADM5120_PACKAGE_BGA
);
91 static inline int adm5120_has_gmii(void)
93 return (adm5120_package
== ADM5120_PACKAGE_BGA
);
96 #endif /* _ADM5120_INFO_H */
This page took 0.056827 seconds and 5 git commands to generate.