From owner-freebsd-arm@FreeBSD.ORG Sun May 31 21:05:43 2015 Return-Path: Delivered-To: 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 C008E918 for ; Sun, 31 May 2015 21:05:43 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: from mail-yh0-x234.google.com (mail-yh0-x234.google.com [IPv6:2607:f8b0:4002:c01::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 80D8E15FA for ; Sun, 31 May 2015 21:05:43 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: by yhom41 with SMTP id m41so29345458yho.1 for ; Sun, 31 May 2015 14:05:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1yqtxpNRwvqpUUc5fQAgKN6x8hGNeiTshM2I7oPZVQ8=; b=cAN9Na1K7gnbMbWJzLEfcRwIuGZZtY7UzQPZ+aL5geTxV4LyB9I7LUdM0Et15CUxGp 5/5YUz6ZSDYoMRyKd0J90DMH8jRyKGUeTkUQIqWKCcvzZU+QXybqsvHfDKRe5Z9Cf7Mq 6js403KTv/HYoHXCPtHZUOfih2jetpCTpsQ+xmsOxA/8MHnjs3lkz64Xbhh3Xxn9S2+F 3qJos3XI54tctEc+1EwoX5OApfrF3Z6BehAIO3lgtf/Ui4xPXNqIkGev89ViBFxHqH9e 24QuF2P3cw4TDsidcdfcuOqeP7Rn1/40tNSp14pKeOW8iQe3ePE7ab2th9dwBQDww1i4 cM0g== MIME-Version: 1.0 X-Received: by 10.236.229.228 with SMTP id h94mr19867260yhq.54.1433106342547; Sun, 31 May 2015 14:05:42 -0700 (PDT) Received: by 10.13.202.197 with HTTP; Sun, 31 May 2015 14:05:42 -0700 (PDT) In-Reply-To: <6544486.FbFh8Vg9WT@thinkpad> References: <6544486.FbFh8Vg9WT@thinkpad> Date: Sun, 31 May 2015 18:05:42 -0300 Message-ID: Subject: Re: if_dwc instead of if_emac on cubieboard2 From: Luiz Otavio O Souza To: che@bein.link Cc: "freebsd-arm@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 21:05:43 -0000 On 29 May 2015 at 18:10, Maxim V Filimonov wrote: > Hello everyone, > > I was advised to look at if_dwc instead of if_emac to improve network > performance on my cubieboard2. However, I was told that setting >> device dwc > instead of >> device emac > in the kernel config isn't enough. It's also necessary to configure > cubieboard's pins on dwc startup. This is where I'm stuck. I have the code: > 1. > http://svnweb.freebsd.org/base/head/sys/arm/allwinner/a10_gpio.c?revision=281085&view=markup#l527 > > 2. > http://svnweb.freebsd.org/base/head/sys/arm/allwinner/if_emac.c?revision=281675&view=markup#l143 > > And I don't know how to make it work. What i was told, though, was that I > should use the constant 5 instead of A10_GPIO_PULLDOWN in a10_gpio.c > How can I make the code from a10_gpio.c get called on dwc startup? Hi Maxim, As br@ said, the if_dwc driver is for a slight different version of hardware (basically it differs on tx and rx descriptor layouts and a few other bits here and there). After struggling with the differences for a few days I could make it work. Now it needs a serious cleanup and then I have to think what to do WRT existent if_dwc (if it is possible to integrate the both versions in the same driver or leave it as a separated driver). The driver also needs some infrastructure work to guarantee the internal states on stop->start cycles. This should get us a reliable driver and finally an usable system on a20 SoCs (specially on cubie2 and banana pi). Thank you for bring this back again. Luiz