Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CD3EC433F5 for ; Wed, 3 Nov 2021 13:16:49 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6FEB861076 for ; Wed, 3 Nov 2021 13:16:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6FEB861076 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A47738347E; Wed, 3 Nov 2021 14:16:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="HzVXYACx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2C46D83641; Wed, 3 Nov 2021 14:16:31 +0100 (CET) Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 519B48314A for ; Wed, 3 Nov 2021 14:16:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2d.google.com with SMTP id c206so1165105iof.2 for ; Wed, 03 Nov 2021 06:16:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Cln34PenP78cSvF/N3hgzEfXUJqis48Pt7HQf7f6TV0=; b=HzVXYACxZLO448KuxqZgpNau7k6sAItd+p1zLmXzk6jtZSozcZI/Dxk2xHspii6zVA D95pbv0BZuHyPZ8Z25IViOekR1m8KB+r8hD5ET+esd6cI1zmpyJbD7f7sBi/spQUyIKw RRt+KT5YLx9l8PwaNNSWCyOijFVPZmP2Jw9GI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Cln34PenP78cSvF/N3hgzEfXUJqis48Pt7HQf7f6TV0=; b=lnzTAWQZ9BpFxYaCRTTy8Dn40Pa2oAQo7qOM2ri03tNiqfY5le6QirQGgQh+C6w6Qm kOVW6K8ucuxqDXKWYoLZZj9aFYPetofXZ8p0AYnmx5JoWBKFZAxDiY10f1hXmp/4uDA4 ScOlUCjLe9IQt5675ireSoLYrjtNIgL+TzXqbbEDYiYkiKnVatIDNfrs06xFa9e4wPhm /mDKLb0tR4yhtvK0pyZIz9bTw6IuFFjqHvulBbJFUkGN2c0n/Fk8BmTd+hhkX9Cf6Pph VC9xBNW6NAdGer4ACAkuJv7FePF1gG50opbliiYrBMahELEfLyZauqadDwMjvCsKZ/05 RyCA== X-Gm-Message-State: AOAM532D2dVjKIjRiuFIfgR74scXfuYtpCS+sI9ttuh+Qi6zaZ60Yore C1nBT4+/5x+GfXMZF46b1g4CLFYigE2ulQ== X-Google-Smtp-Source: ABdhPJyQMhTQt1/mngfyqAb6Iv/3JqHaOO3HqKFHw6jR2W1SFeOIpVzjqo8409YAUaXJFfVHD3XUtw== X-Received: by 2002:a05:6602:2b0b:: with SMTP id p11mr31814008iov.62.1635945381741; Wed, 03 Nov 2021 06:16:21 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id k7sm978204iob.7.2021.11.03.06.16.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Nov 2021 06:16:21 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Albert Aribaud , Simon Glass , Chia-Wei Wang , Kunihiko Hayashi , Marek Vasut Subject: [PATCH 2/4] arm: Init the debug UART Date: Wed, 3 Nov 2021 07:16:06 -0600 Message-Id: <20211103131608.2213320-3-sjg@chromium.org> X-Mailer: git-send-email 2.33.1.1089.g2158813163f-goog In-Reply-To: <20211103131608.2213320-1-sjg@chromium.org> References: <20211103131608.2213320-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean At present we don't init the debug UART in the generic ARM code, but instead leave it to individual machines to handle. This is not the way it is supposed to work. Add the required init to the crt files. This ensures that the UART is available as early as possible and that the announcement appears when it should, if enabled. Signed-off-by: Simon Glass --- arch/arm/lib/crt0.S | 4 ++++ arch/arm/lib/crt0_64.S | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S index 956d258c9da..ba312901f33 100644 --- a/arch/arm/lib/crt0.S +++ b/arch/arm/lib/crt0.S @@ -109,6 +109,10 @@ ENTRY(_main) mov r9, r0 bl board_init_f_init_reserve +#if defined(CONFIG_DEBUG_UART) && CONFIG_IS_ENABLED(SERIAL) + bl debug_uart_init +#endif + #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_EARLY_BSS) CLEAR_BSS #endif diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S index 680e674fa33..611affb74ce 100644 --- a/arch/arm/lib/crt0_64.S +++ b/arch/arm/lib/crt0_64.S @@ -91,6 +91,10 @@ ENTRY(_main) mov x18, x0 bl board_init_f_init_reserve +#if defined(CONFIG_DEBUG_UART) && CONFIG_IS_ENABLED(SERIAL) + bl debug_uart_init +#endif + mov x0, #0 bl board_init_f -- 2.33.1.1089.g2158813163f-goog