arm: sunxi: Enable DM_MMC and DM_SCSI
[oweals/u-boot.git] / arch / arm / lib / uldivmod.S
index 426c2f2406c6635683690437a4d9f43bccd05712..5e9e136cc45d18c485dcd35c421808a22f1178b8 100644 (file)
@@ -1,18 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2010, Google Inc.
  *
  * Brought in from coreboot uldivmod.S
- *
- * SPDX-License-Identifier:     GPL-2.0
  */
 
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 
-/* We don't use Thumb instructions for now */
-#define ARM(x...)      x
-#define THUMB(x...)
-
 /*
  * A, Q = r0 + (r1 << 32)
  * B, R = r2 + (r3 << 32)
@@ -37,7 +32,9 @@ THUMB(
 TMP    .req    r8
 )
 
+.pushsection .text.__aeabi_uldivmod, "ax"
 ENTRY(__aeabi_uldivmod)
+
        stmfd   sp!, {r4, r5, r6, r7, THUMB(TMP,) lr}
        @ Test if B == 0
        orrs    ip, B_0, B_1            @ Z set -> B == 0
@@ -226,7 +223,9 @@ THUMB(      orrpl   A_0, A_0, TMP           )
        @ Shift A to the right by the appropriate amount.
        rsb     D_1, D_0, #32
        mov     Q_0, A_0, lsr D_0
-       orr     Q_0, A_1, lsl D_1
+ ARM(   orr     Q_0, Q_0, A_1, lsl D_1 )
+ THUMB(        lsl     A_1, D_1                )
+ THUMB(        orr     Q_0, A_1                )
        mov     Q_1, A_1, lsr D_0
        @ Move C to R
        mov     R_0, C_0
@@ -243,3 +242,4 @@ L_div_by_0:
        mov     R_1, #0
        ldmfd   sp!, {r4, r5, r6, r7, THUMB(TMP,) pc}
 ENDPROC(__aeabi_uldivmod)
+.popsection