Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Mar 2015 09:35:17 +0800
From:      Ganbold Tsagaankhuu <ganbold@gmail.com>
To:        John Wehle <john@feith.com>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>, Ruslan Bukin <br@freebsd.org>
Subject:   Re: Updated Amlogic aml8726-m6 and aml8726-m8 support files
Message-ID:  <CAGtf9xOeG_q2r=j_zp5bPBiDQe=%2B1AfsZ3%2B9XEjPaime31uMdg@mail.gmail.com>
In-Reply-To: <201503192141.t2JLfbv2010733@jwlab.FEITH.COM>
References:  <201503192141.t2JLfbv2010733@jwlab.FEITH.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
John,

On Fri, Mar 20, 2015 at 5:41 AM, John Wehle <john@feith.com> 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
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGtf9xOeG_q2r=j_zp5bPBiDQe=%2B1AfsZ3%2B9XEjPaime31uMdg>