blob: 6d894efd8a3f73e8849d8b1f9ead920618f4bc38 [file] [log] [blame]
Kevin Hilmanac7b75b2009-05-07 06:19:40 -07001/*
2 * TI DaVinci EMAC platform support
3 *
4 * Author: Kevin Hilman, Deep Root Systems, LLC
5 *
6 * 2007 (c) Deep Root Systems, LLC. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
Sriramakrishnan8ee2bf92009-11-19 15:58:25 +053011#ifndef _LINUX_DAVINCI_EMAC_H
12#define _LINUX_DAVINCI_EMAC_H
Kevin Hilmanac7b75b2009-05-07 06:19:40 -070013
14#include <linux/if_ether.h>
Mark A. Greerb14dc0f2009-04-15 12:41:27 -070015#include <linux/memory.h>
Kevin Hilmanac7b75b2009-05-07 06:19:40 -070016
17struct emac_platform_data {
18 char mac_addr[ETH_ALEN];
19 u32 ctrl_reg_offset;
20 u32 ctrl_mod_reg_offset;
21 u32 ctrl_ram_offset;
22 u32 mdio_reg_offset;
23 u32 ctrl_ram_size;
24 u32 phy_mask;
25 u32 mdio_max_freq;
26 u8 rmii_en;
27 u8 version;
Sriramakrishnan01a9af32009-11-19 15:58:26 +053028 void (*interrupt_enable) (void);
29 void (*interrupt_disable) (void);
Kevin Hilmanac7b75b2009-05-07 06:19:40 -070030};
31
32enum {
33 EMAC_VERSION_1, /* DM644x */
34 EMAC_VERSION_2, /* DM646x */
35};
Mark A. Greerb14dc0f2009-04-15 12:41:27 -070036
37void davinci_get_mac_addr(struct memory_accessor *mem_acc, void *context);
Kevin Hilmanac7b75b2009-05-07 06:19:40 -070038#endif