diff options
author | Aida Mynzhasova <aida.mynzhasova@skitlab.ru> | 2013-09-27 17:40:27 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-30 21:17:16 -0700 |
commit | e58f6f4fb4eada7867014bfaec898f03afbce5c2 (patch) | |
tree | 366172a9c3501cb903a488fbecf9f461ed351bf3 /drivers/net | |
parent | 3f3f0960aff951c5df6e42ce292d1593a2520646 (diff) | |
download | linux-e58f6f4fb4eada7867014bfaec898f03afbce5c2.tar.gz linux-e58f6f4fb4eada7867014bfaec898f03afbce5c2.tar.bz2 linux-e58f6f4fb4eada7867014bfaec898f03afbce5c2.zip |
powerpc/83xx: gianfar_ptp: select 1588 clock source through dts file
Currently IEEE 1588 timer reference clock source is determined through
hard-coded value in gianfar_ptp driver. This patch allows to select ptp
clock source by means of device tree file node.
For instance:
fsl,cksel = <0>;
for using external (TSEC_TMR_CLK input) high precision timer
reference clock.
Other acceptable values:
<1> : eTSEC system clock
<2> : eTSEC1 transmit clock
<3> : RTC clock input
When this attribute isn't used, eTSEC system clock will serve as
IEEE 1588 timer reference clock.
Signed-off-by: Aida Mynzhasova <aida.mynzhasova@skitlab.ru>
Acked-by: Kumar Gala <galak@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar_ptp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar_ptp.c b/drivers/net/ethernet/freescale/gianfar_ptp.c index 098f133908ae..e006a09ba899 100644 --- a/drivers/net/ethernet/freescale/gianfar_ptp.c +++ b/drivers/net/ethernet/freescale/gianfar_ptp.c @@ -452,7 +452,9 @@ static int gianfar_ptp_probe(struct platform_device *dev) err = -ENODEV; etsects->caps = ptp_gianfar_caps; - etsects->cksel = DEFAULT_CKSEL; + + if (get_of_u32(node, "fsl,cksel", &etsects->cksel)) + etsects->cksel = DEFAULT_CKSEL; if (get_of_u32(node, "fsl,tclk-period", &etsects->tclk_period) || get_of_u32(node, "fsl,tmr-prsc", &etsects->tmr_prsc) || |