Blame view

include/linux/davinci_emac.h 1.12 KB
ac7b75b5b   Kevin Hilman   davinci: EMAC pla...
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.
   */
8ee2bf9ab   Sriramakrishnan   TI Davinci EMAC :...
11
12
  #ifndef _LINUX_DAVINCI_EMAC_H
  #define _LINUX_DAVINCI_EMAC_H
ac7b75b5b   Kevin Hilman   davinci: EMAC pla...
13
14
  
  #include <linux/if_ether.h>
bec3c11ba   Andrew Lunn   misc: at24: repla...
15
  #include <linux/nvmem-consumer.h>
ac7b75b5b   Kevin Hilman   davinci: EMAC pla...
16

f20136eb0   Cyril Chemparathy   net: davinci_emac...
17
18
19
  struct mdio_platform_data {
  	unsigned long		bus_freq;
  };
ac7b75b5b   Kevin Hilman   davinci: EMAC pla...
20
21
22
23
24
  struct emac_platform_data {
  	char mac_addr[ETH_ALEN];
  	u32 ctrl_reg_offset;
  	u32 ctrl_mod_reg_offset;
  	u32 ctrl_ram_offset;
ad021ae88   Sriramakrishnan   TI Davinci EMAC :...
25
  	u32 hw_ram_addr;
ac7b75b5b   Kevin Hilman   davinci: EMAC pla...
26
  	u32 ctrl_ram_size;
5d69e0076   Cyril Chemparathy   net: davinci_emac...
27
28
29
30
31
32
33
34
  
  	/*
  	 * 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;
ac7b75b5b   Kevin Hilman   davinci: EMAC pla...
35
36
  	u8 rmii_en;
  	u8 version;
6a1fef6d0   Sriram   net: davinci_emac...
37
  	bool no_bd_ram;
01a9af36c   Sriramakrishnan   TI Davinci EMAC :...
38
39
  	void (*interrupt_enable) (void);
  	void (*interrupt_disable) (void);
ac7b75b5b   Kevin Hilman   davinci: EMAC pla...
40
41
42
43
44
45
  };
  
  enum {
  	EMAC_VERSION_1,	/* DM644x */
  	EMAC_VERSION_2,	/* DM646x */
  };
ac7b75b5b   Kevin Hilman   davinci: EMAC pla...
46

bec3c11ba   Andrew Lunn   misc: at24: repla...
47
  void davinci_get_mac_addr(struct nvmem_device *nvmem, void *context);
b14dc0f99   Mark A. Greer   davinci: Factor o...
48
  #endif