dragon-nx32: More SPI fixes
authorTormod Volden <debian.tormod@gmail.com>
Tue, 3 Nov 2015 23:15:40 +0000 (00:15 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 7 Nov 2015 20:07:22 +0000 (20:07 +0000)
In particular, spaces in assembly operands are bad since the
assembler believes everything after a space is comments.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Kernel/platform-dragon-nx32/kernel.def
Kernel/platform-dragon-nx32/spi.s

index a10a5d9..09a171b 100644 (file)
@@ -12,10 +12,10 @@ IDEDATA                         equ 0xFF50
 IDEDATA_L                  equ 0xFF58
 
 SPIDATA                            equ 0xFF6C
-SPISTATUS                  equ SPIDATA + 1
+SPISTATUS                  equ SPIDATA+1
 SPICTRL                            equ SPISTATUS
-SPICLK                     equ SPICTRL + 1
-SPISIE                     equ SPICLK + 1
+SPICLK                     equ SPICTRL+1
+SPISIE                     equ SPICLK+1
 
 SPICS                      equ 0x01         ; hardcode SEL0 for now
 
index 3951f8a..816f87e 100644 (file)
@@ -27,13 +27,13 @@ _spi_setup:
        lda #0x0F
        sta SPISIE              ; selects off, IRQs off
        cmpa SPISIE
-       beq nospi
+       bne nospi
        lda SPIDATA             ; clear TC
        lda SPISTATUS
-       bpl nospi               ; TC not clear -> no spi present
+       bmi nospi               ; TC not clear -> no spi present
        sta SPIDATA             ; start a transmit, TC should now be clear
        lda SPISTATUS
-       bmi spigood
+       bpl spigood
 nospi: clrb
        rts
 spigood:
@@ -56,13 +56,13 @@ clkset:     std SPICTRL
 ;
 ;      For multiple cards these need to look at the card #
 ;
-_sd_spi_lower_cs:
+_sd_spi_raise_cs:
        lda SPISIE
        ora #SPICS
        sta SPISIE
        rts
 
-_sd_spi_raise_cs:
+_sd_spi_lower_cs:
        lda SPISIE
        anda #0xFF-SPICS
        sta SPISIE