diff options
author | Chen-Yu Tsai <wens@csie.org> | 2014-01-17 17:24:46 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-20 08:02:03 +0400 |
commit | 022066f50f53000679d31eb407693085f37b3f14 (patch) | |
tree | 5c3e56178997ada2cb54aa68729881f748e50336 /include | |
parent | 436f7ecdcc08f71ddc106b7bbe3bcbf1785f3bff (diff) | |
download | linux-022066f50f53000679d31eb407693085f37b3f14.tar.xz |
net: stmmac: Use driver data and callbacks tied with compatible strings
The stmmac driver core allows passing feature flags and callbacks via
platform data. Add a similar stmmac_of_data to pass flags and callbacks
tied to compatible strings. This allows us to extend stmmac with glue
layers for different SoCs.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/stmmac.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 0a5a7aca562e..1367974b7e84 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -121,4 +121,22 @@ struct plat_stmmacenet_data { void *custom_data; void *bsp_priv; }; + +/* of_data for SoC glue layer device tree bindings */ + +struct stmmac_of_data { + int has_gmac; + int enh_desc; + int tx_coe; + int rx_coe; + int bugged_jumbo; + int pmt; + int riwt_off; + void (*fix_mac_speed)(void *priv, unsigned int speed); + void (*bus_setup)(void __iomem *ioaddr); + void *(*setup)(struct platform_device *pdev); + void (*free)(struct platform_device *pdev, void *priv); + int (*init)(struct platform_device *pdev, void *priv); + void (*exit)(struct platform_device *pdev, void *priv); +}; #endif |