From patchwork Tue Nov 11 00:16:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 409113 X-Patchwork-Delegate: sjg@chromium.org 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 25E8014010F for ; Tue, 11 Nov 2014 11:18:11 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 03E1B4B6BD; Tue, 11 Nov 2014 01:18:06 +0100 (CET) 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 qKWvCCYYpenn; Tue, 11 Nov 2014 01:18:05 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CB90E4B694; Tue, 11 Nov 2014 01:17:57 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BFF324B6AF for ; Tue, 11 Nov 2014 01:17:43 +0100 (CET) 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 py8iDYh9ycCF for ; Tue, 11 Nov 2014 01:17:43 +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-ig0-f201.google.com (mail-ig0-f201.google.com [209.85.213.201]) by theia.denx.de (Postfix) with ESMTPS id 605F14B69A for ; Tue, 11 Nov 2014 01:17:39 +0100 (CET) Received: by mail-ig0-f201.google.com with SMTP id h15so15888igd.0 for ; Mon, 10 Nov 2014 16:17:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rz4QOw4bC+YI2EvvAvf29ewLIYzDWfSC+KLhvL9uFKQ=; b=QThEXV/3+v5AYZSD3iabLQASzZZ+GIPMd9I5QdAfyiXDHguATdHQs+gJfrWqPLxS3D fPS4h10ckPji3RxeGsG87EXbVoupNFb0YxHQPL1rSJNxq8WgW/jjm0aMdx8iq6AX80sQ p2hEibyfkQ2PUskJlLFRu5mbkv/LsXOdzxPj/Em/yGH9Arj68aMakoA3Mbasyw4yHAc8 hbdQi6ant06QvH0HjeRai6jWUf8r+/ESsw5F08Xl26+sw/2b4H9Al8421JoGICM0Uzbf W7Jco3AYYiZuQMSThGohNsUK7hq6fepSFgGIOnwe/NaG4vyIT1EmyJUi1RnGl0Ff/XqZ BBBg== X-Gm-Message-State: ALoCoQko/8CNrXLpOxnjfbafRCSaqUi0XXEglN9Jnt2FCcvAfEwWIsG5mpacjcajO8QwXmKu0nFa X-Received: by 10.182.65.232 with SMTP id a8mr28300140obt.5.1415665058643; Mon, 10 Nov 2014 16:17:38 -0800 (PST) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id s23si746288yhf.0.2014.11.10.16.17.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Nov 2014 16:17:38 -0800 (PST) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTP id ylQPWqqb.1; Mon, 10 Nov 2014 16:17:38 -0800 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 31EDB221157; Mon, 10 Nov 2014 17:17:37 -0700 (MST) From: Simon Glass To: u-boot@lists.denx.de Date: Mon, 10 Nov 2014 17:16:46 -0700 Message-Id: <1415665015-12651-7-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1415665015-12651-1-git-send-email-sjg@chromium.org> References: <1415665015-12651-1-git-send-email-sjg@chromium.org> Cc: Stephen Warren , Tom Warren Subject: [U-Boot] [PATCH v3 06/14] dm: spl: Allow driver model to be used X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 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 When enabled, set up driver model for SPL. This allows SPL to use the same drivers as the main U-Boot. Signed-off-by: Simon Glass Acked-by: Tom Rini --- Changes in v3: None Changes in v2: None common/spl/spl.c | 5 +++++ scripts/Makefile.spl | 1 + 2 files changed, 6 insertions(+) diff --git a/common/spl/spl.c b/common/spl/spl.c index 341287a..aef1c22 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -7,6 +7,7 @@ * SPDX-License-Identifier: GPL-2.0+ */ #include +#include #include #include #include @@ -15,6 +16,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -142,6 +144,9 @@ void board_init_r(gd_t *dummy1, ulong dummy2) gd->malloc_limit = gd->malloc_base + CONFIG_SYS_MALLOC_F_LEN; gd->malloc_ptr = 0; #endif +#ifdef CONFIG_SPL_DM + dm_init_and_scan(true); +#endif #ifndef CONFIG_PPC /* diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 7afe437..20869fd 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -69,6 +69,7 @@ libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ libs-$(CONFIG_SPL_FRAMEWORK) += common/spl/ libs-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/ libs-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/ +libs-$(CONFIG_SPL_DM) += drivers/core/ libs-$(CONFIG_SPL_I2C_SUPPORT) += drivers/i2c/ libs-$(CONFIG_SPL_GPIO_SUPPORT) += drivers/gpio/ libs-$(CONFIG_SPL_MMC_SUPPORT) += drivers/mmc/