Fellow Freescalers,
The aforementioned code is now posted for free GPL license usage at google code.
One set of modifcations is the MPC831x Linux Ethernet driver code. This is listed under the source drivers directory which you can view or svn download at: http://code.google.com/p/ptpv2d/source/browse/#svn/trunk/ptpv2d-1a0/drivers/freescale_mpc831x/src
The three main files I modified to get IEEE 1588 PTP v1, v2 and IEEE 802.1AS (v2 format with Ethernet encapsulation) working at the driver level are:
- gianfar.c
- gianfar.h
- gianfar_1588.c
This driver supports all PTP related functions via IOCTLs and has features such as the ability to correlate PTP timestamps via PTP message type and sequence number to ensure that the correct frame timestamps are processed by the application.
The corresponding Linux application code is under the source application directory which you can view or svn download:
http://code.google.com/p/ptpv2d/source/browse/#svn/trunk/ptpv2d-1a0/application/src
and
http://code.google.com/p/ptpv2d/source/browse/#svn/trunk/ptpv2d-1a0/application/src/dep
Under the src/dep tree, there is also some C code for manipulating the LEDs directly from a Linux user application on an MPC8313ERDB board that you may find useful/interesting for experimenting with that board.
Hopefully this is useful for those wishing to experiment with PTP with HW timestamping on the MPC831x family.
Cheers,
Alan