From patchwork Wed Jul 22 15:26:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 36855 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6MFUknd015285 for ; Wed, 22 Jul 2009 15:30:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751549AbZGVPan (ORCPT ); Wed, 22 Jul 2009 11:30:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751731AbZGVPam (ORCPT ); Wed, 22 Jul 2009 11:30:42 -0400 Received: from mail-bw0-f228.google.com ([209.85.218.228]:45066 "EHLO mail-bw0-f228.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751549AbZGVPam (ORCPT ); Wed, 22 Jul 2009 11:30:42 -0400 Received: by bwz28 with SMTP id 28so262210bwz.37 for ; Wed, 22 Jul 2009 08:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=zuC3jNG3Ut5ZII5cJM0dxRZnsse7Hft+RkbJhpCxdKs=; b=PNK/e8JveHnp5wc4kMeQGovtSVuggLA96VPPb4yI+59pmGQsvXvmXCzyma0N7DrDWy jXmeB7d/1Ub7iLWtRPck3kuY1CpK85djGx9FeOFX6W/cqxZX8NceB4N2crJyhLtCHNpv WOWeFp41RZBrg+z/ZXneb70YafpxmA8YAyVlI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=t1H/xOgZrxrX2bdDqbwI1vAoXLaIyQZn+5GVN71OH6vKfsA58N0O304Bqti8KqaOXE z82kYdtCLXxfCh2JTHvZVJza0vAHmsfReWbYBmjKQ0DV54KKu8KRsFoVIIY4S0C8FUia ytEqKhSnCE//J7K5ignUJrT3i9EFUItplCtws= Received: by 10.103.134.17 with SMTP id l17mr521172mun.125.1248276641114; Wed, 22 Jul 2009 08:30:41 -0700 (PDT) Received: from rx1.opensource.se (210.5.32.202.bf.2iij.net [202.32.5.210]) by mx.google.com with ESMTPS id 23sm2462286mun.13.2009.07.22.08.30.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 22 Jul 2009 08:30:39 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Thu, 23 Jul 2009 00:26:42 +0900 Message-Id: <20090722152642.18607.21007.sendpatchset@rx1.opensource.se> Subject: [PATCH] sh: allow board specific code in the zImage loader Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm This patch simply adds code to allow board specific assembly setup code in the zImage boot loader. Boards that support this mode should allow the user to enable this by selecting SYS_SUPPORTS_ZIMAGE_BOOT_LOADER. If SYS_SUPPORTS_ZIMAGE_BOOT_LOADER is selected then the board specific assembly file must be pointed out with ZIMAGE_BOOT_LOADER_FILE. The user can then use CONFIG_ZIMAGE_BOOT_LOADER to enable or disable board specific code in the zImage. Signed-off-by: Magnus Damm --- arch/sh/Kconfig | 15 +++++++++++++++ arch/sh/boot/compressed/head_32.S | 3 +++ 2 files changed, 18 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/arch/sh/Kconfig +++ work/arch/sh/Kconfig 2009-07-22 18:17:56.000000000 +0900 @@ -139,6 +139,9 @@ config SYS_SUPPORTS_MTU2 config SYS_SUPPORTS_TMU bool +config SYS_SUPPORTS_ZIMAGE_BOOT_LOADER + bool + config STACKTRACE_SUPPORT def_bool y @@ -766,6 +769,18 @@ config CMDLINE depends on CMDLINE_BOOL default "console=ttySC1,115200" +config ZIMAGE_BOOT_LOADER_FILE + string + depends on ZIMAGE_BOOT_LOADER + +config ZIMAGE_BOOT_LOADER + bool "Use zImage as boot loader" + depends on SYS_SUPPORTS_ZIMAGE_BOOT_LOADER + help + This option enables board specific code in the zImage boot loader. + + If unsure, say N. + endmenu menu "Bus options" --- 0001/arch/sh/boot/compressed/head_32.S +++ work/arch/sh/boot/compressed/head_32.S 2009-07-22 18:16:12.000000000 +0900 @@ -11,6 +11,9 @@ .global startup startup: +#ifdef CONFIG_ZIMAGE_BOOT_LOADER +#include CONFIG_ZIMAGE_BOOT_LOADER_FILE +#endif /* Load initial status register */ mov.l init_sr, r1 ldc r1, sr