PTP for gianfar can be built as a module. Add device tree entry to P1010RDB to enable ptp as pps clock.
Clock timings are not tested. Signed-off-by: Wojciech Dubowik <wojciech.dubo...@neratec.com> --- package/kernel/modules/other.mk | 17 +++++++++++++++++ .../patches-3.7/140-p1010rdb-dts-ptp-timer.patch | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 target/linux/mpc85xx/patches-3.7/140-p1010rdb-dts-ptp-timer.patch diff --git a/package/kernel/modules/other.mk b/package/kernel/modules/other.mk index f63d670..1bdda0d 100644 --- a/package/kernel/modules/other.mk +++ b/package/kernel/modules/other.mk @@ -636,3 +636,20 @@ define KernelPacakge/ptp/description endef $(eval $(call KernelPackage,ptp)) + +define KernelPackage/ptp-gianfar + SUBMENU:=$(OTHER_MENU) + TITLE:=Freescale Gianfar PTP support + DEPENDS:=@TARGET_mpc85xx +kmod-gianfar +kmod-ptp + KCONFIG:=CONFIG_PTP_1588_CLOCK_GIANFAR + FILES:= \ + $(LINUX_DIR)/drivers/net/ethernet/freescale/gianfar_ptp.ko + AUTOLOAD:=$(call AutoLoad,51,gianfar_ptp) +endef + +define KernelPacakge/ptp-gianfar/description + Kenrel module for IEEE 1588 support for Freescale + Gianfar Ethernet drivers. +endef + +$(eval $(call KernelPackage,ptp-gianfar)) diff --git a/target/linux/mpc85xx/patches-3.7/140-p1010rdb-dts-ptp-timer.patch b/target/linux/mpc85xx/patches-3.7/140-p1010rdb-dts-ptp-timer.patch new file mode 100644 index 0000000..3076b35 --- /dev/null +++ b/target/linux/mpc85xx/patches-3.7/140-p1010rdb-dts-ptp-timer.patch @@ -0,0 +1,17 @@ +--- a/arch/powerpc/boot/dts/p1010rdb.dtsi 2012-11-21 12:21:21.320508226 +0100 ++++ b/arch/powerpc/boot/dts/p1010rdb.dtsi 2012-11-21 12:41:53.688342303 +0100 +@@ -256,4 +293,13 @@ + tbi-handle = <&tbi1>; + phy-connection-type = "sgmii"; + }; ++ ++ ptp_timer: ptimer@b0e00 { ++ compatible = "fsl,gianfar-ptp-timer"; ++ reg = <0xb0e00 0xb0>; ++ interrupts = <68 2 69 2 70 2>; ++ interrupt-parent = <&mpic>; ++ tmr-prsc = <0x2>; ++ cksel = <1>; ++ }; + }; + -- 1.7.10.4 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel