2 * Copyright (C) 2007-2008 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 * TODO:remove adm5120_eth* variables when the switch driver will be
42 * converted into a real platform driver
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];
48 extern void adm5120_soc_init(void) __init
;
49 extern void adm5120_mem_init(void) __init
;
50 extern void adm5120_ndelay(u32 ns
);
52 extern void (*adm5120_board_reset
)(void);
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
;
59 static inline int adm5120_package_pqfp(void)
61 return (adm5120_package
== ADM5120_PACKAGE_PQFP
);
64 static inline int adm5120_package_bga(void)
66 return (adm5120_package
== ADM5120_PACKAGE_BGA
);
69 static inline int adm5120_has_pci(void)
71 return (adm5120_package
== ADM5120_PACKAGE_BGA
);
74 static inline int adm5120_has_gmii(void)
76 return (adm5120_package
== ADM5120_PACKAGE_BGA
);
79 #endif /* _MACH_ADM5120_INFO_H */
This page took 0.051368 seconds and 5 git commands to generate.