Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2012 10:57:40 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        Patrick Kelsey <kelsey@ieee.org>
Cc:        freebsd-mips@freebsd.org
Subject:   Re: ar71xx SPI speed
Message-ID:  <CAJ-VmokkbJVV65xKEqdxiN8edkajBDc42iR9rd2uH1WZrnnoxA@mail.gmail.com>
In-Reply-To: <CAD44qMX9ndkmdmT4Ba-7vJetJDv1HkhDpoFXUHYFT-cfPW4c5g@mail.gmail.com>
References:  <CAD44qMX9ndkmdmT4Ba-7vJetJDv1HkhDpoFXUHYFT-cfPW4c5g@mail.gmail.com>

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

If you take a look at the source code, IIRC reads are done via the
hardware but the writes are done via bit banging.

Are you looking at SPI read, SPI write, or a mix of both?

You can increase the hardware SPI clock by correct fondling of the
right registers but I haven't got any spare cycles to go grovelling
through the AR7100 datasheet at the moment. Sorry. Poke me in a few
days.


Adrian

On 21 February 2012 14:22, Patrick Kelsey <kelsey@ieee.org> wrote:
> Hi,
>
> I've been doing some SPI-related work on an AR7161-based board (MikroTik
> Routerboard RB450G, CPU @ 680 MHz, DDR @ 340 MHz, AHB @ 170 MHz), and I'v=
e
> noticed, via both software cyclecount and logic analyzer traces, that the
> SPI bus clock tops out in the neighborhood of 7 MHz or so. =A0I can get a
> little more performance out of it if I manually unroll/debranch the loop =
in
> ar71xx_spi_txrx, but not terribly much. =A0The (closed source) boot loade=
r
> for this board manages something in the neighborhood of 8.5 MHz (perhaps
> due to not going through a bus abstraction layer in its code). =A08MHz-is=
h
> does seem a bit lethargic for an SoC with otherwise fast moving parts, bu=
t
> I don't have any technical documentation on which to base a meaningful
> expectation.
>
> I'm wondering if anyone has had any experience with this SPI controller
> that either corroborates or contradicts this apparent speed limit.
>
> Thanks,
> Patrick
> _______________________________________________
> 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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokkbJVV65xKEqdxiN8edkajBDc42iR9rd2uH1WZrnnoxA>