2009-05-07 21:19:40 +08:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
2009-11-19 18:28:25 +08:00
|
|
|
#ifndef _LINUX_DAVINCI_EMAC_H
|
|
|
|
#define _LINUX_DAVINCI_EMAC_H
|
2009-05-07 21:19:40 +08:00
|
|
|
|
|
|
|
#include <linux/if_ether.h>
|
2016-02-27 03:59:24 +08:00
|
|
|
#include <linux/nvmem-consumer.h>
|
2009-05-07 21:19:40 +08:00
|
|
|
|
2010-09-15 22:11:21 +08:00
|
|
|
struct mdio_platform_data {
|
|
|
|
unsigned long bus_freq;
|
|
|
|
};
|
|
|
|
|
2009-05-07 21:19:40 +08:00
|
|
|
struct emac_platform_data {
|
|
|
|
char mac_addr[ETH_ALEN];
|
|
|
|
u32 ctrl_reg_offset;
|
|
|
|
u32 ctrl_mod_reg_offset;
|
|
|
|
u32 ctrl_ram_offset;
|
2009-11-19 18:28:27 +08:00
|
|
|
u32 hw_ram_addr;
|
2009-05-07 21:19:40 +08:00
|
|
|
u32 ctrl_ram_size;
|
2010-09-15 22:11:24 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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;
|
|
|
|
|
2009-05-07 21:19:40 +08:00
|
|
|
u8 rmii_en;
|
|
|
|
u8 version;
|
2011-03-22 10:31:03 +08:00
|
|
|
bool no_bd_ram;
|
2009-11-19 18:28:26 +08:00
|
|
|
void (*interrupt_enable) (void);
|
|
|
|
void (*interrupt_disable) (void);
|
2009-05-07 21:19:40 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
EMAC_VERSION_1, /* DM644x */
|
|
|
|
EMAC_VERSION_2, /* DM646x */
|
|
|
|
};
|
|
|
|
|
2016-02-27 03:59:24 +08:00
|
|
|
void davinci_get_mac_addr(struct nvmem_device *nvmem, void *context);
|
2009-04-16 03:41:27 +08:00
|
|
|
#endif
|