blob: a9b4d6cb96e9b504e280785285b6d8908ef6a687 [file] [log] [blame]
Giuseppe CAVALLARO3c9732c2010-01-06 23:07:13 +00001/*******************************************************************************
2
3 Header file for stmmac platform data
4
5 Copyright (C) 2009 STMicroelectronics Ltd
6
7 This program is free software; you can redistribute it and/or modify it
8 under the terms and conditions of the GNU General Public License,
9 version 2, as published by the Free Software Foundation.
10
11 This program is distributed in the hope it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 more details.
15
16 You should have received a copy of the GNU General Public License along with
17 this program; if not, write to the Free Software Foundation, Inc.,
18 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
19
20 The full GNU General Public License is included in this distribution in
21 the file called "COPYING".
22
23 Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
24*******************************************************************************/
25
26#ifndef __STMMAC_PLATFORM_DATA
27#define __STMMAC_PLATFORM_DATA
28
Viresh KUMAR57a503c2011-05-02 18:36:45 +000029#include <linux/platform_device.h>
30
Deepak SIKRI55f9a4d2012-04-04 04:33:20 +000031#define STMMAC_RX_COE_NONE 0
32#define STMMAC_RX_COE_TYPE1 1
33#define STMMAC_RX_COE_TYPE2 2
34
Giuseppe CAVALLARO36bcfe72011-07-20 00:05:23 +000035/* Platfrom data for platform device structure's platform_data field */
Giuseppe CAVALLARO3c9732c2010-01-06 23:07:13 +000036
Giuseppe CAVALLARO36bcfe72011-07-20 00:05:23 +000037struct stmmac_mdio_bus_data {
38 int bus_id;
39 int (*phy_reset)(void *priv);
40 unsigned int phy_mask;
41 int *irqs;
42 int probed_phy_irq;
43};
44
Giuseppe CAVALLARO3c9732c2010-01-06 23:07:13 +000045struct plat_stmmacenet_data {
Srinivas Kandagatlaf142af22012-04-04 04:33:19 +000046 char *phy_bus_name;
Giuseppe CAVALLARO3c9732c2010-01-06 23:07:13 +000047 int bus_id;
Giuseppe CAVALLARO36bcfe72011-07-20 00:05:23 +000048 int phy_addr;
49 int interface;
50 struct stmmac_mdio_bus_data *mdio_bus_data;
Giuseppe CAVALLARO3c9732c2010-01-06 23:07:13 +000051 int pbl;
Giuseppe CAVALLAROdfb8fb92010-09-17 03:23:39 +000052 int clk_csr;
Giuseppe CAVALLARO3c9732c2010-01-06 23:07:13 +000053 int has_gmac;
Giuseppe CAVALLAROe326e852010-04-13 20:21:14 +000054 int enh_desc;
Giuseppe CAVALLAROebbb2932010-09-17 03:23:40 +000055 int tx_coe;
Deepak SIKRI55f9a4d2012-04-04 04:33:20 +000056 int rx_coe;
Giuseppe CAVALLAROebbb2932010-09-17 03:23:40 +000057 int bugged_jumbo;
Giuseppe Cavallaro543876c2010-09-24 21:27:41 -070058 int pmt;
Srinivas Kandagatla61b80132011-07-17 20:54:09 +000059 int force_sf_dma_mode;
Giuseppe CAVALLARO3c9732c2010-01-06 23:07:13 +000060 void (*fix_mac_speed)(void *priv, unsigned int speed);
Giuseppe CAVALLAROad01b7d2010-08-23 20:40:42 +000061 void (*bus_setup)(void __iomem *ioaddr);
Giuseppe CAVALLARO293bb1c2010-11-24 02:38:05 +000062 int (*init)(struct platform_device *pdev);
63 void (*exit)(struct platform_device *pdev);
64 void *custom_cfg;
Giuseppe CAVALLARO3c9732c2010-01-06 23:07:13 +000065 void *bsp_priv;
66};
Giuseppe CAVALLARO3c9732c2010-01-06 23:07:13 +000067#endif