mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 01:51:33 +00:00
omap3_spi: introduce CONFIG_OMAP3_SPI_D0_D1_SWAPPED
D0/D1 Swapped or not is a board property, not anything specific to the am33xx SoC, so add a custom define for it. At the same time correct the bit handling for the swapped mode (DPE0 should be cleared and SI/DPE1 set). Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
This commit is contained in:
parent
8f1fae26a7
commit
22cbeed454
1 changed files with 5 additions and 6 deletions
|
@ -173,14 +173,13 @@ int spi_claim_bus(struct spi_slave *slave)
|
||||||
/* standard 4-wire master mode: SCK, MOSI/out, MISO/in, nCS
|
/* standard 4-wire master mode: SCK, MOSI/out, MISO/in, nCS
|
||||||
* REVISIT: this controller could support SPI_3WIRE mode.
|
* REVISIT: this controller could support SPI_3WIRE mode.
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_AM33XX
|
#ifdef CONFIG_OMAP3_SPI_D0_D1_SWAPPED
|
||||||
/*
|
/*
|
||||||
* The reference design on AM33xx has D0 and D1 wired up opposite
|
* Some boards have D0 wired as MOSI / D1 as MISO instead of
|
||||||
* of how it has been done on previous platforms. We assume that
|
* The normal D0 as MISO / D1 as MOSI.
|
||||||
* custom hardware will also follow this convention.
|
|
||||||
*/
|
*/
|
||||||
conf &= OMAP3_MCSPI_CHCONF_DPE0;
|
conf &= ~OMAP3_MCSPI_CHCONF_DPE0;
|
||||||
conf |= ~(OMAP3_MCSPI_CHCONF_IS|OMAP3_MCSPI_CHCONF_DPE1);
|
conf |= OMAP3_MCSPI_CHCONF_IS|OMAP3_MCSPI_CHCONF_DPE1;
|
||||||
#else
|
#else
|
||||||
conf &= ~(OMAP3_MCSPI_CHCONF_IS|OMAP3_MCSPI_CHCONF_DPE1);
|
conf &= ~(OMAP3_MCSPI_CHCONF_IS|OMAP3_MCSPI_CHCONF_DPE1);
|
||||||
conf |= OMAP3_MCSPI_CHCONF_DPE0;
|
conf |= OMAP3_MCSPI_CHCONF_DPE0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue