From owner-freebsd-mips@FreeBSD.ORG Mon Apr 1 11:06:46 2013 Return-Path: Delivered-To: freebsd-mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CD17C8D2 for ; Mon, 1 Apr 2013 11:06:46 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id BE6DA338 for ; Mon, 1 Apr 2013 11:06:46 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r31B6k0U033715 for ; Mon, 1 Apr 2013 11:06:46 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r31B6k7G033713 for freebsd-mips@FreeBSD.org; Mon, 1 Apr 2013 11:06:46 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 1 Apr 2013 11:06:46 GMT Message-Id: <201304011106.r31B6k7G033713@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-mips@FreeBSD.org Subject: Current problem reports assigned to freebsd-mips@FreeBSD.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2013 11:06:46 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/177032 mips [arge] arge1 fails to attach on UBNT Routerstation o kern/165951 mips [ar913x] [ath] DDR flush isn't being done for the WMAC p kern/163670 mips [mips][arge] arge can't allocate ring buffer on multip 3 problems total. From owner-freebsd-mips@FreeBSD.ORG Mon Apr 1 16:00:01 2013 Return-Path: Delivered-To: freebsd-mips@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 682AB28B for ; Mon, 1 Apr 2013 16:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 5B5F5F37 for ; Mon, 1 Apr 2013 16:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r31G01rf090739 for ; Mon, 1 Apr 2013 16:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r31G01mU090738; Mon, 1 Apr 2013 16:00:01 GMT (envelope-from gnats) Date: Mon, 1 Apr 2013 16:00:01 GMT Message-Id: <201304011600.r31G01mU090738@freefall.freebsd.org> To: freebsd-mips@FreeBSD.org Cc: From: Luiz Otavio O Souza Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT Routerstation X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Luiz Otavio O Souza List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2013 16:00:01 -0000 The following reply was made to PR kern/177032; it has been noted by GNATS. From: Luiz Otavio O Souza To: bug-followup@FreeBSD.org, bordjukov@gmail.com Cc: Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT Routerstation Date: Mon, 1 Apr 2013 12:51:42 -0300 Hello Petko, Can you please modify ROUTERSTATION.hints as below and check if your = arge1 works ? Thanks, Luiz Index: ROUTERSTATION.hints =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- ROUTERSTATION.hints (revision 248943) +++ ROUTERSTATION.hints (working copy) @@ -10,7 +10,7 @@ hint.arge.1.media=3D100 hint.arge.1.fduplex=3D1 # Uncomment this hint for RS (not PRO) -hint.arge.1.phymask=3D0x30000 +hint.arge.1.phymask=3D0x0 =20 # RF led hint.gpioled.0.at=3D"gpiobus0" From owner-freebsd-mips@FreeBSD.ORG Mon Apr 1 17:00:01 2013 Return-Path: Delivered-To: freebsd-mips@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 65F5C793 for ; Mon, 1 Apr 2013 17:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 412B42EF for ; Mon, 1 Apr 2013 17:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r31H009t001984 for ; Mon, 1 Apr 2013 17:00:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r31H00pi001969; Mon, 1 Apr 2013 17:00:00 GMT (envelope-from gnats) Date: Mon, 1 Apr 2013 17:00:00 GMT Message-Id: <201304011700.r31H00pi001969@freefall.freebsd.org> To: freebsd-mips@FreeBSD.org Cc: From: Petko Bordjukov Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT Routerstation X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Petko Bordjukov List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2013 17:00:01 -0000 The following reply was made to PR kern/177032; it has been noted by GNATS. From: Petko Bordjukov To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT Routerstation Date: Mon, 01 Apr 2013 19:50:09 +0300 Hello Luiz, Thank you for your response. Using a 0x0 PHY mask does indeed eliminate the error and the interface is present and operational. However, what are the implications of not using a directly mapped PHY? Also, to my knowledge the phymask should be 15 << 16 and the miimode should be RMII, however I was not able to get the interface running with these values. -- Best regards, Petko From owner-freebsd-mips@FreeBSD.ORG Mon Apr 1 19:41:17 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A9744609 for ; Mon, 1 Apr 2013 19:41:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by mx1.freebsd.org (Postfix) with ESMTP id 46C7ECCA for ; Mon, 1 Apr 2013 19:41:16 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id c11so2368806wgh.8 for ; Mon, 01 Apr 2013 12:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=7GtbO7TNJIJRAAhZ8YCKydNyVHWKs2znLMT/twKJZnk=; b=QmrKxpyz73IPm7wIVqzbe93FvneJwuWWw2+/I1bXbzHRgoAtumpuTZFzcePhYYN3eq aCDY6XAwzyfLyZm3iZEcYeacNiFvRoazBdMjZVvLlVl2/sdvaLJ7KITOq2L9yljdXR5Y F0zHKnAp83H94dSoi6+nieh4SsrGbcCUkvG333e1wSCtJ7LTyTZyzaWW6u1E3ItOsMS6 PfY10uO6s/xEJt3IP5yEmMRUjnrTjPOOjBIeimZZwwZ/+Nik48uzMAsRiUzi4o+EXQR5 bXZD2h6uOTmRyIkDQqV/qXL8nnxwoLjiRAGbdqFGqnK09ckM+P9z9YV6Jgm4egHyONHA 701A== MIME-Version: 1.0 X-Received: by 10.180.89.105 with SMTP id bn9mr11431495wib.26.1364845276353; Mon, 01 Apr 2013 12:41:16 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.108.130 with HTTP; Mon, 1 Apr 2013 12:41:16 -0700 (PDT) In-Reply-To: <201304011700.r31H00pi001969@freefall.freebsd.org> References: <201304011700.r31H00pi001969@freefall.freebsd.org> Date: Mon, 1 Apr 2013 12:41:16 -0700 X-Google-Sender-Auth: QEjnj8iTYhD4QUsRr07SICbSV-8 Message-ID: Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT Routerstation From: Adrian Chadd To: Petko Bordjukov Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2013 19:41:17 -0000 .. someone needs to port over the switch PHY driver from Linux. I have permission to relicence that driver BSD. I started doing it, but I ran out of time. Sorry ;( Adrian On 1 April 2013 10:00, Petko Bordjukov wrote: > The following reply was made to PR kern/177032; it has been noted by GNATS. > > From: Petko Bordjukov > To: bug-followup@FreeBSD.org > Cc: > Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT Routerstation > Date: Mon, 01 Apr 2013 19:50:09 +0300 > > Hello Luiz, > > Thank you for your response. > > Using a 0x0 PHY mask does indeed eliminate the error and the interface > is present and operational. However, what are the implications of not > using a directly mapped PHY? > > Also, to my knowledge the phymask should be 15 << 16 and the miimode > should be RMII, however I was not able to get the interface running with > these values. > > -- > Best regards, > Petko > > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" From owner-freebsd-mips@FreeBSD.ORG Mon Apr 1 20:33:01 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6E9B88C8; Mon, 1 Apr 2013 20:33:01 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by mx1.freebsd.org (Postfix) with ESMTP id D7957F22; Mon, 1 Apr 2013 20:33:00 +0000 (UTC) Received: by mail-wg0-f46.google.com with SMTP id l18so2410236wgh.13 for ; Mon, 01 Apr 2013 13:32:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=J2e1wVEUpVqp1mD1FThHRdfEA8Xo4lfuP0YflqQxp2s=; b=n9UF9jAJ6tMBLe3yuX68EOs2jsJj2A4pyXy++tmZMHpTm5q681lhbdtEX0yZENI2MX ST+EZ7TJ0hOvmcqQo3k75mtIda/ELZURSShINPQalRDWbEa0ZBWt35PZ/Bt+1wLciClX OyesFkG3kkZANgMGUpbohznhJM+b62i/exdT3fb3VNkB11910MUKfY0TP/TXf1tDPQRY L50v6oG4KkFhnk7ZOK/nKEyZYGqfvV+DISoO+YPchhmVtfvZxKUj3jwgwOCfsMv1TqlF nhpEZzJxm8Gyh/evC29WQDVrLC7SmSyN3szcjwLu0+zS8GGvVGPBvMive0NGT57X757y L71w== MIME-Version: 1.0 X-Received: by 10.194.71.110 with SMTP id t14mr17430090wju.53.1364848379885; Mon, 01 Apr 2013 13:32:59 -0700 (PDT) Received: by 10.216.244.70 with HTTP; Mon, 1 Apr 2013 13:32:59 -0700 (PDT) In-Reply-To: <201304011700.r31H00pi001969@freefall.freebsd.org> References: <201304011700.r31H00pi001969@freefall.freebsd.org> Date: Mon, 1 Apr 2013 17:32:59 -0300 Message-ID: Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT Routerstation From: Luiz Otavio O Souza To: Petko Bordjukov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: bug-followup@FreeBSD.org, freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2013 20:33:01 -0000 On 1 April 2013 14:00, Petko Bordjukov wrote: > The following reply was made to PR kern/177032; it has been noted by GNATS. > > From: Petko Bordjukov > To: bug-followup@FreeBSD.org > Cc: > Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT > Routerstation > Date: Mon, 01 Apr 2013 19:50:09 +0300 > > Hello Luiz, > > Thank you for your response. > > Using a 0x0 PHY mask does indeed eliminate the error and the interface > is present and operational. However, what are the implications of not > using a directly mapped PHY? > > Also, to my knowledge the phymask should be 15 << 16 and the miimode > should be RMII, however I was not able to get the interface running with > these values. > > -- > Best regards, > Petko > > There are no implications for this change on ROUTERSTATION as the switch (ADM9669) cannot be managed from its MDIO interface and all you have is a static two port switch on arge1. Even with the correct phymask, you cannot attach and use two simultaneous PHY on a single ethernet interface so i think that the phymask=0 is correct for this board. And no, the phymask on the ROUTERSTATION.hints is correct (0x3 << 16 == PHY 16 and 17) as there are only two ports connected on the switch (all the others PHYs on the switch are disconnected). I'm not sure about the correct miimode for ROUTERSTATION, but i think you're right, it should be RMII. I don't have physical access to this board anymore to test it myself (although a friend of mine has one of these). Regards, Luiz From owner-freebsd-mips@FreeBSD.ORG Mon Apr 1 20:40:02 2013 Return-Path: Delivered-To: freebsd-mips@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 31774D8B for ; Mon, 1 Apr 2013 20:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 23D08F6E for ; Mon, 1 Apr 2013 20:40:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r31Ke1vg078775 for ; Mon, 1 Apr 2013 20:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r31Ke15i078774; Mon, 1 Apr 2013 20:40:01 GMT (envelope-from gnats) Date: Mon, 1 Apr 2013 20:40:01 GMT Message-Id: <201304012040.r31Ke15i078774@freefall.freebsd.org> To: freebsd-mips@FreeBSD.org Cc: From: Luiz Otavio O Souza Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT Routerstation X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Luiz Otavio O Souza List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2013 20:40:02 -0000 The following reply was made to PR kern/177032; it has been noted by GNATS. From: Luiz Otavio O Souza To: Petko Bordjukov Cc: freebsd-mips@freebsd.org, bug-followup@FreeBSD.org Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT Routerstation Date: Mon, 1 Apr 2013 17:32:59 -0300 --047d7bfd0bd6db028f04d9528645 Content-Type: text/plain; charset=ISO-8859-1 On 1 April 2013 14:00, Petko Bordjukov wrote: > The following reply was made to PR kern/177032; it has been noted by GNATS. > > From: Petko Bordjukov > To: bug-followup@FreeBSD.org > Cc: > Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT > Routerstation > Date: Mon, 01 Apr 2013 19:50:09 +0300 > > Hello Luiz, > > Thank you for your response. > > Using a 0x0 PHY mask does indeed eliminate the error and the interface > is present and operational. However, what are the implications of not > using a directly mapped PHY? > > Also, to my knowledge the phymask should be 15 << 16 and the miimode > should be RMII, however I was not able to get the interface running with > these values. > > -- > Best regards, > Petko > > There are no implications for this change on ROUTERSTATION as the switch (ADM9669) cannot be managed from its MDIO interface and all you have is a static two port switch on arge1. Even with the correct phymask, you cannot attach and use two simultaneous PHY on a single ethernet interface so i think that the phymask=0 is correct for this board. And no, the phymask on the ROUTERSTATION.hints is correct (0x3 << 16 == PHY 16 and 17) as there are only two ports connected on the switch (all the others PHYs on the switch are disconnected). I'm not sure about the correct miimode for ROUTERSTATION, but i think you're right, it should be RMII. I don't have physical access to this board anymore to test it myself (although a friend of mine has one of these). Regards, Luiz --047d7bfd0bd6db028f04d9528645 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 1 April 2013 14:00, Petko Bo= rdjukov <bordjukov@gmail.com> wrote:
The following reply was made to PR kern/177032; it has been noted by GNATS.=

From: Petko Bordjukov <bord= jukov@gmail.com>
To: bug-followup@FreeBSD.org
Cc:
Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT Routerstatio= n
Date: Mon, 01 Apr 2013 19:50:09 +0300

=A0Hello Luiz,

=A0Thank you for your response.

=A0Using a 0x0 PHY mask does indeed eliminate the error and the interface =A0is present and operational. However, what are the implications of not =A0using a directly mapped PHY?

=A0Also, to my knowledge the phymask should be 15 << 16 and the miimo= de
=A0should be RMII, however I was not able to get the interface running with=
=A0these values.

=A0--
=A0Best regards,
=A0Petko



There are no implications for this change on ROUTERS= TATION as the switch (ADM9669) cannot be managed from its MDIO interface an= d all you have is a static two port switch on arge1.

Even with the correct phymask, you cannot attach and us= e two simultaneous PHY on a single ethernet interface so i think that the p= hymask=3D0 is correct for this board.

And no, the = phymask on the ROUTERSTATION.hints is correct (0x3 << 16 =3D=3D PHY 1= 6 and 17) as there are only two ports connected on the switch (all the othe= rs PHYs on the switch are disconnected).

I'm not sure about the correct miimode for ROUTERST= ATION, but i think you're right, it should be RMII. I don't have ph= ysical access to this board anymore to test it myself (although a friend of= mine has one of these).

Regards,
Luiz

--047d7bfd0bd6db028f04d9528645-- From owner-freebsd-mips@FreeBSD.ORG Mon Apr 1 20:40:55 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 85473E9A; Mon, 1 Apr 2013 20:40:55 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) by mx1.freebsd.org (Postfix) with ESMTP id EE1D7F8B; Mon, 1 Apr 2013 20:40:54 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id hr17so1911737wib.5 for ; Mon, 01 Apr 2013 13:40:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=vjSdygTg6zAjlihw0niufDPCCqy/tov+oAlqqWkPgD0=; b=SyC7zsLw0D/bAyoAhDfI9JlmBFhSM54cTtwM5RJgHHYsoBATxkzqnCFsdQzbjUHhCf M5xSWvaPoVgDQv9IGqv+V1YPolNlxyoClc3LLNNqBEQKxu2Py0p2ifW466tNLXalHt4X ryCUPPbjAkqrDGAxKxOlwqtVQLqCU7EZwy+nUUniJZjKAMophJn9IhNvP2FvxUK1zLyH ZuJcP5DEea67Bw/sb2beiHxgcNTit5AdpW7F4K7+y2EVCDxjOu5UPRv1oCAl7oswpoYG 0N9bXxMMSsVLg7k5Daj5iC1+v5+WwWVsMbmzwOcLiTvB8AgH8uVtwu1Ufrf/XcgUKCY7 8/Pg== MIME-Version: 1.0 X-Received: by 10.194.71.110 with SMTP id t14mr17457989wju.53.1364848854089; Mon, 01 Apr 2013 13:40:54 -0700 (PDT) Received: by 10.216.244.70 with HTTP; Mon, 1 Apr 2013 13:40:54 -0700 (PDT) In-Reply-To: References: <201304011700.r31H00pi001969@freefall.freebsd.org> Date: Mon, 1 Apr 2013 17:40:54 -0300 Message-ID: Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT Routerstation From: Luiz Otavio O Souza To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2013 20:40:55 -0000 On 1 April 2013 16:41, Adrian Chadd wrote: > .. someone needs to port over the switch PHY driver from Linux. > > I have permission to relicence that driver BSD. > > I started doing it, but I ran out of time. Sorry ;( > > > > Adrian > > Adrian, This board uses a switch which cannot be managed from its MDIO interface, there isn't to much to do in this case. I'll just check if we can use ARGE_MDIO without a switch driver (so arge1 can talk to direct connected PHYs). Anyway i'll take care of the missing switch drivers. It has been a long overdue of my part. Cheers, Luiz From owner-freebsd-mips@FreeBSD.ORG Mon Apr 1 21:28:22 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F2EDF27E; Mon, 1 Apr 2013 21:28:21 +0000 (UTC) (envelope-from bordjukov@gmail.com) Received: from mail-qe0-f53.google.com (mail-qe0-f53.google.com [209.85.128.53]) by mx1.freebsd.org (Postfix) with ESMTP id A78F3220; Mon, 1 Apr 2013 21:28:21 +0000 (UTC) Received: by mail-qe0-f53.google.com with SMTP id q19so1469297qeb.40 for ; Mon, 01 Apr 2013 14:28:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=Sd/7bL99MUSy6nKFwyx7Zc3MRou5k3wsvXlCApGKDeE=; b=JL4gCPQjSmg0uqbENiR6fNJmbRwHajkF7jBei4JQVCfhEodBrT3pOjAlFA3UYBSPaW 9aE/bWJMdniq69iv0dGFAVe9iUiEz1+U4h1bKnrHGkWf+eW0CrqcSDWXbDEBDy3SHayu iWb5bax3Q0Wst64Wr3VQoWLb2VX4MNvz3CfqZJs7VE/hfeWiRLA8dBS6zfEoXi/Hn1Hc nHr15JD47DslWAvS2E8NYVmyoH7e6UusH98L3p2TLRhsCKB+tf5SFUbXfmf/V5vkOLl5 dYtMn4a/GnkO19fE9fiovpE7KYYD6mjHPpKjCQMzy7zYiKUCu5R+HRDYsP/DDq2QOKI/ O1KA== MIME-Version: 1.0 X-Received: by 10.229.12.38 with SMTP id v38mr5318248qcv.104.1364851695136; Mon, 01 Apr 2013 14:28:15 -0700 (PDT) Received: by 10.49.128.104 with HTTP; Mon, 1 Apr 2013 14:28:15 -0700 (PDT) In-Reply-To: References: <201304011700.r31H00pi001969@freefall.freebsd.org> Date: Tue, 2 Apr 2013 00:28:15 +0300 Message-ID: Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT Routerstation From: Petko Bordjukov To: Luiz Otavio O Souza Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2013 21:28:22 -0000 Luiz, Adrian, Thank you for looking into this issue. I am up for testing, should you need me. Regards, Petko On Mon, Apr 1, 2013 at 11:40 PM, Luiz Otavio O Souza wrote: > On 1 April 2013 16:41, Adrian Chadd wrote: > >> .. someone needs to port over the switch PHY driver from Linux. >> >> I have permission to relicence that driver BSD. >> >> I started doing it, but I ran out of time. Sorry ;( >> >> >> >> Adrian >> >> > Adrian, > > This board uses a switch which cannot be managed from its MDIO interface, > there isn't to much to do in this case. I'll just check if we can use > ARGE_MDIO without a switch driver (so arge1 can talk to direct connected > PHYs). > > Anyway i'll take care of the missing switch drivers. It has been a long > overdue of my part. > > Cheers, > Luiz > From owner-freebsd-mips@FreeBSD.ORG Tue Apr 2 03:18:36 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6F47D118 for ; Tue, 2 Apr 2013 03:18:36 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com [74.125.82.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0ADA41D4 for ; Tue, 2 Apr 2013 03:18:35 +0000 (UTC) Received: by mail-wg0-f44.google.com with SMTP id z12so2606253wgg.23 for ; Mon, 01 Apr 2013 20:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=xDhZI4rJF9H2inku47LDkxWNOgeV/nZ1Ue1xEzcBqdw=; b=WIoh+RXaeQmJjJowYX1oTGTMGHTNKT/ys1ECkvth8JvoA3AaJeEhmLXWQGJZt3Qwes pkE6HIerDJmT/Gzm+1UTzYBNnD1EpMqyOPd0m42DiBu0lJpGI4bxarWGcK1cQNdKpC8y /2altD+yzjwRWkXNutVnhy8JYPncQTDStTwBIH40unUcTqo+Qq35tIjke66q2b2KW6MP zZgWS4PthQw1mvAPJGGZsIBfh8OoLEbdZoICx9356hNcMGEJO9uYHju13xvNBxd5u79p oBNx2quGc+TsYMd9sdd1+VrJZ4bGmfsZUyrkwknkzEKbUw0ZSRhESgDVh25zol3kgw23 nFPg== MIME-Version: 1.0 X-Received: by 10.194.120.169 with SMTP id ld9mr18761510wjb.24.1364872714892; Mon, 01 Apr 2013 20:18:34 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.108.130 with HTTP; Mon, 1 Apr 2013 20:18:34 -0700 (PDT) In-Reply-To: References: <201304011700.r31H00pi001969@freefall.freebsd.org> Date: Mon, 1 Apr 2013 20:18:34 -0700 X-Google-Sender-Auth: WgOYz3xZEcJPGpQBbpTNW-joX_Y Message-ID: Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT Routerstation From: Adrian Chadd To: Luiz Otavio O Souza Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Apr 2013 03:18:36 -0000 .. the ADM6996 on the ubiquiti routerstation can be managed from the MDIO interface. What's the problem? Adrian From owner-freebsd-mips@FreeBSD.ORG Wed Apr 3 14:14:54 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 593411F8 for ; Wed, 3 Apr 2013 14:14:54 +0000 (UTC) (envelope-from dioptimizer@gmail.com) Received: from mail-ie0-x232.google.com (mail-ie0-x232.google.com [IPv6:2607:f8b0:4001:c03::232]) by mx1.freebsd.org (Postfix) with ESMTP id 2C3E32C8 for ; Wed, 3 Apr 2013 14:14:54 +0000 (UTC) Received: by mail-ie0-f178.google.com with SMTP id bn7so1684562ieb.37 for ; Wed, 03 Apr 2013 07:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=eRNXICrzNvMCwFhpMS20RE4MZsPs6DFTP383AiROw8Y=; b=DKJB99n7RexXrCZWagGGDnvG7Pn2zYPSTtUKMc+Kw/b+0kPN+WIdSF1MIqre+N/FTF WALUD6GiIAY9CYX0n8CJI5HySV9Tthn9FluBXkf1J7lIZ9dIywM3hLYIuRf/9WoLzUKm 1q1BucdDw3BLUim2WLrdLLw2K19mfws1Y7FrFtBDeNWueqeurbdERmr1DlhlTNoqVqOk JxsG0Ryb6hdYhe7zdcG+sukZj4DudljAXBngtakC/WktI+EmFgAyPLYjqFO9uLDaiHdc IxAtoM9xX+up7TsL8PUUrzT0DaBPRu8s5jNpFaZMlTjNnY++bdNVZeP9woFJ4DX7M9cD 33oQ== MIME-Version: 1.0 X-Received: by 10.50.13.39 with SMTP id e7mr1120838igc.97.1364998493881; Wed, 03 Apr 2013 07:14:53 -0700 (PDT) Received: by 10.64.76.134 with HTTP; Wed, 3 Apr 2013 07:14:53 -0700 (PDT) Date: Wed, 3 Apr 2013 17:14:53 +0300 Message-ID: Subject: Re: [PATCH] MMC/SD SPI-mode driver From: Dmytro To: freebsd-mips@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Apr 2013 14:14:54 -0000 Hi Patrick. What is the average speed (in kb) read/write via SPI in a SD memory card? How much load the CPU during the procedure read/write? Your patch affects the the above points in the direction of improvement? Thank you. From owner-freebsd-mips@FreeBSD.ORG Wed Apr 3 15:14:26 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6E5032D6 for ; Wed, 3 Apr 2013 15:14:26 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-bk0-x233.google.com (mail-bk0-x233.google.com [IPv6:2a00:1450:4008:c01::233]) by mx1.freebsd.org (Postfix) with ESMTP id 05E9884E for ; Wed, 3 Apr 2013 15:14:25 +0000 (UTC) Received: by mail-bk0-f51.google.com with SMTP id y8so893964bkt.24 for ; Wed, 03 Apr 2013 08:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=es2TncNIhDRnkd6+WlrpIGNijyNEnnrQsdPXZR7tTXE=; b=jYfAfpnxTGYQTE+sKfBIL/4r+IlyfbGsm9CdcQs5BJaVjodGwqUcgfRo031E9fCeEQ SF9TMr343vEb+7QdI8mOKLN9v2MCw3x7n0ysK33vCINhWnkDjqPVStbXsfYViYU+0XKt Z2iya6gFFDzaQGh2QfWs3XIyXfdp15YSJgxVffVUjFyr0tUroyxXUL+axhVuy+E/dWvo M9F75RQ4+pzJTda6PCxl2SPANoZQdJKvrttpPJF6TqrMGtM2rKxHD30T3nsxzeizqIMy BrYpHfIrmv3F+8MpZu9rX3nHBywIfnUKnowR4p1KDeYjmnbHaDLyLJdWP6tKQMH8BODP j0nQ== MIME-Version: 1.0 X-Received: by 10.205.114.11 with SMTP id ey11mr1550871bkc.104.1365002065001; Wed, 03 Apr 2013 08:14:25 -0700 (PDT) Sender: pkelsey@gmail.com Received: by 10.204.128.213 with HTTP; Wed, 3 Apr 2013 08:14:24 -0700 (PDT) In-Reply-To: References: Date: Wed, 3 Apr 2013 11:14:24 -0400 X-Google-Sender-Auth: gRGIYrK3H_EXgKv5yum-9Z9RIAI Message-ID: Subject: Re: [PATCH] MMC/SD SPI-mode driver From: Patrick Kelsey To: Dmytro Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Apr 2013 15:14:26 -0000 On Wed, Apr 3, 2013 at 10:14 AM, Dmytro wrote: > Hi Patrick. Hi Dmytro > What is the average speed (in kb) read/write via SPI in a SD memory card? It depends on the card, it depends on the system the card is installed in, and it depends on the IO pattern. I developed the driver on a RouterBoard RB450G, and on that hardware the SPI bus speed tops out in the neighborhood of 7 - 8 MHz, whereas many cards should be able to handle SPI up to 25MHz, and possibly 50 MHz. At the rather limited SPI bus speed of the RB450G, and under the most favorable access pattern (sequential 64k I/O using multi-block commands), the min/avg/max performance for the set of 31 cards I tested with was 682/694/698 KiB/s for read and 294/620/683 KiB/s for write. Assuming bus speed is the only limitation, extrapolating that to a 50 MHz SPI bus would improve those numbers about 6x. > How much load the CPU during the procedure read/write? On the RB450G, the SPI bus is bit-banged and polled, so CPU use is high when reading and writing. On other hardware with a more capable SPI controller, I would expect CPU usage could be lower. > Your patch affects the the above points in the direction of improvement? The patch gives FreeBSD the ability to communicate with SD cards in SPI mode, which it does not otherwise have. This is useful for systems in which the SD card slot is only connected to an SPI bus. If you want the best performance when accessing an SD card, you want hardware that runs a full SD-bus to the card, not an SPI one. -Patrick From owner-freebsd-mips@FreeBSD.ORG Wed Apr 3 15:16:59 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CD869395; Wed, 3 Apr 2013 15:16:59 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [IPv6:2a00:1450:400c:c03::22c]) by mx1.freebsd.org (Postfix) with ESMTP id 40B0D894; Wed, 3 Apr 2013 15:16:59 +0000 (UTC) Received: by mail-we0-f172.google.com with SMTP id r3so1299050wey.17 for ; Wed, 03 Apr 2013 08:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=1RnMwsQE564Om8rSV4Agnw9HR9wZuZ0PusyBYl5r6G8=; b=J35ZqmtqJgukbEEHkEXJ0bZ3FSOx7P/Uv+jNKBobVPVRezMYIMaCoBH7hRkl1KQRKu xfZOr6AXvgPUEH8gyFh06AVInA7KCGW/RsmzZ5bBJ67LPj5rymQ8g9/tSGPUMGuC5nBq RhlNVHcZWa9bs9Z2WQOx0nlxrvC/2GaNX+nBua+pU1GchAC+xThXxpLuffVaNuc2XiME yQTTbEDeSwnqNTtKT/LFsKQAd8aby3bE0oEtoj5dbWXcSpAL4G5WoDKR+Z3SKY7eq9r0 aFwPjcD2945iYe2Izz5XzyxZjsnC06Tft7jAZHI0JWx7lgIrSGVuwrQph7eeztwdxeRV 8RPQ== MIME-Version: 1.0 X-Received: by 10.180.82.68 with SMTP id g4mr3198650wiy.26.1365002218469; Wed, 03 Apr 2013 08:16:58 -0700 (PDT) Received: by 10.216.244.70 with HTTP; Wed, 3 Apr 2013 08:16:58 -0700 (PDT) In-Reply-To: References: <201304011700.r31H00pi001969@freefall.freebsd.org> Date: Wed, 3 Apr 2013 12:16:58 -0300 Message-ID: Subject: Re: kern/177032: [arge] arge1 fails to attach on UBNT Routerstation From: Luiz Otavio O Souza To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Apr 2013 15:16:59 -0000 On 2 April 2013 00:18, Adrian Chadd wrote: > .. the ADM6996 on the ubiquiti routerstation can be managed from the > MDIO interface. > > Well, looks like there are two variants of ADM6996, not sure if both can be managed from mdio. If i've enough time to work in collaboration with my friend who have one RS i'll try to access the EEPROM registers from mdio. Thanks, Luiz From owner-freebsd-mips@FreeBSD.ORG Fri Apr 5 03:11:50 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0362374F for ; Fri, 5 Apr 2013 03:11:50 +0000 (UTC) (envelope-from dioptimizer@gmail.com) Received: from mail-ia0-x236.google.com (mail-ia0-x236.google.com [IPv6:2607:f8b0:4001:c02::236]) by mx1.freebsd.org (Postfix) with ESMTP id CFD5CD73 for ; Fri, 5 Apr 2013 03:11:49 +0000 (UTC) Received: by mail-ia0-f182.google.com with SMTP id u8so2827610iag.13 for ; Thu, 04 Apr 2013 20:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=3wboDHXsmIMzGnOLUkzZ3SHSNiBLNhkIZ3co4aYDMGU=; b=yilZi1iMWCzNWNe3y7b2nzFxyGdVrBYVIRxEntbpcYsGClcCicdcqnPXTIcj8ynRvX 9RXMgNs5PhvABA0jAf0rzV1JPchZ5bs3sqT1shFOI02yP1JurRRCOGvSUmvzZjUt0AoO 4DpLZnEs+n+EY138B6wFTzSNkyBIOuQCrzR4wUE7UlLhUbuquf0zh/MRtmODViV/rVmQ wVh1SXbUXMjNQBsLk2L97aD6zd0YjP5OcIYzTRUTAJRpxesIuRmWymhLSK5U+iLkxiQu 8Ro6avec20PZNqDSd4CQIYNX34BSLoMCCzDYKGHoDJzo7e07Kk3Xvy4tHM1v1hI38Jq0 p8Rg== MIME-Version: 1.0 X-Received: by 10.50.13.39 with SMTP id e7mr453514igc.97.1365131509524; Thu, 04 Apr 2013 20:11:49 -0700 (PDT) Received: by 10.64.76.134 with HTTP; Thu, 4 Apr 2013 20:11:49 -0700 (PDT) In-Reply-To: References: Date: Fri, 5 Apr 2013 06:11:49 +0300 Message-ID: Subject: Re: [PATCH] MMC/SD SPI-mode driver From: Dmytro To: Patrick Kelsey Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Apr 2013 03:11:50 -0000 Thank you Patrick for the detailed answers. Given the platform processors Atheros, it is safe to say that all line ath79 (AR71XX/AR724X/AR913X SoCs) - SPI generic and has not changed even in the new generations of this CPUs. Working in OpenWRT, I can say that reading speed/CPU load is about the same as yours - slow. But I did not quite understand how to implemented the function of fast reading for NOR flash memory in driver (m25p80.c). Reading speed of NOR flash-memory about 3 MB/Without a full load CPU. I understand that it is sent to a specific command/register for a fast read is also SPI uses the buffer of NOR chip . However, at what level SPI controller is programmed for increasing speed - is not clear. http://dioptimizer.narod.ru/files/spi-ath79.c - Regards, Dmytro 2013/4/3, Patrick Kelsey : > On Wed, Apr 3, 2013 at 10:14 AM, Dmytro wrote: >> Hi Patrick. > Hi Dmytro > >> What is the average speed (in kb) read/write via SPI in a SD memory card? > > It depends on the card, it depends on the system the card is installed > in, and it depends on the IO pattern. I developed the driver on a > RouterBoard RB450G, and on that hardware the SPI bus speed tops out in > the neighborhood of 7 - 8 MHz, whereas many cards should be able to > handle SPI up to 25MHz, and possibly 50 MHz. At the rather limited > SPI bus speed of the RB450G, and under the most favorable access > pattern (sequential 64k I/O using multi-block commands), the > min/avg/max performance for the set of 31 cards I tested with was > 682/694/698 KiB/s for read and 294/620/683 KiB/s for write. Assuming > bus speed is the only limitation, extrapolating that to a 50 MHz SPI > bus would improve those numbers about 6x. > >> How much load the CPU during the procedure read/write? > > On the RB450G, the SPI bus is bit-banged and polled, so CPU use is > high when reading and writing. On other hardware with a more capable > SPI controller, I would expect CPU usage could be lower. > >> Your patch affects the the above points in the direction of improvement? > > The patch gives FreeBSD the ability to communicate with SD cards in > SPI mode, which it does not otherwise have. This is useful for > systems in which the SD card slot is only connected to an SPI bus. If > you want the best performance when accessing an SD card, you want > hardware that runs a full SD-bus to the card, not an SPI one. > > -Patrick > From owner-freebsd-mips@FreeBSD.ORG Fri Apr 5 14:57:07 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D659BDEA for ; Fri, 5 Apr 2013 14:57:07 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-bk0-x232.google.com (mail-bk0-x232.google.com [IPv6:2a00:1450:4008:c01::232]) by mx1.freebsd.org (Postfix) with ESMTP id 6CE80B3E for ; Fri, 5 Apr 2013 14:57:07 +0000 (UTC) Received: by mail-bk0-f50.google.com with SMTP id jg1so2098193bkc.23 for ; Fri, 05 Apr 2013 07:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=2i/zNAcmQtaDWCWXg5hyuVQcpuTQkvENr3JUNA/GUPE=; b=yfebl3QT31GXiInnhLoVIOahpORootIodyWUV3yk3is477GRbGsKB5YnzzA5k+wsqr 23t1voXMxyv+Eut6xUERRmnQZhx2Ud/Ee8VhkaWMbe61ZEuByG/J2aspDvRN5Ffzn0e8 kD4oiIBuz3KYJ+caWRh6ZG/xahJ5HjJ6fi57eAl8xclT2yXu4akrAJI6QUAArxgEJdqa HpZYWyad4QeseUD6TCeb3Ay+hQAyHk0komHgDKHvBc7rQVW65Tu5P15pyZqFVEoSCS0H dx1NvKN7OZunnE0F2h0ECrr5PiirBuoPZKeQ18paAjmU/+HklQaKOqAKnyTbAR2GIrBr 0YpQ== MIME-Version: 1.0 X-Received: by 10.205.134.3 with SMTP id ia3mr7035326bkc.92.1365173826263; Fri, 05 Apr 2013 07:57:06 -0700 (PDT) Sender: pkelsey@gmail.com Received: by 10.204.128.213 with HTTP; Fri, 5 Apr 2013 07:57:06 -0700 (PDT) In-Reply-To: References: Date: Fri, 5 Apr 2013 10:57:06 -0400 X-Google-Sender-Auth: QbCXkmcgyCc7NKf-bIyMZxBOkFU Message-ID: Subject: Re: [PATCH] MMC/SD SPI-mode driver From: Patrick Kelsey To: Dmytro Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Apr 2013 14:57:07 -0000 On Thu, Apr 4, 2013 at 11:11 PM, Dmytro wrote: > Thank you Patrick for the detailed answers. > Given the platform processors Atheros, it is safe to say that all line > ath79 (AR71XX/AR724X/AR913X SoCs) - SPI generic and has not changed > even in the new generations of this CPUs. > Working in OpenWRT, I can say that reading speed/CPU load is about the > same as yours - slow. > But I did not quite understand how to implemented the function of fast > reading for NOR flash memory in driver (m25p80.c). > Reading speed of NOR flash-memory about 3 MB/Without a full load CPU. > I understand that it is sent to a specific command/register for a fast > read is also SPI uses the buffer of NOR chip . > However, at what level SPI controller is programmed for increasing > speed - is not clear. > http://dioptimizer.narod.ru/files/spi-ath79.c > My understanding is that in the AR71xx (and possibly other related Atheros SoCs), the boot flash can be read through memory mapped access to a region starting at the reset address, as this is how booting from a serial flash is accomplished. In that scenario, the SPI controller will be translating each read access into an SPI bus transaction that will produce the desired data from the flash. Since the hardware is performing the SPI signalling, you wouldn't have the CPU overhead of bitbanging each SPI bit out. Performance would still be limited by the value set in the SPI clock divider register (which controls the bit times on the wire) and the speed of the clock that runs the SPI unit itself. -Patrick From owner-freebsd-mips@FreeBSD.ORG Fri Apr 5 16:57:28 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5F6C5BA3 for ; Fri, 5 Apr 2013 16:57:28 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by mx1.freebsd.org (Postfix) with ESMTP id EEF4E30B for ; Fri, 5 Apr 2013 16:57:27 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id c11so3941609wgh.8 for ; Fri, 05 Apr 2013 09:57:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=FUjY/kTa0xd5Kp0Whx3phrM4p6NBWcmcDpoLWrTIzWc=; b=J/c3B1fhozV6pXKSNiGkMReyJXsCTBq7qPmEJrpiGGQhJIZVo3Wmeatw0xFMK7tlfB RMkegOSV4qzWfcGJMUMpqJKYDKfGHfOaZUsfDiDpy3HKVyrAI0oZc3tFnxcP+gZ2uBsN FAWYEBTqOA51Ij3euDqwx0iGJq21KQSB9nxWGcEV5jzF3lUGq/AitBx+dogMiyb5Ry2t XeMz0VsPoiXOqrqlGkDwLh57lT2Jb5VHgdanRaHjP8tPheYBOwlssgXxUSTPVQFjzG++ kBja+muL13rorToOWT9iAe8KN4yitqyjcu1hc7UtlI3XmQlco/IQAbUAijOQXO4HsPNM X8PQ== MIME-Version: 1.0 X-Received: by 10.180.73.212 with SMTP id n20mr5721374wiv.11.1365181041188; Fri, 05 Apr 2013 09:57:21 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.212.73 with HTTP; Fri, 5 Apr 2013 09:57:21 -0700 (PDT) In-Reply-To: References: Date: Fri, 5 Apr 2013 09:57:21 -0700 X-Google-Sender-Auth: Wmlete9Gq-EsmnInTop4eaxiFXU Message-ID: Subject: Re: [PATCH] MMC/SD SPI-mode driver From: Adrian Chadd To: Patrick Kelsey Content-Type: text/plain; charset=ISO-8859-1 Cc: Dmytro , freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Apr 2013 16:57:28 -0000 On 5 April 2013 07:57, Patrick Kelsey wrote: > My understanding is that in the AR71xx (and possibly other related > Atheros SoCs), the boot flash can be read through memory mapped access > to a region starting at the reset address, as this is how booting from > a serial flash is accomplished. In that scenario, the SPI controller Yes. > will be translating each read access into an SPI bus transaction that > will produce the desired data from the flash. Since the hardware is > performing the SPI signalling, you wouldn't have the CPU overhead of > bitbanging each SPI bit out. Performance would still be limited by > the value set in the SPI clock divider register (which controls the > bit times on the wire) and the speed of the clock that runs the SPI > unit itself. Yes. The problem here is that we're clocking out 8 bits via bit banging, then we read the 8 bits from the Read register. So luckily we don't have to bitbang the reads and writes, but still. The SPI bus code looks pretty simplistic. There's no DELAY() entries in the SPI code either. The only thing we haven't changed is the SPI clock. Now, what Ray at zrouter did was to experiment with turning SPI _flash_ reads into remap-and-memcpy. Look at ath79_spi_do_read_flash_data(). It's a cute hack to improve read performance, but you _absolutely need to know_ that it's a flash chip and that the bus is locked for the duration of the read. You need the SPI bus locked so you don't have someone come along during a transfer loop and try to fiddle with the SPI registers. The other thing that has shown up is that they're doing some transfers in more than 8 bits at a time? That may also help. Thanks, Adrian From owner-freebsd-mips@FreeBSD.ORG Sat Apr 6 22:21:47 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 97FB21B1; Sat, 6 Apr 2013 22:21:47 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 5247C36B; Sat, 6 Apr 2013 22:21:47 +0000 (UTC) Received: from rnote.ddteam.net (7-127-135-95.pool.ukrtel.net [95.135.127.7]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id 3A76DC492D; Sun, 7 Apr 2013 01:13:14 +0300 (EEST) Date: Sun, 7 Apr 2013 01:13:07 +0300 From: Aleksandr Rybalko To: Adrian Chadd Subject: Re: [PATCH] MMC/SD SPI-mode driver Message-Id: <20130407011307.9a9a9d64.ray@freebsd.org> In-Reply-To: References: Organization: FreeBSD.ORG X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) X-Operating-System: FreeBSD Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Dmytro , freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Apr 2013 22:21:47 -0000 On Fri, 5 Apr 2013 09:57:21 -0700 Adrian Chadd wrote: > On 5 April 2013 07:57, Patrick Kelsey wrote: > > > My understanding is that in the AR71xx (and possibly other related > > Atheros SoCs), the boot flash can be read through memory mapped > > access to a region starting at the reset address, as this is how > > booting from a serial flash is accomplished. In that scenario, the > > SPI controller > > Yes. > > > will be translating each read access into an SPI bus transaction > > that will produce the desired data from the flash. Since the > > hardware is performing the SPI signalling, you wouldn't have the > > CPU overhead of bitbanging each SPI bit out. Performance would > > still be limited by the value set in the SPI clock divider register > > (which controls the bit times on the wire) and the speed of the > > clock that runs the SPI unit itself. > > Yes. > > The problem here is that we're clocking out 8 bits via bit banging, > then we read the 8 bits from the Read register. > > So luckily we don't have to bitbang the reads and writes, but still. > > The SPI bus code looks pretty simplistic. There's no DELAY() entries > in the SPI code either. The only thing we haven't changed is the SPI > clock. > > Now, what Ray at zrouter did was to experiment with turning SPI > _flash_ reads into remap-and-memcpy. Look at > ath79_spi_do_read_flash_data(). It's a cute hack to improve read > performance, but you _absolutely need to know_ that it's a flash chip > and that the bus is locked for the duration of the read. You need the > SPI bus locked so you don't have someone come along during a transfer > loop and try to fiddle with the SPI registers. Yeah, found :) here it is http://zrouter.org/hg/FreeBSD/head/rev/a92b653f5b46 > > The other thing that has shown up is that they're doing some transfers > in more than 8 bits at a time? That may also help. > > Thanks, > > > Adrian > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to > "freebsd-mips-unsubscribe@freebsd.org" WBW -- Aleksandr Rybalko From owner-freebsd-mips@FreeBSD.ORG Sat Apr 6 22:28:11 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0B115256; Sat, 6 Apr 2013 22:28:11 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [IPv6:2a00:1450:400c:c03::233]) by mx1.freebsd.org (Postfix) with ESMTP id 6FDEB3C4; Sat, 6 Apr 2013 22:28:10 +0000 (UTC) Received: by mail-we0-f179.google.com with SMTP id p43so3744517wea.10 for ; Sat, 06 Apr 2013 15:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=zA1v85p4rY+JTA1BTuEIskwFub5dSt3Hs5CoFDFloMQ=; b=d4oWxY9YR4S5SQgYlU6qUTcPAwwmLb0P5wNw101X6KWt2GlB6yeqDu8G0+jWScTNMH hH0gEIm3PSiRm3+qucGwzo52Kd3PH1yGltRsm3LyDqRAj5VN0UoZsao+MwKZwuEF9ReK w71g6GBt/lJmkr1CVi5i7YAFoia4lbBAVFBhldrUYHeA56f5WHcK2yyRntROG6B9BgDB iFU0T/KXLzmnbDjIFOkmf1zAHyOC/iXEcSN2Wg11AKe3VyzD5t+8xYhMISpn6puJChJN UNn8+MAV8fNrlkfDw2PUn27ACYF3k71p5YDpchF7rranVn+RSTLHD243Rvki8pVbNliw oO9g== MIME-Version: 1.0 X-Received: by 10.180.13.34 with SMTP id e2mr5722856wic.29.1365287289666; Sat, 06 Apr 2013 15:28:09 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.121.136 with HTTP; Sat, 6 Apr 2013 15:28:09 -0700 (PDT) In-Reply-To: <20130407011307.9a9a9d64.ray@freebsd.org> References: <20130407011307.9a9a9d64.ray@freebsd.org> Date: Sat, 6 Apr 2013 15:28:09 -0700 X-Google-Sender-Auth: G_s8d75m7gNug7j_wipoRBsYXLM Message-ID: Subject: Re: [PATCH] MMC/SD SPI-mode driver From: Adrian Chadd To: Aleksandr Rybalko Content-Type: text/plain; charset=ISO-8859-1 Cc: Dmytro , freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Apr 2013 22:28:11 -0000 On 6 April 2013 15:13, Aleksandr Rybalko wrote: > > Yeah, found :) > here it is http://zrouter.org/hg/FreeBSD/head/rev/a92b653f5b46 Yup. We just need a bit more wrapped around this. Ie, bringing it in/out of the SPI mode. The other question is how we implement it. You've implemented a "get block" device method. That's a very atheros chipset specific hack just to get accelerated flash IO. Is there perhaps a better way to approach this? What about the 8 versus 32 bit shifting that I see in the driver? Are we able to actually shift 32 bits at a time? Adrian From owner-freebsd-mips@FreeBSD.ORG Sat Apr 6 23:24:37 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CAC12EDD; Sat, 6 Apr 2013 23:24:37 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 85C3A74A; Sat, 6 Apr 2013 23:24:36 +0000 (UTC) Received: from rnote.ddteam.net (7-127-135-95.pool.ukrtel.net [95.135.127.7]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id E2B8BC4927; Sun, 7 Apr 2013 02:24:34 +0300 (EEST) Date: Sun, 7 Apr 2013 02:24:28 +0300 From: Aleksandr Rybalko To: Adrian Chadd Subject: Re: [PATCH] MMC/SD SPI-mode driver Message-Id: <20130407022428.86a66c6a.ray@freebsd.org> In-Reply-To: References: <20130407011307.9a9a9d64.ray@freebsd.org> Organization: FreeBSD.ORG X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) X-Operating-System: FreeBSD Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Dmytro , freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Apr 2013 23:24:37 -0000 On Sat, 6 Apr 2013 15:28:09 -0700 Adrian Chadd wrote: > On 6 April 2013 15:13, Aleksandr Rybalko wrote: > > > > > Yeah, found :) > > here it is http://zrouter.org/hg/FreeBSD/head/rev/a92b653f5b46 > > Yup. We just need a bit more wrapped around this. Ie, bringing it > in/out of the SPI mode. > > The other question is how we implement it. You've implemented a "get > block" device method. That's a very atheros chipset specific hack just > to get accelerated flash IO. Is there perhaps a better way to approach > this? As I see, no way to put data back to flash. > > What about the 8 versus 32 bit shifting that I see in the driver? Are > we able to actually shift 32 bits at a time? Currently we do 1 bit shifting :))) Pure, 1-bit control. Maybe you (as Atheros guy) know how to shift more :))) > > > Adrian -- Aleksandr Rybalko