OSDN Git Service

stmmac: move stmmac_clk, pclk, clk_ptp_ref and stmmac_rst to platform structure
authorjpinto <Joao.Pinto@synopsys.com>
Mon, 9 Jan 2017 12:35:09 +0000 (12:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Jan 2017 19:54:29 +0000 (14:54 -0500)
commitf573c0b9c4e02691cf87736bd0824fd37ec02e65
treea8fc2c2ca67c0fa7e2c26fd9018535fabe935a2f
parentb4b7b772e8b018286482d8d1fba7804ceac56a64
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>
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
include/linux/stmmac.h