
-----Original Message----- From: Valentin Longchamp [mailto:valentin.longchamp@keymile.com] Sent: 27 March 2012 18:58 To: Prafulla Wadaskar Cc: u-boot@lists.denx.de; Gerlando Falauto; Holger Brunck Subject: Re: [PATCH v2] spi/kirkwood: add weak functions board_spi_bus_claim/release
Prafulla,
On 03/26/2012 11:58 AM, Valentin Longchamp wrote:
Some kirkwood based boards may need to implement such function due
to
some HW designs.
I see no feedback from your side on this patch. I think you should go through the marvell tree:
- the spi_claim/release_bus function are already implemented in the
SPI subsystem
- this patch touches only a kirkwood driver
- there is no spi u-boot tree from what I see
Please keep me up to date about the status of this patch
Hi Valentin, I have gone through this patch and related implementation in your other patch_series. http://lists.denx.de/pipermail/u-boot/2012-March/120716.html
Basically spi_claim_bus and spi_release_bus are not supported in current Kirkwood spi driver. These are needed if someone wish to share the same interface pins with some other peripheral (that is your use case)
But this is not board specific whereas, it should be feature enhancement for Kirkwood spi driver.
You should add this support very similar to multiple CS pin selection support added to the Kirkwood driver, no external (board specific triggers needed)
Here are my suggestions: 1. Configure these mpps in your board specific files as NF pins. 2. Populate below logic for claim/release bus feature in Kirkwood spi driver. 2.a. When spi_claim_bus will be called, backup current mpps status and reconfigure these mpps for SPI in Kirkwood_spi driver. 2.b. When spi_release_bus will be called, reconfigure with backed up mfg as SPI pins 2.c. Add check for to avoid multiple claim for same bus
Regards.. Prafulla . . .