From owner-freebsd-arm@FreeBSD.ORG Mon Jul 14 21:11:13 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C9A0B53 for ; Mon, 14 Jul 2014 21:11:13 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20FCB2464 for ; Mon, 14 Jul 2014 21:11:12 +0000 (UTC) Received: from c-50-155-136-3.hsd1.co.comcast.net ([50.155.136.3] helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1X6nWh-0007BR-VM; Mon, 14 Jul 2014 21:11:12 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s6ELBBJ4007961; Mon, 14 Jul 2014 15:11:11 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 50.155.136.3 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/7aXCTukDskuvLfED8TU3m X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: Some bug fixes for Zynq Ethernet From: Ian Lepore To: Thomas Skibo In-Reply-To: <53A9D50F.8030604@sbcglobal.net> References: <53A9D50F.8030604@sbcglobal.net> Content-Type: text/plain; charset="us-ascii" Date: Mon, 14 Jul 2014 15:11:10 -0600 Message-ID: <1405372270.1312.14.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 21:11:13 -0000 On Tue, 2014-06-24 at 12:44 -0700, Thomas Skibo wrote: > Hello, all. > > I have some bug fixes for the Zynq/Zedboard Ethernet driver that have > been laying around for a while and that I'm hoping to get committed. > The main bug is that the driver doesn't handle media speed changes > correctly so it can only connect to 1G switches. > > To fix this bug, the driver needs to be able to change the frequency of > the ethernet core's reference clock. Because I am trying to keep > if_cgem.c platform-independent, I've created a function called > cgem_set_ref_clk() that a platform can override with a platform-specific > function for changing the clock. This should make it easier if the > Cadence GEM block shows up in other SoCs. > > Where it is a bit ugly is that the driver doesn't know which of two > ethernet cores it controls so I created a device-tree property called > "ref-clock-num" so that the platform-specific code knows which reference > clock to change. I am open to other ideas on how to do this. > > Comments? > > I have a few other minor fixes and enhancements that I'll put in a > different patch. > > Thanks, > Committed as r268633. Sorry it took so long, $work got crazy last month and I'm way behind. BTW, the weak-reference function and need for ref-clock-num property are fine for now... there's not much else we can do until we get a proper device/soc-independent clock API that can read and handle the standard clock=<...> properties in dts files. -- Ian