From patchwork Mon Jun 10 09:28:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2696391 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 9C94ADF264 for ; Mon, 10 Jun 2013 09:22:54 +0000 (UTC) Received: from merlin.infradead.org ([205.233.59.134]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UlyJ4-0005G8-M4; Mon, 10 Jun 2013 09:22:32 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UlyIV-0005FD-D3; Mon, 10 Jun 2013 09:21:55 +0000 Received: from mail-pb0-x233.google.com ([2607:f8b0:400e:c01::233]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UlyIR-0005Ed-IE for linux-arm-kernel@lists.infradead.org; Mon, 10 Jun 2013 09:21:52 +0000 Received: by mail-pb0-f51.google.com with SMTP id um15so7044399pbc.10 for ; Mon, 10 Jun 2013 02:21:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=uIZtKcPVYlcA+W8Z+Vxb0x/dpiTZCu/FMZrGtIj0CjY=; b=AHB2bOO3EHMw990LgxNYKT8tJm8vYv7kK/g6dNnNjbrhIJmpTIaHeiCTK9who3/vss 9j/TmbuznuXyn7fSZl2TINxxFR7EqvFh3boQ2NPStLXiCDMW31yYPrwI4tFtxoDyraxp pdAWhTt+f414hm+kSXaata/01bUq9E8o0wF/7LHT6aix+S8IFo5qa4KpFISEiT9fvjfI 0+RjA4Lv64jalKuqM7xmLqclohpzhmrZV4vF51rMbdzIwj4Hz4eio/a/XYBpTrEt2IQj Oa3Xfa9NBvzX1qu1h2dyCwqQ+q/hDsQRtWt0FDvjdHDytyJvt20QoiztZHH+pWRN9cJX I/9w== X-Received: by 10.68.197.33 with SMTP id ir1mr8906333pbc.197.1370856087968; Mon, 10 Jun 2013 02:21:27 -0700 (PDT) Received: from [127.0.0.1] (ac230065.ppp.asahi-net.or.jp. [183.77.230.65]) by mx.google.com with ESMTPSA id fr1sm9783635pbb.26.2013.06.10.02.21.25 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 02:21:26 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Mon, 10 Jun 2013 18:28:57 +0900 Message-Id: <20130610092857.19175.25629.sendpatchset@w520> Subject: [PATCH v2] ARM: shmobile: uImage load address rework X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130610_052151_715186_2EF1E0CE X-CRM114-Status: UNSURE ( 8.86 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (magnus.damm[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: arnd@arndb.de, Magnus Damm , horms@verge.net.au, laurent.pinchart@ideasonboard.com, olof@lixom.net, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Magnus Damm This is V2 of the mach-shmobile uImage load address rework patch. Rework the mach-shmobile uImage load address calculation by storing the per-board load addresses in Makefile.boot. This removes the CONFIG_MEMORY_START dependency from Makefile.boot, and it also makes it possible to create safe kernel images that boot on multiple boards. This is one of several series of code that reworks code not to rely on CONFIG_MEMORY_START/SIZE which in turn is needed for ARCH_MULTIPLATFORM. Signed-off-by: Magnus Damm Reviewed-by: Laurent Pinchart Reviewed-by: Kuninori Morimoto --- Changes since V1: - On popular request, merged patch 5 and 14 and all other. - Updated the __ZRELADDR calculation, thanks Arnd! - Added Reviewed-by from Laurent and Morimoto-san, thanks! arch/arm/mach-shmobile/Makefile.boot | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) --- 0001/arch/arm/mach-shmobile/Makefile.boot +++ work/arch/arm/mach-shmobile/Makefile.boot 2013-06-10 16:15:22.000000000 +0900 @@ -1,6 +1,22 @@ -__ZRELADDR := $(shell /bin/bash -c 'printf "0x%08x" \ - $$[$(CONFIG_MEMORY_START) + 0x8000]') +# per-board load address for uImage +loadaddr-y := +loadaddr-$(CONFIG_MACH_AG5EVM) += 0x40008000 +loadaddr-$(CONFIG_MACH_AP4EVB) += 0x40008000 +loadaddr-$(CONFIG_MACH_APE6EVM) += 0x40008000 +loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000 +loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000 +loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 +loadaddr-$(CONFIG_MACH_BONITO) += 0x40008000 +loadaddr-$(CONFIG_MACH_KOTA2) += 0x41008000 +loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000 +loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 +loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 +loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 +loadaddr-$(CONFIG_MACH_MACKEREL) += 0x40008000 +loadaddr-$(CONFIG_MACH_MARZEN) += 0x60008000 +loadaddr-$(CONFIG_MACH_MARZEN_REFERENCE) += 0x60008000 +__ZRELADDR := $(sort $(loadaddr-y)) zreladdr-y += $(__ZRELADDR) # Unsupported legacy stuff