davinci_emac.h 1.1 KB
Newer Older
K
Kevin Hilman 已提交
1 2 3 4 5 6 7 8 9 10
/*
 * TI DaVinci EMAC platform support
 *
 * Author: Kevin Hilman, Deep Root Systems, LLC
 *
 * 2007 (c) Deep Root Systems, LLC. This file is licensed under
 * the terms of the GNU General Public License version 2. This program
 * is licensed "as is" without any warranty of any kind, whether express
 * or implied.
 */
11 12
#ifndef _LINUX_DAVINCI_EMAC_H
#define _LINUX_DAVINCI_EMAC_H
K
Kevin Hilman 已提交
13 14

#include <linux/if_ether.h>
15
#include <linux/memory.h>
K
Kevin Hilman 已提交
16

17 18 19 20
struct mdio_platform_data {
	unsigned long		bus_freq;
};

K
Kevin Hilman 已提交
21 22 23 24 25
struct emac_platform_data {
	char mac_addr[ETH_ALEN];
	u32 ctrl_reg_offset;
	u32 ctrl_mod_reg_offset;
	u32 ctrl_ram_offset;
26
	u32 hw_ram_addr;
K
Kevin Hilman 已提交
27
	u32 ctrl_ram_size;
28 29 30 31 32 33 34 35 36

	/*
	 * phy_id can be one of the following:
	 *   - NULL		: use the first phy on the bus,
	 *   - ""		: force to 100/full, no mdio control
	 *   - "<bus>:<addr>"	: use the specified bus and phy
	 */
	const char *phy_id;

K
Kevin Hilman 已提交
37 38
	u8 rmii_en;
	u8 version;
39
	bool no_bd_ram;
40 41
	void (*interrupt_enable) (void);
	void (*interrupt_disable) (void);
K
Kevin Hilman 已提交
42 43 44 45 46 47 48
};

enum {
	EMAC_VERSION_1,	/* DM644x */
	EMAC_VERSION_2,	/* DM646x */
};

49 50
void davinci_get_mac_addr(struct memory_accessor *mem_acc, void *context);
#endif