diff options
| author | Gerhard Sittig <gsi@denx.de> | 2013-08-22 15:55:13 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-08-23 01:13:54 -0400 |
| commit | 2771399ac9986c75437a83b1c723493cfcdfa439 (patch) | |
| tree | 39e8eb8344696976b3b923d6f95fd4ee0aa41ae2 /include | |
| parent | 35b9eb0eee736e3d984d24873e0eff85dba6037f (diff) | |
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>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/fs_enet_pd.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/fs_enet_pd.h b/include/linux/fs_enet_pd.h index 343d82a54468..efb05961bdd8 100644 --- a/include/linux/fs_enet_pd.h +++ b/include/linux/fs_enet_pd.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #ifndef FS_ENET_PD_H | 16 | #ifndef FS_ENET_PD_H |
| 17 | #define FS_ENET_PD_H | 17 | #define FS_ENET_PD_H |
| 18 | 18 | ||
| 19 | #include <linux/clk.h> | ||
| 19 | #include <linux/string.h> | 20 | #include <linux/string.h> |
| 20 | #include <linux/of_mdio.h> | 21 | #include <linux/of_mdio.h> |
| 21 | #include <linux/if_ether.h> | 22 | #include <linux/if_ether.h> |
| @@ -143,6 +144,8 @@ struct fs_platform_info { | |||
| 143 | 144 | ||
| 144 | int use_rmii; /* use RMII mode */ | 145 | int use_rmii; /* use RMII mode */ |
| 145 | int has_phy; /* if the network is phy container as well...*/ | 146 | int has_phy; /* if the network is phy container as well...*/ |
| 147 | |||
| 148 | struct clk *clk_per; /* 'per' clock for register access */ | ||
| 146 | }; | 149 | }; |
| 147 | struct fs_mii_fec_platform_info { | 150 | struct fs_mii_fec_platform_info { |
| 148 | u32 irq[32]; | 151 | u32 irq[32]; |
