devsdspi: fix transmit, and make it smaller
authorAlan Cox <alan@linux.intel.com>
Sat, 31 Jan 2015 00:24:28 +0000 (00:24 +0000)
committerAlan Cox <alan@linux.intel.com>
Sat, 31 Jan 2015 00:24:28 +0000 (00:24 +0000)
Kernel/platform-socz80/devsdspi.c

index 1433b58..94fdf57 100644 (file)
@@ -107,18 +107,12 @@ bool sd_spi_transmit_sector(uint8_t drive) __naked
     or a       ; Set the Z flag up and save it, dont do it twice
     push af
     call nz,map_process_always
-    call tx256
-    call tx256
-    pop af
-    call nz,map_kernel
-    ret
-tx256:
     ld a,#0xFF
     ld bc, #SD_SPI_RX * 256
-tx256_1:
-    out (SD_SPI_TX),a   ; we could use (c),a on newer VHDL
-    outi
-    jr nz, tx256_1
+    otir
+    otir
+    pop af
+    call nz,map_kernel
     ret
   __endasm;
 }