public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] SPI tranfer from a DSR
@ 2011-08-23 14:31 Andrew Parlane
  0 siblings, 0 replies; only message in thread
From: Andrew Parlane @ 2011-08-23 14:31 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I'm trying to write a driver for an NXP SC16IS740 SPI / I2C UART chip: 
http://www.nxp.com/documents/data_sheet/SC16IS740_750_760.pdf

I'm running on an AT91SAM7X512 (custom board), using the SPI interface.

When an interrupt occurs on the NXP chip, it asserts a GPIO line 
connected to the IRQ0 pin on the sam7. I've set up an interrupt handler 
for this in my driver. However when this occurs I need to perform an SPI 
transfer to read the IIR register to figure out what the interrupt is.

However in the ECOS reference on the SPI interface page: 
http://ecos.sourceware.org/docs-3.0/ref/spi-api.html It states that an 
SPI transfer should not be performed in an ISR or a DSR, for locking 
reasons and also we don't want to block a DSR.

So ideally we want to be able to start the transfer and then return from 
the DSR and get interrupted again when the transfer had finished.

Is there a nice way to do this without modifying the AT91 SPI driver?

Thanks,
Andrew


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-23 14:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-23 14:31 [ECOS] SPI tranfer from a DSR Andrew Parlane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).