This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
AT91-SPI without 4to16decoder
- From: Sebastian Block <SebastianBlock at gmx dot net>
- To: ecos-patches at sources dot redhat dot com
- Cc: Andrew Lunn <andrew at lunn dot ch>
- Date: Thu, 11 Nov 2004 14:51:18 +0100
- Subject: AT91-SPI without 4to16decoder
Hi,
there is a little bug in the ChipSelect in cause it is the negation of what it
should be.
This is only if you have an AT91-Chip without an 4-to-16-Decoder on the
CS-PINs.
Attached is the patch-file.
Regards,
Sebastian
--- devs/spi/arm/at91/current/src/spi_at91.c 2004-10-13 22:16:21.000000000 +0200
+++ devs/spi/arm/at91/current/src/spi_at91.c 2004-11-11 14:45:49.000000000 +0100
@@ -266,7 +266,7 @@
AT91_SPI_PIO_NPCS(~dev->dev_num));
#else
HAL_WRITE_UINT32(AT91_SPI_PIO+AT91_PIO_CODR,
- AT91_SPI_PIO_NPCS((~(1<<dev->dev_num)) & 0x0F));
+ AT91_SPI_PIO_NPCS((1<<dev->dev_num)));
#endif
CYGACC_CALL_IF_DELAY_US(dev->cs_up_udly);