Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * TI DaVinci EMAC platform support
0003  *
0004  * Author: Kevin Hilman, Deep Root Systems, LLC
0005  *
0006  * 2007 (c) Deep Root Systems, LLC. This file is licensed under
0007  * the terms of the GNU General Public License version 2. This program
0008  * is licensed "as is" without any warranty of any kind, whether express
0009  * or implied.
0010  */
0011 #ifndef _LINUX_DAVINCI_EMAC_H
0012 #define _LINUX_DAVINCI_EMAC_H
0013 
0014 #include <linux/if_ether.h>
0015 #include <linux/nvmem-consumer.h>
0016 
0017 struct mdio_platform_data {
0018     unsigned long       bus_freq;
0019 };
0020 
0021 struct emac_platform_data {
0022     char mac_addr[ETH_ALEN];
0023     u32 ctrl_reg_offset;
0024     u32 ctrl_mod_reg_offset;
0025     u32 ctrl_ram_offset;
0026     u32 hw_ram_addr;
0027     u32 ctrl_ram_size;
0028 
0029     /*
0030      * phy_id can be one of the following:
0031      *   - NULL     : use the first phy on the bus,
0032      *   - ""       : force to 100/full, no mdio control
0033      *   - "<bus>:<addr>"   : use the specified bus and phy
0034      */
0035     const char *phy_id;
0036 
0037     u8 rmii_en;
0038     u8 version;
0039     bool no_bd_ram;
0040     void (*interrupt_enable) (void);
0041     void (*interrupt_disable) (void);
0042 };
0043 
0044 enum {
0045     EMAC_VERSION_1, /* DM644x */
0046     EMAC_VERSION_2, /* DM646x */
0047 };
0048 
0049 #endif