Rev 4343 | Rev 4345 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4343 | Rev 4344 | ||
|---|---|---|---|
| Line 308... | Line 308... | ||
| 308 | } |
308 | } |
| 309 | 309 | ||
| 310 | /** |
310 | /** |
| 311 | * The driver works in polled mode, so no interrupt should be handled by it. |
311 | * The driver works in polled mode, so no interrupt should be handled by it. |
| 312 | */ |
312 | */ |
| 313 | static irq_ownership_t sgcn_claim(void *instance) |
313 | static irq_ownership_t sgcn_claim(irq_t *irq) |
| 314 | { |
314 | { |
| 315 | return IRQ_DECLINE; |
315 | return IRQ_DECLINE; |
| 316 | } |
316 | } |
| 317 | 317 | ||
| 318 | /** |
318 | /** |
| Line 379... | Line 379... | ||
| 379 | SGCN_BUFFER(char, SGCN_BUFFER_HEADER->in_rdptr); |
379 | SGCN_BUFFER(char, SGCN_BUFFER_HEADER->in_rdptr); |
| 380 | volatile uint32_t *in_wrptr_ptr = &(SGCN_BUFFER_HEADER->in_wrptr); |
380 | volatile uint32_t *in_wrptr_ptr = &(SGCN_BUFFER_HEADER->in_wrptr); |
| 381 | volatile uint32_t *in_rdptr_ptr = &(SGCN_BUFFER_HEADER->in_rdptr); |
381 | volatile uint32_t *in_rdptr_ptr = &(SGCN_BUFFER_HEADER->in_rdptr); |
| 382 | 382 | ||
| 383 | if (*in_rdptr_ptr != *in_wrptr_ptr) { |
383 | if (*in_rdptr_ptr != *in_wrptr_ptr) { |
| 384 | if (sgcn_irq.notif_cfg.notify && sgcn_irq.notif_cfg.answerbox) { |
- | |
| 385 | ipc_irq_send_notif(&sgcn_irq); |
384 | /* XXX: send notification to userspace */ |
| 386 | spinlock_unlock(&sgcn_irq.lock); |
- | |
| 387 | interrupts_restore(ipl); |
- | |
| 388 | spinlock_unlock(&sgcn_input_lock); |
- | |
| 389 | return; |
- | |
| 390 | } |
- | |
| 391 | } |
385 | } |
| 392 | 386 | ||
| 393 | spinlock_unlock(&sgcn_irq.lock); |
387 | spinlock_unlock(&sgcn_irq.lock); |
| 394 | interrupts_restore(ipl); |
388 | interrupts_restore(ipl); |
| 395 | 389 | ||