mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
fs_enet: cleanup clock API use
make the Freescale ethernet driver get, prepare and enable the FEC clock during probe(); disable and unprepare the clock upon remove(), put is done by the devm approach; hold a reference to the clock over the period of use. clock lookup is non-fatal as not all platforms provide clock specs in their device tree; failure to enable specified clocks is fatal. Signed-off-by: Gerhard Sittig <gsi@denx.de> Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
35b9eb0eee
commit
2771399ac9
2 changed files with 23 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
|||
#ifndef FS_ENET_PD_H
|
||||
#define FS_ENET_PD_H
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/of_mdio.h>
|
||||
#include <linux/if_ether.h>
|
||||
|
@ -143,6 +144,8 @@ struct fs_platform_info {
|
|||
|
||||
int use_rmii; /* use RMII mode */
|
||||
int has_phy; /* if the network is phy container as well...*/
|
||||
|
||||
struct clk *clk_per; /* 'per' clock for register access */
|
||||
};
|
||||
struct fs_mii_fec_platform_info {
|
||||
u32 irq[32];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue