]>
Commit | Line | Data |
---|---|---|
2b62997c CC |
1 | /* |
2 | * CPSW Ethernet Switch Driver | |
3 | * | |
4 | * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or | |
7 | * modify it under the terms of the GNU General Public License as | |
8 | * published by the Free Software Foundation version 2. | |
9 | * | |
10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | |
11 | * kind, whether express or implied; without even the implied warranty | |
12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | */ | |
15 | ||
16 | #ifndef _CPSW_H_ | |
17 | #define _CPSW_H_ | |
18 | ||
19 | struct cpsw_slave_data { | |
20 | u32 slave_reg_ofs; | |
21 | u32 sliver_reg_ofs; | |
9c653aad | 22 | int phy_addr; |
2b62997c CC |
23 | int phy_if; |
24 | }; | |
25 | ||
26 | enum { | |
27 | CPSW_CTRL_VERSION_1 = 0, | |
28 | CPSW_CTRL_VERSION_2 /* am33xx like devices */ | |
29 | }; | |
30 | ||
31 | struct cpsw_platform_data { | |
32 | u32 mdio_base; | |
33 | u32 cpsw_base; | |
34 | int mdio_div; | |
35 | int channels; /* number of cpdma channels (symmetric) */ | |
36 | u32 cpdma_reg_ofs; /* cpdma register offset */ | |
37 | int slaves; /* number of slave cpgmac ports */ | |
38 | u32 ale_reg_ofs; /* address lookup engine reg offset */ | |
39 | int ale_entries; /* ale table size */ | |
40 | u32 host_port_reg_ofs; /* cpdma host port registers */ | |
41 | u32 hw_stats_reg_ofs; /* cpsw hw stats counters */ | |
2bf36ac6 | 42 | u32 bd_ram_ofs; /* Buffer Descriptor RAM offset */ |
2b62997c CC |
43 | u32 mac_control; |
44 | struct cpsw_slave_data *slave_data; | |
45 | void (*control)(int enabled); | |
46 | u32 host_port_num; | |
7a022753 | 47 | u32 active_slave; |
2b62997c CC |
48 | u8 version; |
49 | }; | |
50 | ||
51 | int cpsw_register(struct cpsw_platform_data *data); | |
52 | ||
53 | #endif /* _CPSW_H_ */ |