2 * CPSW Ethernet Switch Driver
4 * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
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.
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.
19 struct cpsw_slave_data {
28 CPSW_CTRL_VERSION_1 = 0,
29 CPSW_CTRL_VERSION_2 /* am33xx like devices */
32 struct cpsw_platform_data {
38 int channels; /* number of cpdma channels (symmetric) */
39 u32 cpdma_reg_ofs; /* cpdma register offset */
40 int slaves; /* number of slave cpgmac ports */
41 u32 ale_reg_ofs; /* address lookup engine reg offset */
42 int ale_entries; /* ale table size */
43 u32 host_port_reg_ofs; /* cpdma host port registers */
44 u32 hw_stats_reg_ofs; /* cpsw hw stats counters */
45 u32 bd_ram_ofs; /* Buffer Descriptor RAM offset */
47 struct cpsw_slave_data *slave_data;
48 void (*control)(int enabled);
54 int cpsw_register(struct cpsw_platform_data *data);
55 int ti_cm_get_macid(struct udevice *dev, int slave, u8 *mac_addr);