px4,sio: return the number of missed interrupts
authorAlan Cox <alan@linux.intel.com>
Sat, 28 Mar 2015 23:23:21 +0000 (23:23 +0000)
committerAlan Cox <alan@linux.intel.com>
Sat, 28 Mar 2015 23:23:21 +0000 (23:23 +0000)
Much cleaner than globals for it all

Kernel/platform-px4plus/sio-asm.s

index 8ace89e..df2a2f1 100644 (file)
@@ -4,6 +4,11 @@
 
                .module sioasm
 
+               .globl _sio_set_irq
+               .globl _sio_release_irq
+
+               .globl interrupt_handler
+
                .area _CODE
 
 _sio_set_irq:
@@ -16,16 +21,18 @@ _sio_set_irq:
        ld (0x0039), hl
        ret
 
+;
+;      Returns the number of missed interrupts in HL
+;
 _sio_release_irq:
        ld a, r
        push af
        di
        ld a, #0x0B                     ; FRC, ART and 7508
        out (4), a
-       ld hl, (_sio_count)
-       ld (_missed_interrupts), hl
        ld hl, #interrupt_handler
        ld (0x0039), hl
+       ld hl, (_sio_count)
        pop af
        ret po          ; CMOS
        ei
@@ -48,7 +55,5 @@ interrupt_fast:
            ret
 _sio_count:
            .db 0
-_missed_interrupts:
-           .db 0