linux-mips
[Top] [All Lists]

Re: [PATCH 2/2] SPI: ralink: add Ralink SoC spi driver

To: Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH 2/2] SPI: ralink: add Ralink SoC spi driver
From: John Crispin <blogic@openwrt.org>
Date: Tue, 13 Aug 2013 20:43:51 +0200
Cc: Gabor Juhos <juhosg@openwrt.org>, linux-spi@vger.kernel.org, linux-mips@linux-mips.org
In-reply-to: <20130811132642.GB6427@sirena.org.uk>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1376074288-29302-1-git-send-email-blogic@openwrt.org> <1376074288-29302-2-git-send-email-blogic@openwrt.org> <20130811132642.GB6427@sirena.org.uk>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12
Hi Mark,

Thanks for the review, I will send a V2 tomorrow, I want to verify my changes on real HW first.

a few comments inline ...

There is presumably a maximum transfer size here from the FIFO that is
holding the data?
The hardware is not running in DMA/IRQ mode and hence it can only read/write 1 byte at a time.

Set min_speed_hz in the spi_master and the core will check this for you.

it seems that min_speed is not handled by the core yet. I saw several drivers do minimum speed testing. I am leaving this code in the driver until there is a generic minimum speed check
clk_prepare_enable(), and it'd be nice to use runtime PM and enable the
clock only when doing transfers though that's not essential.


The clock is free running and always running.

    John



<Prev in Thread] Current Thread [Next in Thread>