From patchwork Thu Mar 23 00:20:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1760063 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=LA99Sf3H; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=m0XkFvTE; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PhmH04lWPz247J for ; Thu, 23 Mar 2023 11:21:32 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 234ED85AC8; Thu, 23 Mar 2023 01:21:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.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; secure) header.d=mailbox.org header.i=@mailbox.org header.b="LA99Sf3H"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="m0XkFvTE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3951785925; Thu, 23 Mar 2023 01:21:14 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [IPv6:2001:67c:2050:0:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id ED65D85D6C for ; Thu, 23 Mar 2023 01:21:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.vasut+renesas@mailbox.org Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4PhmGQ5QsCz9slR; Thu, 23 Mar 2023 01:21:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1679530862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Tud9+HQdg2Xc8bzQqjifB4KalY11+sKIZAbqgQUMvVI=; b=LA99Sf3HXLgGedqVRMwBKte2LBGLZJBidPYa2Im2YCjKzyFiuL6kw0yd6stceF7dgC6y8t E8e0faT/kCJiq0AfEdfDJ0OJV6RKYtR4gHzz3BRKs8GhV7LI1go88BpfhA48FNudS+agKN V1iOff54pOPVZpjhAoGrwNAkrzczB2ms+qww5TU7Fpova7B1khPkKA7H77QZl90xcP1eVx CGU//rt2U6Yl/aNtX7YOeZ8bcL+jtGL7FJy/XyEnr/q618wr2nD9d6bv3hntSCqxjNplIq yi+pVXryrMjGuchq24nHas/+lkNgkuA7Y1/aATBSuRB/Z0LrqXB0QmpK9T7wlg== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1679530860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Tud9+HQdg2Xc8bzQqjifB4KalY11+sKIZAbqgQUMvVI=; b=m0XkFvTEt3k9/7cmSx7AWLXoNLQZL2g8qQkbm0sOJeq52w9jVZWZNFM4z8Mx4RK8T1HFsP QMjrcuEBkUSIzdFX2SVMIFV/H3Uu2cG1PjK1AVPrZSy+7RMgtB2KHwr9Uc01WvfgYqK1vT EpyjIkH40Ep1TIhM2byrpMvfjGHV0vQVuNlnZHiiLer6U4KTnjImgjuNlD8E+audEDBY3B lnqXtV/utLkwXKNiBxAEobkjMD+3W0IwZc4UH6KZBjWF1T0fhNfAPmO2CZr1HVAzbZ+tkV 6J9mhapjOn328rXf0Q2UkXdzdQ9ptI1R/zuOozFyjbljAZYVhhXkauzhYoQ1ag== To: u-boot@lists.denx.de Cc: Marek Vasut , Angelo Dureghello , Huan Wang , Simon Glass , Stefan Roese , Tom Rini Subject: [PATCH v2 3/3] arch: m68k: Add QEMU specific RAMBAR workaround Date: Thu, 23 Mar 2023 01:20:41 +0100 Message-Id: <20230323002041.46158-3-marek.vasut+renesas@mailbox.org> In-Reply-To: <20230323002041.46158-1-marek.vasut+renesas@mailbox.org> References: <20230323002041.46158-1-marek.vasut+renesas@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: d97bb945eca7ccb3c0f X-MBO-RS-META: njbymirf8k5nouhnn1mjt449nuus1g4e X-Rspamd-Queue-Id: 4PhmGQ5QsCz9slR 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.8 at phobos.denx.de X-Virus-Status: Clean The QEMU emulation of m68k does not support RAMBAR accesses, add Kconfig option which inhibits those accesses, so that U-Boot can be started in m68k QEMU for CI testing purpopses until QEMU emulation improves. Signed-off-by: Marek Vasut --- Cc: Angelo Dureghello Cc: Huan Wang Cc: Marek Vasut Cc: Simon Glass Cc: Stefan Roese Cc: Tom Rini --- V2: No change --- arch/m68k/Kconfig | 11 ++++++++++- arch/m68k/cpu/mcf52x2/start.S | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 32759cde47d..1911563e540 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -198,8 +198,17 @@ source "board/freescale/m5373evb/Kconfig" source "board/sysam/amcore/Kconfig" source "board/sysam/stmark2/Kconfig" +config M68K_QEMU + bool "Build with workarounds for incomplete QEMU emulation" + default n + help + QEMU 8.x currently does not implement RAMBAR accesses and + DMA timers. Enable this option for U-Boot CI purposes only + to skip the RAMBAR accesses. + config MCFTMR bool "Use DMA timer" - default y + default y if !M68K_QEMU + default n if M68K_QEMU endmenu diff --git a/arch/m68k/cpu/mcf52x2/start.S b/arch/m68k/cpu/mcf52x2/start.S index d48d0192eea..51d2e23df10 100644 --- a/arch/m68k/cpu/mcf52x2/start.S +++ b/arch/m68k/cpu/mcf52x2/start.S @@ -98,7 +98,7 @@ _start: nop move.w #0x2700,%sr -#if defined(CONFIG_M5208) +#if defined(CONFIG_M5208) && !defined(CONFIG_M68K_QEMU) /* Initialize RAMBAR: locate SRAM and validate it */ move.l #(CFG_SYS_INIT_RAM_ADDR + CFG_SYS_INIT_RAM_CTRL), %d0 movec %d0, %RAMBAR1 @@ -120,7 +120,7 @@ _start: movec %d0, %RAMBAR0 #endif /* CONFIG_M5272 || CONFIG_M5249 || CONFIG_M5253 */ -#if defined(CONFIG_M5282) || defined(CONFIG_M5271) +#if (defined(CONFIG_M5282) || defined(CONFIG_M5271)) && !defined(CONFIG_M68K_QEMU) /* set MBAR address + valid flag */ move.l #(CFG_SYS_MBAR + 1), %d0 move.l %d0, 0x40000000