From patchwork Thu Jan 10 14:58:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 211056 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9F1FE2C00D8 for ; Fri, 11 Jan 2013 02:03:09 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4397B4A1C9; Thu, 10 Jan 2013 16:01:58 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QvkbyyLRJ7QA; Thu, 10 Jan 2013 16:01:58 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A99CB4A1CB; Thu, 10 Jan 2013 15:59:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EA2C84A15C for ; Thu, 10 Jan 2013 15:59:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PZFdiHU8bugj for ; Thu, 10 Jan 2013 15:59:25 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-yh0-f73.google.com (mail-yh0-f73.google.com [209.85.213.73]) by theia.denx.de (Postfix) with ESMTPS id 232574A15F for ; Thu, 10 Jan 2013 15:58:58 +0100 (CET) Received: by mail-yh0-f73.google.com with SMTP id 47so68646yhr.4 for ; Thu, 10 Jan 2013 06:58:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=9B1d8JAT/nwX4juembQEOJmEaQWGZb8jGuFr1aMFpgc=; b=AcHpztz4PNVcp/Et0QnEzguQg0HZtb325htEfv7AyKT9dSDfD8ZOQlxWHZYYTv+SM+ PQ+psN4l73i3D1vC6QZJ242c9oTjnX0UaegMQfk4HvdDl09RWhymFilGUgQH9XsrSwlN XOmxwAD8ZnSLzvtgwhuFfgAghosIPGJkewKC2BpydvtfZz7ZVXjr/7vzwkWuVUUeK7dv FrhUKNI+PbdsiSGBPxgNf1W/P/vzZRZX/6m4E0Nt20kwKNT+1TfCHlk7Xv4juPzyVzOC R9p3JpXgUPufikQdMPA1cIGGO22j8CLQ5ijqxW7wSVtaFFC3pxLhtNCwXcorAUY/HE9r yrIQ== X-Received: by 10.236.77.8 with SMTP id c8mr24495580yhe.50.1357829936293; Thu, 10 Jan 2013 06:58:56 -0800 (PST) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id r10si44098ann.1.2013.01.10.06.58.56 (version=TLSv1 cipher=AES128-SHA bits=128/128); Thu, 10 Jan 2013 06:58:56 -0800 (PST) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id D60F3100048; Thu, 10 Jan 2013 06:58:55 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 7E59716088F; Thu, 10 Jan 2013 06:58:55 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Thu, 10 Jan 2013 06:58:13 -0800 Message-Id: <1357829905-6579-11-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1357829905-6579-1-git-send-email-sjg@chromium.org> References: <1357829905-6579-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQkeYkiNbvJ9AtHUOfrqh3Ei4kjqvXHptrMGxxAGMaeya7HzKCqUWvYXa7ZvicL0DCGAelcnYNvtRnMFDvIt2VPGtCCXsH4hX/mL2jfPxzELeNCJuhFSnDfiOJ5gyiJ06ofHc9Qn7vaocBBXjAO46ZaTdtAdHkvy7FEBi9uGa+FbKMSD06lD1DsiNV5XJS5hYKgIOv4V Cc: Joe Hershberger , Tom Rini , Vadim Bendebury Subject: [U-Boot] [RFC PATCH 10/22] m68k: Use image_setup_linux() instead of local code X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Rather than having similar code in m68k, use image_setup_linux() which should be common across all architectures that use the FDT. Signed-off-by: Simon Glass Reviewed-by: Marek Vasut --- arch/m68k/lib/bootm.c | 15 +++------------ 1 files changed, 3 insertions(+), 12 deletions(-) diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c index d506d0c..56b6512 100644 --- a/arch/m68k/lib/bootm.c +++ b/arch/m68k/lib/bootm.c @@ -78,13 +78,6 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; - /* allocate space and init command line */ - ret = boot_get_cmdline (lmb, &cmd_start, &cmd_end); - if (ret) { - puts("ERROR with allocation of cmdline\n"); - goto error; - } - /* allocate space for kernel copy of board info */ ret = boot_get_kbd (lmb, &kbd); if (ret) { @@ -93,14 +86,12 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima } set_clocks_in_mhz(kbd); - kernel = (void (*)(bd_t *, ulong, ulong, ulong, ulong))images->ep; - - rd_len = images->rd_end - images->rd_start; - ret = boot_ramdisk_high (lmb, images->rd_start, rd_len, - &initrd_start, &initrd_end); + ret = image_setup_linux(images); if (ret) goto error; + kernel = (void (*)(bd_t *, ulong, ulong, ulong, ulong))images->ep; + debug("## Transferring control to Linux (at address %08lx) ...\n", (ulong) kernel);