2 * Copyright (C) 2007-2009 Gabor Juhos <juhosg@openwrt.org>
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.
10 #ifndef _MACH_ADM5120_INFO_H
11 #define _MACH_ADM5120_INFO_H
13 #include <linux/types.h>
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
24 extern unsigned int adm5120_product_code;
25 extern unsigned int adm5120_revision;
26 extern unsigned int adm5120_nand_boot;
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
34 extern unsigned int adm5120_package;
35 #define ADM5120_PACKAGE_PQFP 0
36 #define ADM5120_PACKAGE_BGA 1
38 extern unsigned long adm5120_memsize;
41 MACH_ADM5120_GENERIC = 0, /* Generic board */
42 MACH_ADM5120_5GXI, /* OSBRiDGE 5GXi/5XLi */
43 MACH_ADM5120_BR6104K, /* Edimax BR-6104K */
44 MACH_ADM5120_BR6104KP, /* Edimax BR-6104KP */
45 MACH_ADM5120_BR61X4WG, /* Edimax BR-6104Wg/BR-6114WG */
46 MACH_ADM5120_CAS630, /* Cellvision CAS-630/630W */
47 MACH_ADM5120_CAS670, /* Cellvision CAS-670/670W */
48 MACH_ADM5120_CAS700, /* Cellvision CAS-700/700W */
49 MACH_ADM5120_CAS771, /* Cellvision CAS-771/771W */
50 MACH_ADM5120_CAS790, /* Cellvision CAS-790 */
51 MACH_ADM5120_CAS861, /* Cellvision CAS-861/861W */
52 MACH_ADM5120_EASY5120PATA, /* Infineon EASY 5120P-ATA */
53 MACH_ADM5120_EASY5120RT, /* Infineon EASY 5120-RT */
54 MACH_ADM5120_EASY5120WVOIP, /* Infineon EASY 5120-WVoIP */
55 MACH_ADM5120_EASY83000, /* Infineon EASY-83000 */
56 MACH_ADM5120_ES2108, /* ZyXEL Ethernet Switch 2108 */
57 MACH_ADM5120_ES2108F, /* ZyXEL Ethernet Switch 2108-F */
58 MACH_ADM5120_ES2108G, /* ZyXEL Ethernet Switch 2108-G */
59 MACH_ADM5120_ES2108LC, /* ZyXEL Ethernet Switch 2108-LC */
60 MACH_ADM5120_ES2108PWR, /* ZyXEL Ethernet Switch 2108-PWR */
61 MACH_ADM5120_ES2024A, /* ZyXEL Ethernet Switch 2024A */
62 MACH_ADM5120_ES2024PWR, /* ZyXEL Ethernet Switch 2024PWR */
63 MACH_ADM5120_HS100, /* ZyXEL HomeSafe 100/100W */
64 MACH_ADM5120_NFS101U, /* Cellvision NFS-101U/101WU */
65 MACH_ADM5120_NFS202U, /* Cellvision NFS-202U/202WU */
66 MACH_ADM5120_NP28G, /* Compex NP28G */
67 MACH_ADM5120_NP28GHS, /* Compex NP28G HotSpot */
68 MACH_ADM5120_NP27G, /* Compex NP27G */
69 MACH_ADM5120_RB_11X, /* Mikrotik RouterBOARD 111/112 */
70 MACH_ADM5120_RB_133, /* Mikrotik RouterBOARD 133 */
71 MACH_ADM5120_RB_133C, /* Mikrotik RouterBOARD 133c */
72 MACH_ADM5120_RB_150, /* Mikrotik RouterBOARD 150 */
73 MACH_ADM5120_RB_153, /* Mikrotik RouterBOARD 153 */
74 MACH_ADM5120_RB_192, /* Mikrotik RouterBOARD 192 */
75 MACH_ADM5120_P334U, /* ZyXEL Prestige 334U */
76 MACH_ADM5120_P334W, /* ZyXEL Prestige 334W */
77 MACH_ADM5120_P334WH, /* ZyXEL Prestige 334WH */
78 MACH_ADM5120_P334WHD, /* ZyXEL Prestige 334WHD */
79 MACH_ADM5120_P334WT, /* ZyXEL Prestige 334WT */
80 MACH_ADM5120_P335, /* ZyXEL Prestige 335/335WT */
81 MACH_ADM5120_P335PLUS, /* ZyXEL Prestige 335Plus */
82 MACH_ADM5120_P335U, /* ZyXEL Prestige 335U */
83 MACH_ADM5120_PMUGW, /* Motorola Powerline MU Gateway */
84 MACH_ADM5120_WP54, /* Compex WP54G/WP54AG/WPP54G/WPP54AG */
85 MACH_ADM5120_WP54G_WRT, /* Compex WP54G-WRT */
86 MACH_ADM5120_WP54Gv1C, /* Compex WP54G version 1C */
87 MACH_ADM5120_EB_214A, /* Generic EB-214A */
91 * TODO:remove adm5120_eth* variables when the switch driver will be
92 * converted into a real platform driver
94 extern unsigned int adm5120_eth_num_ports;
95 extern unsigned char adm5120_eth_macs[6][6];
96 extern unsigned char adm5120_eth_vlans[6];
98 extern void adm5120_soc_init(void) __init;
99 extern void adm5120_mem_init(void) __init;
100 extern void adm5120_ndelay(u32 ns);
102 extern void (*adm5120_board_reset)(void);
104 extern void adm5120_gpio_init(void) __init;
105 extern void adm5120_gpio_csx0_enable(void) __init;
106 extern void adm5120_gpio_csx1_enable(void) __init;
107 extern void adm5120_gpio_ew_enable(void) __init;
109 static inline int adm5120_package_pqfp(void)
111 return (adm5120_package == ADM5120_PACKAGE_PQFP);
114 static inline int adm5120_package_bga(void)
116 return (adm5120_package == ADM5120_PACKAGE_BGA);
119 static inline int adm5120_has_pci(void)
121 return (adm5120_package == ADM5120_PACKAGE_BGA);
124 static inline int adm5120_has_gmii(void)
126 return (adm5120_package == ADM5120_PACKAGE_BGA);
129 #endif /* _MACH_ADM5120_INFO_H */