summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2022-08-11 22:27:23 +0200
committerTom Rini <trini@konsulko.com>2022-08-20 16:17:50 -0400
commit04bd87c24c31bbd8f27f6d1f7484c9a17f622c9a (patch)
treec324e1059f137fe952e2cd139548dc94cc3cea73 /board
parentc5be5f6f54893bce9b5f3e8e4b35e38c923fc069 (diff)
downloadu-boot-04bd87c24c31bbd8f27f6d1f7484c9a17f622c9a.tar.gz
u-boot-04bd87c24c31bbd8f27f6d1f7484c9a17f622c9a.tar.bz2
u-boot-04bd87c24c31bbd8f27f6d1f7484c9a17f622c9a.zip
Nokia RX-51: Simplify copy kernel code
Expression (r + (r0 - r1)) produce same result as (r - (r1 - r0)). So it does not matter which one is called. Always call the first option and remove second one. Signed-off-by: Pali Rohár <pali@kernel.org>
Diffstat (limited to 'board')
-rw-r--r--board/nokia/rx51/lowlevel_init.S7
1 files changed, 2 insertions, 5 deletions
diff --git a/board/nokia/rx51/lowlevel_init.S b/board/nokia/rx51/lowlevel_init.S
index dd3c830cc2..4f76e80b20 100644
--- a/board/nokia/rx51/lowlevel_init.S
+++ b/board/nokia/rx51/lowlevel_init.S
@@ -55,16 +55,13 @@ save_boot_params:
copy_kernel_start:
adr r0, relocaddr /* r0 - address of section relocaddr */
ldr r1, relocaddr /* r1 - address of relocaddr after relocation */
- cmp r0, r1
/* r4 - calculated offset */
- subhi r4, r0, r1
- sublo r4, r1, r0
+ sub r4, r0, r1
/* r0 - start of kernel before */
ldr r0, startaddr
- addhi r0, r0, r4
- sublo r0, r0, r4
+ add r0, r0, r4
ldr r1, kernoffs
add r0, r0, r1