public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Marek Behún" <kabel@kernel.org>
To: Stefan Roese <sr@denx.de>
Cc: u-boot@lists.denx.de, "Pali Rohár" <pali@kernel.org>,
	"Marek Behún" <marek.behun@nic.cz>
Subject: [PATCH u-boot-marvell 4/5] tools: kwboot: Replace ARM mov + movt instruction pair by mov + orr
Date: Wed, 27 Oct 2021 20:57:01 +0200	[thread overview]
Message-ID: <20211027185702.8186-5-kabel@kernel.org> (raw)
In-Reply-To: <20211027185702.8186-1-kabel@kernel.org>

From: Pali Rohár <pali@kernel.org>

Older Armada SoCs have custom ARMv5te compatible core which does not
support movt instruction. So replace mov + movt instruction pair used for
immediate move construction by mov + orr instructions which are supported
also by ARMv5te.

After this change kwboot ARM code should be compatible with any 32-bit ARM
core compatible by ARMv2 or new. At least GNU AS does not throw any error
or warning.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
---
 tools/kwboot.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/kwboot.c b/tools/kwboot.c
index 84294cadfe..62c218ef64 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
@@ -126,8 +126,8 @@ static unsigned char kwboot_baud_code[] = {
 	0xfe, 0x5f, 0x2d, 0xe9, /* push  { r1 - r12, lr }                     */
 
 				/*  ; r0 = UART_BASE                          */
-	0x02, 0x0a, 0xa0, 0xe3, /* mov   r0, #0x2000                          */
-	0x01, 0x00, 0x4d, 0xe3, /* movt  r0, #0xd001                          */
+	0x0d, 0x02, 0xa0, 0xe3, /* mov   r0, #0xd0000000                      */
+	0x12, 0x0a, 0x80, 0xe3, /* orr   r0, r0, #0x12000                     */
 
 				/*  ; r2 = address of preamble string         */
 	0xcc, 0x20, 0x8f, 0xe2, /* adr   r2, preamble                         */
-- 
2.32.0


  parent reply	other threads:[~2021-10-27 18:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 18:56 [PATCH u-boot-marvell 0/5] kwboot fix for AXP + some others Marek Behún
2021-10-27 18:56 ` [PATCH u-boot-marvell 1/5] tools: kwboot: Fix sending retry of last header packet Marek Behún
2021-11-03  5:37   ` Stefan Roese
2021-10-27 18:56 ` [PATCH u-boot-marvell 2/5] tools: kwboot: Do not call tcdrain() after each sent packet Marek Behún
2021-11-03  5:38   ` Stefan Roese
2021-10-27 18:57 ` [PATCH u-boot-marvell 3/5] tools: kwboot: Increase delay after changing baudrate in ARM code Marek Behún
2021-11-03  5:38   ` Stefan Roese
2021-10-27 18:57 ` Marek Behún [this message]
2021-11-03  5:38   ` [PATCH u-boot-marvell 4/5] tools: kwboot: Replace ARM mov + movt instruction pair by mov + orr Stefan Roese
2021-10-27 18:57 ` [PATCH u-boot-marvell 5/5] tools: kwboot: Do not use stack when setting baudrate back to default value Marek Behún
2021-11-03  5:38   ` Stefan Roese
2021-11-03  7:46 ` [PATCH u-boot-marvell 0/5] kwboot fix for AXP + some others Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211027185702.8186-5-kabel@kernel.org \
    --to=kabel@kernel.org \
    --cc=marek.behun@nic.cz \
    --cc=pali@kernel.org \
    --cc=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox