From: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>,
Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Mathias Duckeck
<m.duckeck-XB/JSsFECOqzQB+pC5nmwQ@public.gmane.org>,
Noralf Tronnes <noralf-L59+Z2yzLopAfugRpC6u6w@public.gmane.org>,
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Frank Pavlic <f.pavlic-XB/JSsFECOqzQB+pC5nmwQ@public.gmane.org>
Subject: Re: [PATCH 7/7] spi: bcm2835: Speed up FIFO access if fill level is known
Date: Tue, 13 Nov 2018 21:14:30 -0800 [thread overview]
Message-ID: <24cc735e-6810-02db-eff8-9361ace968b1@gmail.com> (raw)
In-Reply-To: <230536172.259102.1542136037433-uEpKuDZ350hmhno068Nerg@public.gmane.org>
On 11/13/2018 11:07 AM, Stefan Wahren wrote:
>> Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> hat am 13. November 2018 um 09:07 geschrieben:
>>
>>
>> On Sat, Nov 10, 2018 at 12:25:34PM +0100, Stefan Wahren wrote:
>>>> On 08.11.2018, at 08:06, Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> wrote:
>>>>> +#define BCM2835_SPI_FIFO_SIZE 64
>>>>> +#define BCM2835_SPI_FIFO_SIZE_3_4 48
>>>
>>> I only have doubts about the naming FIFO_SIZE_3_4 because it describe
>>> a fill level not a size.
>>
>> Hm, it's three quarters of the FIFO's size, so seems sufficiently apt?
>
> Just a thought because only from the define name i wouldn't think of three quarters first.
> Since i don't have a better solution, please go on.
Does this have to be a constant, or could we just go about defining a
macro which computes any percentage of that value (or quarter, which
ever is most convienent), e.g:
#define BCM2835_SPI_FIFO_SIZE_PCT(pct) \
((BCM2835_SPI_FIFO_SIZE * (pct)) / 100)
That might be clearer and more future proof in case you want to
implement a low watermark in the future?
--
Florian
next prev parent reply other threads:[~2018-11-14 5:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 7:06 [PATCH 0/7] Raspberry Pi spi0 improvements Lukas Wunner
[not found] ` <cover.1541659680.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-11-08 7:06 ` [PATCH 6/7] spi: bcm2835: Overcome sglist entry length limitation Lukas Wunner
[not found] ` <eb5ce210b06fb68580961038412f9499c3e56a76.1541659680.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-11-09 15:43 ` Stefan Wahren
2018-11-08 7:06 ` [PATCH 5/7] spi: bcm2835: Document struct bcm2835_spi Lukas Wunner
2018-11-08 7:06 ` [PATCH 2/7] spi: bcm2835: Fix book-keeping of DMA termination Lukas Wunner
2018-11-08 7:06 ` [PATCH 1/7] spi: bcm2835: Avoid finishing transfer prematurely in IRQ mode Lukas Wunner
2018-11-08 7:06 ` [PATCH 4/7] spi: bcm2835: Drop unused code for native Chip Select Lukas Wunner
[not found] ` <a24869503ed4e867b11c66c8615a4d5cddb3b2b5.1541659680.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-11-10 9:07 ` kernel-TqfNSX0MhmxHKSADF0wUEw
2018-11-08 7:06 ` [PATCH 7/7] spi: bcm2835: Speed up FIFO access if fill level is known Lukas Wunner
[not found] ` <901ff28c305e56d3349d3e044781c095d8e77a3d.1541659680.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-11-10 10:03 ` kernel-TqfNSX0MhmxHKSADF0wUEw
[not found] ` <807EBC97-54BD-49D5-86C8-3768FB4C0105-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2018-11-10 11:25 ` Stefan Wahren
[not found] ` <20181113080740.lrhfo656m7e4kb7a@wunner.de>
[not found] ` <20181113080740.lrhfo656m7e4kb7a-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-11-13 19:07 ` Stefan Wahren
[not found] ` <230536172.259102.1542136037433-uEpKuDZ350hmhno068Nerg@public.gmane.org>
2018-11-14 5:14 ` Florian Fainelli [this message]
[not found] ` <52205641.172367.1541849134970-uEpKuDZ350hmhno068Nerg@public.gmane.org>
2018-11-28 15:58 ` Mark Brown
2018-11-08 7:06 ` [PATCH 3/7] spi: bcm2835: Fix race on DMA termination Lukas Wunner
2018-11-10 9:13 ` [PATCH 0/7] Raspberry Pi spi0 improvements kernel-TqfNSX0MhmxHKSADF0wUEw
2018-11-14 5:12 ` Florian Fainelli
[not found] ` <20181114055121.5xpwxcu6a5qsgjqv@wunner.de>
[not found] ` <20181114055121.5xpwxcu6a5qsgjqv-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-11-16 5:11 ` Eric Anholt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=24cc735e-6810-02db-eff8-9361ace968b1@gmail.com \
--to=f.fainelli-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=f.pavlic-XB/JSsFECOqzQB+pC5nmwQ@public.gmane.org \
--cc=linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org \
--cc=m.duckeck-XB/JSsFECOqzQB+pC5nmwQ@public.gmane.org \
--cc=noralf-L59+Z2yzLopAfugRpC6u6w@public.gmane.org \
--cc=stefan.wahren-eS4NqCHxEME@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).