zeta-v2: Tidy up devrd
authorWill Sowerbutts <will@sowerbutts.com>
Mon, 9 Jan 2017 01:51:18 +0000 (01:51 +0000)
committerWill Sowerbutts <will@sowerbutts.com>
Mon, 9 Jan 2017 01:51:37 +0000 (01:51 +0000)
Kernel/platform-zeta-v2/devrd_zeta2.c

index 2dd5e9e..9588060 100644 (file)
@@ -19,14 +19,12 @@ void rd_platform_copy(void)
 
     while(true){
         /* ensure transfer will not span a 16KB bank boundary */
-        if(count > 1){
-            maxcpy = ((uint16_t)rd_src_address) & 0x3FFF;
-            if((rd_dst_address & 0x3FFF) > maxcpy)
-                maxcpy = rd_dst_address & 0x3FFF;
-            maxcpy = 0x4000 - maxcpy;
-            if(rd_cpy_count > maxcpy)
-                rd_cpy_count = maxcpy;
-        }
+        maxcpy = ((uint16_t)rd_src_address) & 0x3FFF;
+        if((rd_dst_address & 0x3FFF) > maxcpy)
+            maxcpy = rd_dst_address & 0x3FFF;
+        maxcpy = 0x4000 - maxcpy;
+        if(rd_cpy_count > maxcpy)
+            rd_cpy_count = maxcpy;
 #ifdef DEBUG
         kprintf("rd_transfer: src=0x%lx, dst=0x%x(%s) reverse=%d count=%d\n",
                 rd_src_address, rd_dst_address, rd_dst_userspace?"user":"kern",