Skip to content
Snippets Groups Projects
Commit c032174f authored by Stefan Roese's avatar Stefan Roese Committed by Jagannadha Sutradharudu Teki
Browse files

spi: kirkwood_spi.c: Some fixes and cleanup


This patch introduces the clrsetbits_le32() accessor functions in the
kirkwood SPI driver. Note that it also includes a fix:

-	 writel(~KWSPI_CSN_ACT | KWSPI_SMEMRDY, &spireg->ctrl);
+	 writel(KWSPI_SMEMRDY, &spireg->ctrl);

Here the bit KWSPI_CSN_ACT (0x1) should have been cleared. Instead
0xfffffffe is written into this control register. This is the main
reason to use the clrsetbits() functions now. As they make clearing
bits much less error prone.

Additionally KWSPI_IRQUNMASK is not used in spi_cs_activate() and
spi_cs_deactivate() any more. Its the wrong macro but has the same
value as the correct one (KWSPI_CSN_ACT).

This is in preparation for use of this driver on the Marvell Armada XP
platform as well.

Signed-off-by: default avatarStefan Roese <sr@denx.de>
Acked-by: default avatarPrafulla Wadaskar <prafulla@marvell.com>
Tested-by: default avatarLuka Perkov <luka@openwrt.org>
Reviewed-by: default avatarJagannadha Sutradharudu Teki <jaganna@xilinx.com>
parent 75f698e5
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment