From mboxrd@z Thu Jan 1 00:00:00 1970 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 0CF1BC433EF for ; Fri, 6 May 2022 09:05:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D8AD583C28; Fri, 6 May 2022 11:05:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="lzAIrRJD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DF76583C28; Fri, 6 May 2022 11:05:37 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 84D7A81DD6 for ; Fri, 6 May 2022 11:05:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 28D13B8346E; Fri, 6 May 2022 09:05:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1F5FC385A8; Fri, 6 May 2022 09:05:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651827932; bh=dT69K8OIyILDyhC9vXf7Myeaz4bEEvWWl515DGinano=; h=From:To:Cc:Subject:Date:From; b=lzAIrRJDNHJ+19gPqh3HPKxCxqt2kj/QYM+Zx1n8XeHRIeqraMJLuW01XxDxhme3n gNtTfU5iB+g5B0nSoB9eknjSvFzvdiHo2mvPtkVQ2wd47AlWANYibQW1hDMfpWGyat AGd+97Lno0U/Q54FGrM7JKTIDpYXlHEn29sbMZaPORDSciv95oXIBfD4BWPuOC29Vy zT/DmsJmJhV7QjNPAvkxSpsN0bb++hOsGWPl2lVJTdUFTnGDonBMqUzRmV8uP/A1DC 15QlpZ5bxrCnWFi8sl2eW75iydNw9uShRyMotYOAIGisbRCJH666FSG0Z9f5cWfcj6 N19gVx1HWzVvg== Received: by pali.im (Postfix) id E050E1141; Fri, 6 May 2022 11:05:29 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese , Marek Behun Cc: u-boot@lists.denx.de Subject: [PATCH 0/5] arm: mvebu: turris_omnia: Fix hangup in debug UART Date: Fri, 6 May 2022 11:05:12 +0200 Message-Id: <20220506090517.5935-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean If proper U-Boot on Turris Omnia tries to print something on debug UART then CPU hangs. Reason is that debug UART in proper U-Boot for Turris Omnia has incorrect configuration of base register. Base register is different in SPL and also in different stages of proper U-Boot. Fix all these issues. Introduce new arch_very_early_init() ARM function which will be called at very early stage prior initialization of debug UART. Move code which moves internal mvebu registers to this function. And split configuration of DEBUG_UART_BASE into SPL and proper U-Boot to allow setting different values which matches current HW status. With all these changes, it is possible call "printf" function in Turris Omnia's board_early_init_f() function in both SPL and proper U-Boot. Pali Rohár (5): arm: Add new config option ARCH_VERY_EARLY_INIT arm: mvebu: Move internal registers in arch_very_early_init() function serial: Add new config option SPL_DEBUG_UART_BASE serial: ns16550: Add support for SPL_DEBUG_UART_BASE arm: mvebu: turris_omnia: Fix DEBUG_UART_BASE arch/arm/Kconfig | 6 ++++++ arch/arm/lib/crt0.S | 5 +++++ arch/arm/mach-mvebu/Kconfig | 1 + arch/arm/mach-mvebu/Makefile | 1 + arch/arm/mach-mvebu/cpu.c | 31 ------------------------------- arch/arm/mach-mvebu/lowlevel.S | 27 +++++++++++++++++++++++++++ configs/turris_omnia_defconfig | 3 ++- drivers/serial/Kconfig | 7 +++++++ drivers/serial/ns16550.c | 4 ++-- 9 files changed, 51 insertions(+), 34 deletions(-) create mode 100644 arch/arm/mach-mvebu/lowlevel.S -- 2.20.1