From owner-freebsd-arm@FreeBSD.ORG Fri Mar 20 01:35:18 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E2B1C53; Fri, 20 Mar 2015 01:35:18 +0000 (UTC) Received: from mail-oi0-x22e.google.com (mail-oi0-x22e.google.com [IPv6:2607:f8b0:4003:c06::22e]) (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 F291E9AB; Fri, 20 Mar 2015 01:35:17 +0000 (UTC) Received: by oiag65 with SMTP id g65so80189112oia.2; Thu, 19 Mar 2015 18:35:17 -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=Uubr9GQws9oOO39LTy+gA2pi5Q5+kAybojcc1FxEgUg=; b=osgOjzEMODGsIxldOWfF3eU8kdIib3/2IE4ZZkcM6vOjsLD6c7HDKVm3L0Z9i301tA CEs9MGBXK3B7nS5qDhrrsBMqwAJQCYrH0zuxg5E8jpSArq+clP+T32vLOViq8ij5OgNf Ez3CfwiWDSvXyjCl1q2ZuUO+J9LC+dw4e66opfOMy+dQVZmqP6dt1LODflabe98AT/M2 QKW9Rs5M6gByBQPeN8vELQJzY91zlAyCs3VeG5Gt9Z182h2dbipqyt9LELodrN9iBT/6 kxffyhaGP6a+ZBZ+OuTme6QSWUqjn/2G9QLPfNTCC7tN3AnzUvjphYOOWhQ4Wb5BHhpD SuSQ== MIME-Version: 1.0 X-Received: by 10.60.70.161 with SMTP id n1mr63544133oeu.28.1426815317284; Thu, 19 Mar 2015 18:35:17 -0700 (PDT) Received: by 10.182.13.33 with HTTP; Thu, 19 Mar 2015 18:35:17 -0700 (PDT) In-Reply-To: <201503192141.t2JLfbv2010733@jwlab.FEITH.COM> References: <201503192141.t2JLfbv2010733@jwlab.FEITH.COM> Date: Fri, 20 Mar 2015 09:35:17 +0800 Message-ID: Subject: Re: Updated Amlogic aml8726-m6 and aml8726-m8 support files From: Ganbold Tsagaankhuu To: John Wehle Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-arm@freebsd.org" , Ruslan Bukin 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: Fri, 20 Mar 2015 01:35:18 -0000 John, On Fri, Mar 20, 2015 at 5:41 AM, John Wehle wrote: > > > https://people.freebsd.org/~ganbold/FreeBSD-amlogic-20150311/dmesg_odroidc1.txt > > > > I saw few timeouts in boot msg, but no crash. > > The timeouts appear to all be related to writing to your card. > > In aml8726_mmc.h what happens if you increase: > > AML_MMC_WRITE_TIMEOUT from 500 to 750 > > AML_MMC_MAX_TIMEOUT from 5000 to 6000 > > Basically I'm wondering if your card simply needs more time when writing. > I will check that when I get time. > > >> I'm aware that the eMMC support needs additional work and will get back > >> to it. I'm currently looking at porting the NetBSD dwc_gmac driver > since > >> it's known to work for the Amlogic DWC ethernet controller (as well as > >> the Allwinner). > >> > > > > I didn't check much, but how different is dwc_gmac from existing dwc? > > I don't have it right in front of me, however as I recall I needed the > following changes to get the existing dwc to send / receive packets > (and even then there seemed to be some issues): > > 1) In dwc_intr change: > > ... > mii_mediachg(sc->mii_softc); > > to: > > ... > mii_pollstat(&sc->sc_mii); > > in order to prevent the link from excessive flapping when the > media changed. > > While this change worked fine for me with the Amlogic SoC, and > is also how it's done by the NetBSD driver, Ruslan Bukin reported > that the change broke the Altera SoC for which he wrote the dwc > driver. > > 2) dwc sets some flags in DES0, however the Amlogic (and presumably > Allwinner) SoC requires the flags to instead be set in DES1. > > Right now the FreeBSD dwc driver works for the Altera SoC, the NetBSD > dwc_gmac driver works for the Allwinner and Amlogic SoC. > > The question is ... what makes the most sense? Extend the existing dwc > driver so that it works for more devices, or port an existing driver > which already works for more devices? > How hard would be to extend existing dwc driver? Maybe that way one driver could work for all. Ruslan might have some idea since he wrote dwc driver. Ruslan, Can you share ideas on John's question above? thanks a lot, Ganbold > > -- John > >