From: Randy Dunlap <randy.dunlap@oracle.com>
To: Richard Cochran <richardcochran@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 1/3] ptp: Added a brand new class driver for ptp clocks.
Date: Tue, 27 Apr 2010 15:32:39 -0700 [thread overview]
Message-ID: <20100427153239.0977c1aa.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20100427091405.GA5098@riccoc20.at.omicron.at>
On Tue, 27 Apr 2010 11:14:05 +0200 Richard Cochran wrote:
Hi,
How do I use the testptp.mk file?
$ cd Documentation/ptp
$ make -f *.mk
gcc -Wall -I/usr/include -c -o testptp.o testptp.c
testptp.c:33:29: error: linux/ptp_clock.h: No such file or directory
> diff --git a/Documentation/ptp/testptp.mk b/Documentation/ptp/testptp.mk
> new file mode 100644
> index 0000000..4ef2d97
> --- /dev/null
> +++ b/Documentation/ptp/testptp.mk
> @@ -0,0 +1,33 @@
> +# PTP 1588 clock support - User space test program
> +#
> +# Copyright (C) 2010 OMICRON electronics GmbH
> +#
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 2 of the License, or
> +# (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write to the Free Software
> +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
> +
> +CC = $(CROSS_COMPILE)gcc
> +INC = -I$(KBUILD_OUTPUT)/usr/include
> +CFLAGS = -Wall $(INC)
> +LDLIBS = -lrt
> +PROGS = testptp
> +
> +all: $(PROGS)
> +
> +testptp: testptp.o
> +
> +clean:
> + rm -f testptp.o
> +
> +distclean: clean
> + rm -f $(PROGS)
> diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig
> new file mode 100644
> index 0000000..458d0fe
> --- /dev/null
> +++ b/drivers/ptp/Kconfig
> @@ -0,0 +1,26 @@
> +#
> +# PTP clock support configuration
> +#
> +
> +menu "PTP clock support"
> +
> +config PTP_1588_CLOCK
> + tristate "PTP clock support"
> + depends on EXPERIMENTAL
> + help
> + The IEEE 1588 standard defines a method to precisely
> + synchronize distributed clocks over Ethernet networks. The
> + standard defines a Precision Time Protocol (PTP), which can
> + be used to achieve synchronization within a few dozen
> + microseconds. In addition, with the help of special hardware
> + time stamping units, it can be possible to achieve
> + synchronization to within a few hundred nanoseconds.
> +
> + This driver adds support for PTP clocks as character
> + devices. If you want to use a PTP clock, then you should
> + also enable at least one clock driver as well.
> +
> + To compile this driver as a module, choose M here: the module
> + will be called ptp_clock.ko.
Drop the ".ko". We normally don't include that part of the module name.
> +
> +endmenu
> diff --git a/include/linux/Kbuild b/include/linux/Kbuild
> index 2fc8e14..2d616cb 100644
> --- a/include/linux/Kbuild
> +++ b/include/linux/Kbuild
> @@ -318,6 +318,7 @@ unifdef-y += poll.h
> unifdef-y += ppp_defs.h
> unifdef-y += ppp-comp.h
> unifdef-y += pps.h
> +unifdef-y += ptp_clock.h
> unifdef-y += ptrace.h
> unifdef-y += quota.h
> unifdef-y += random.h
I think that the Kbuild file also needs this line:
header-y += ptp_clock.h
so that builds that use O=objdir will work, but even with that
change, I couldn't get it to work. (?)
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2010-04-27 22:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-27 9:14 [PATCH 1/3] ptp: Added a brand new class driver for ptp clocks Richard Cochran
2010-04-27 20:07 ` David Miller
2010-04-27 22:32 ` Randy Dunlap [this message]
2010-04-28 6:08 ` Richard Cochran
2010-04-28 15:45 ` Randy Dunlap
-- strict thread matches above, loose matches on Subject: below --
2010-04-29 9:19 Richard Cochran
2010-04-30 17:58 ` Wolfgang Grandegger
2010-05-01 14:08 ` Richard Cochran
2010-05-01 14:09 ` Wolfgang Grandegger
2010-05-02 10:50 ` Wolfgang Grandegger
2010-05-03 10:07 ` Richard Cochran
2010-05-04 7:57 ` Wolfgang Grandegger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100427153239.0977c1aa.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).