Thread (17 messages) 17 messages, 4 authors, 2006-01-27

Re: Yosemite/440EP is there a global interrupt enable mask?

From: Eugene Surovegin <hidden>
Date: 2006-01-25 18:55:21

On Wed, Jan 25, 2006 at 10:30:30AM -0800, David Hawkins wrote:
Hi Stephan,
quoted
You seem to have used the wrong IRQ number though. Please see below.

You are using the "External IRQ 8". This results in IRQ number 19 of the 2nd 
interrupt controller of the 440ep. So please try (19+32) as the IRQ number 
upon requesting the interrupt.
Yep, that was it!

Now while looking at some of the other drivers, I noticed the use
of the following syntax:

   unsigned long flags;
   local_irq_save(flags);

   ... mfdcr, mtdcr, etc operations ...

   local_irq_restore(flags);

which is treating the operations on the DCRs as a critical section.

I should probably be doing the same when I enable the external IRQs
and modify the GPIO registers.
You have to use locks if you access GPIO registers, because other bits 
can be used by other device drivers, although there is no drivers in 
the official tree which use GPIO (I have tons of them in my private 
tree and I added global "gpio_lock" to serialize GPIO access).

DCRs are a little different, there are separate DCR for different 
peripherals, so generally, you don't have to use locks, because those 
DCR accesses are implicitly bound to particular device anyway and 
device "owns" them.

-- 
Eugene
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help