diff options
author | jpinto <Joao.Pinto@synopsys.com> | 2017-01-09 12:35:09 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-09 14:54:29 -0500 |
commit | f573c0b9c4e02691cf87736bd0824fd37ec02e65 (patch) | |
tree | a8fc2c2ca67c0fa7e2c26fd9018535fabe935a2f /include/linux/stmmac.h | |
parent | b4b7b772e8b018286482d8d1fba7804ceac56a64 (diff) | |
download | blackbird-obmc-linux-f573c0b9c4e02691cf87736bd0824fd37ec02e65.tar.gz blackbird-obmc-linux-f573c0b9c4e02691cf87736bd0824fd37ec02e65.zip |
stmmac: move stmmac_clk, pclk, clk_ptp_ref and stmmac_rst to platform structure
This patch moves stmmac_clk, pclk, clk_ptp_ref and stmmac_rst to the
plat_stmmacenet_data structure. It also moves these platform variables
initialization to stmmac_platform. This was done for two reasons:
a) If PCI is used, platform related code is being executed in stmmac_main
resulting in warnings that have no sense and conceptually was not right
b) stmmac as a synopsys reference ethernet driver stack will be hosting
more and more drivers to its structure like synopsys/dwc_eth_qos.c.
These drivers have their own DT bindings that are not compatible with
stmmac's. One of the most important are the clock names, and so they need
to be parsed in the glue logic and initialized there, and that is the main
reason why the clocks were passed to the platform structure.
Signed-off-by: Joao Pinto <jpinto@synopsys.com>
Tested-by: Niklas Cassel <niklas.cassel@axis.com>
Reviewed-by: Lars Persson <larper@axis.com>
Acked-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/stmmac.h')
-rw-r--r-- | include/linux/stmmac.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index e3cd7588623d..d76033d6726d 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -138,6 +138,11 @@ struct plat_stmmacenet_data { int (*init)(struct platform_device *pdev, void *priv); void (*exit)(struct platform_device *pdev, void *priv); void *bsp_priv; + struct clk *stmmac_clk; + struct clk *pclk; + struct clk *clk_ptp_ref; + unsigned int clk_ptp_rate; + struct reset_control *stmmac_rst; struct stmmac_axi *axi; int has_gmac4; bool tso_en; |