Thread (15 messages) 15 messages, 3 authors, 2011-03-26

Re: [PATCH V12 4/4] ptp: Added a clock driver for the National Semiconductor PHYTER.

flat view

From: John Stultz <hidden>
Date: 2011-03-23 21:46:40
Also in: linux-arm-kernel, linux-devicetree, linuxppc-dev, lkml, netdev

On Mon, 2011-02-28 at 08:58 +0100, Richard Cochran wrote:
This patch adds support for the PTP clock found on the DP83640.
The basic clock operations and one external time stamp have
been implemented.
Just locking rule comment nits here.
quoted hunk ↗ jump to hunk
+static int tdr_write(int bc, struct phy_device *dev,
+		     const struct timespec *ts, u16 cmd)
+{
+	ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_nsec & 0xffff);/* ns[15:0]  */
+	ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_nsec >> 16);   /* ns[31:16] */
+	ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_sec & 0xffff); /* sec[15:0] */
+	ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_sec >> 16);    /* sec[31:16]*/
+
+	ext_write(bc, dev, PAGE4, PTP_CTL, cmd);
+
+	return 0;
+}
The above needs to hold the extreg_lock, and should be commented as
such.

And again, the function names are sort of generic, and could use a
dp83640_ prefix or something.

thanks
-john
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help