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 modify it
8 * under the terms of the GNU General Public License version 2 as published
9 * by the Free Software Foundation.
13 #ifndef _ADM5120_INFO_H
14 #define _ADM5120_INFO_H
16 #include <linux/types.h>
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
27 extern unsigned int adm5120_product_code
;
28 extern unsigned int adm5120_revision
;
29 extern unsigned int adm5120_nand_boot
;
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
37 extern unsigned int adm5120_package
;
38 #define ADM5120_PACKAGE_PQFP 0
39 #define ADM5120_PACKAGE_BGA 1
41 extern unsigned long adm5120_memsize
;
44 * TODO:remove adm5120_eth* variables when the switch driver will be
45 * converted into a real platform driver
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];
51 extern void adm5120_soc_init(void) __init
;
52 extern void adm5120_mem_init(void) __init
;
53 extern void adm5120_ndelay(u32 ns
);
55 extern void adm5120_restart(char *command
);
56 extern void adm5120_halt(void);
58 extern void (*adm5120_board_reset
)(void);
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
;
65 static inline int adm5120_package_pqfp(void)
67 return (adm5120_package
== ADM5120_PACKAGE_PQFP
);
70 static inline int adm5120_package_bga(void)
72 return (adm5120_package
== ADM5120_PACKAGE_BGA
);
75 static inline int adm5120_has_pci(void)
77 return (adm5120_package
== ADM5120_PACKAGE_BGA
);
80 static inline int adm5120_has_gmii(void)
82 return (adm5120_package
== ADM5120_PACKAGE_BGA
);
85 #endif /* _ADM5120_INFO_H */
This page took 0.057451 seconds and 5 git commands to generate.