From owner-freebsd-arm@FreeBSD.ORG Mon Mar 23 21:30:20 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27B3380E for ; Mon, 23 Mar 2015 21:30:20 +0000 (UTC) Received: from bsdpad.com (xc1.bsdpad.com [195.154.136.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E22A5FC3 for ; Mon, 23 Mar 2015 21:30:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bsdpad.com) by bsdpad.com with smtp (Exim 4.83 (FreeBSD)) (envelope-from ) id 1Ya9q0-000I66-2t; Mon, 23 Mar 2015 21:24:44 +0000 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Mon, 23 Mar 2015 21:24:44 +0000 (GMT) Date: Mon, 23 Mar 2015 21:24:44 +0000 From: Ruslan Bukin To: John Wehle Subject: Re: Updated Amlogic aml8726-m6 and aml8726-m8 support files Message-ID: <20150323212444.GA69530@bsdpad.com> References: <201503232055.t2NKtk6G013897@jwlab.FEITH.COM> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201503232055.t2NKtk6G013897@jwlab.FEITH.COM> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 21:30:20 -0000 On Mon, Mar 23, 2015 at 04:55:46PM -0400, John Wehle wrote: > > if you change mii_mediachg() to mii_pollstat() in the interrupt hander, > > then changing media works stable for you ? > > It seemed to with limited testing. However there were other issues to > be resolved (e.g. some bit flag differences between the Altera and the > Amlogic) ... getting the dwc working reliable on the Amlogic was / is > still a work in progress. > > I'm incline to continue porting the NetBSD driver since it's known to > be stable with the Allwinner / Amlogic silicon (i.e. it already has any > magical register poking that might be necessary). Once it's working on > FreeBSD with the Amlogic SoC we can then compare / contrast the two > drivers to see: > > 1) If it's reasonable to merge them into one driver > > 2) Exactly what there is which needs to be merged > As I remember netbsd driver was wrotten for older version of dwc implemented in allwinners. Is Amlogic version is also old ? As you said before it works, that means version is not too old, and better idea here is to implement missing bits for our dwc(4) (as it really good driver and works perfect for SOCKIT). We can use mii_mediachg() or mii_pollstat() depending on version of hardware. (although there should be an easiest solution for this problem). Ruslan