From patchwork Tue Nov 12 11:00:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Brugger X-Patchwork-Id: 1193424 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="kIMRf2fU"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 47C4Y22Xcfz9s7T for ; Tue, 12 Nov 2019 22:00:50 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id D087EC21CB1; Tue, 12 Nov 2019 11:00:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 869B4C21CB1; Tue, 12 Nov 2019 11:00:39 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E303BC21CB1; Tue, 12 Nov 2019 11:00:37 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id 69BEEC21C2C for ; Tue, 12 Nov 2019 11:00:37 +0000 (UTC) Received: from ziggy.de (unknown [37.223.138.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 181A9214E0; Tue, 12 Nov 2019 11:00:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573556435; bh=TLmsPuba24pySspzXL8K1IFePI9aMZt3uc1osB2oBXY=; h=From:To:Cc:Subject:Date:From; b=kIMRf2fUkJeoMRN1bTjVlPSL1zZJI1t9qdKxsGKbjQth+jZ36W3L9IrBkq8O6t+Yl pjWAy3kRh+n9LTwWB+6SEmlDVMKVneCi9pDVuK9nkkYsFZaqROYcg6Mod5F3vEjtvp STb+y24+DokhlUtwBGQ+xQbamf8BFtYW5wm+hdzQ= From: matthias.bgg@kernel.org To: u-boot@lists.denx.de, Alexander Graf , fvogt@suse.com, matthias.bgg@kernel.org Date: Tue, 12 Nov 2019 12:00:25 +0100 Message-Id: <20191112110029.847-1-matthias.bgg@kernel.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Cc: Matthias Brugger , "b'Alexander Graf \\ x00Andrei Gherzan \\ x00Berkus Decker \\ x00Fabian Vogt \\ x00Marek Vasut \\ x00Matthias Brugger \\ x00Stephen Warren" <"agraf@csgraf.deandrei@balena.ioberkus+github@metta.systemsfvogt@suse.commarek.vasut@gmail.commbrugger@suse.comswarren"@wwwdotorg.org> Subject: [U-Boot] [PATCH v3 0/4] RPi one binary for RPi3/4 and RPi1/2 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" From: Matthias Brugger In this series we prepare the RaspberryPi source code to be able to build one binary for RPi[3,4] and one for RPi[1,2]. To achieve this we need to set the IO base address on runtime. Apart from that, for arm64 we also need to set memory region correctly. This patches fix this stuff. With this we could create one binary for each armv7 and armv8 based RPis. There is still some work to do to create a unified config, which will be done in a later patch series. Changes in v3: - fix armv7 build Changes in v2: - push fw_dtb_pointer into the .data section - fix register access in reset_cpu() - rename BCM2838 to BCM2711 in the correct patch - push rpi_bcm283x_base into the .data section - Move mem_map out of assembly file - push mem_map into the .data section - update the members of mem_map inestead of the pointer Matthias Brugger (4): rpi: push fw_dtb_pointer in the .data section ARM: bcm283x: Move BCM283x_BASE to a global variable ARM: bcm283x: Set rpi_bcm283x_base at run-time ARM: bcm283x: Set memory map at run-time arch/arm/mach-bcm283x/Kconfig | 6 - arch/arm/mach-bcm283x/include/mach/base.h | 11 ++ arch/arm/mach-bcm283x/include/mach/mbox.h | 4 +- arch/arm/mach-bcm283x/include/mach/sdhci.h | 5 +- arch/arm/mach-bcm283x/include/mach/timer.h | 7 +- arch/arm/mach-bcm283x/include/mach/wdog.h | 5 +- arch/arm/mach-bcm283x/init.c | 140 +++++++++++++++++++++ arch/arm/mach-bcm283x/mbox.c | 1 + arch/arm/mach-bcm283x/reset.c | 20 ++- board/raspberrypi/rpi/lowlevel_init.S | 12 +- board/raspberrypi/rpi/rpi.c | 49 +------- include/configs/rpi.h | 4 + 12 files changed, 192 insertions(+), 72 deletions(-) create mode 100644 arch/arm/mach-bcm283x/include/mach/base.h