[U-Boot] [PATCH v2] spi/kirkwood: add weak functions board_spi_bus_claim/release

Valentin Longchamp valentin.longchamp at keymile.com
Thu Mar 29 17:44:35 CEST 2012


Hi Prafulla,

On 03/29/2012 02:49 PM, Valentin Longchamp wrote:
> On 03/28/2012 09:48 AM, Prafulla Wadaskar wrote:
>> 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)
> 
> Correct, this is exactly our use case: we have the NAND Flash Controller and the
> SPI controller that share the same pins.
> 
>>
>> But this is not board specific whereas, it should be feature enhancement for Kirkwood spi driver.
> 
> This is correct for the mpp part of spi_claim_bus. If you look at the actual
> implementation that we do in our board specific function, there is an additional
> step that is needed by our board design.
> 

I have started to implement this, and now I see that with your approach of doing
the mpp part in the driver does not work and my proposed solution of doing this
with board specific functions is the correct one:

The SPI_SI, SPI_SCK, SPI_CSn all can be used with different mpp configuration.
This is a board design parameter. How can the driver know which one is used on
the board ?

Requesting all of them is not an option and adding some configuration would be a
significant effort while the problem is already tackled with the board specific
functions.

-- 
Valentin Longchamp
Embedded Software Engineer
Hardware and Chip Integration
______________________________________
KEYMILE AG
Schwarzenburgstr. 73
CH-3097 Liebefeld
Phone +41 31 377 1318
Fax   +41 31 377 1212
valentin.longchamp at keymile.com
www.keymile.com
______________________________________
KEYMILE: A Specialist as a Partner


More information about the U-Boot mailing list