From patchwork Thu Sep 3 13:08:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 514054 X-Patchwork-Delegate: sr@denx.de 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 29B42140280 for ; Thu, 3 Sep 2015 23:09:21 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A45C44B7C1; Thu, 3 Sep 2015 15:09:14 +0200 (CEST) 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 GLodAuG6_VO5; Thu, 3 Sep 2015 15:09:14 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A7C814B7C2; Thu, 3 Sep 2015 15:09:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 892C14B764 for ; Thu, 3 Sep 2015 15:09:05 +0200 (CEST) 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 V8Dktb7mQEEw for ; Thu, 3 Sep 2015 15:09:05 +0200 (CEST) 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 mo4-p04-ob.smtp.rzone.de (mo4-p04-ob.smtp.rzone.de [81.169.146.177]) by theia.denx.de (Postfix) with ESMTPS id 25CF94B6A8 for ; Thu, 3 Sep 2015 15:09:02 +0200 (CEST) X-RZG-CLASS-ID: mo04 X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohfvxEndrDXKjzPMsB3oimjD61I4fPQhgcxWwS7w== Received: from stefan-work.domain_not_set.invalid (b9168fda.cgn.dg-w.de [185.22.143.218]) by post.strato.de (RZmta 37.12 SBL|AUTH) with ESMTPA id R06c36r83D91KRS; Thu, 3 Sep 2015 15:09:01 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Date: Thu, 3 Sep 2015 15:08:57 +0200 Message-Id: <1441285740-23686-4-git-send-email-sr@denx.de> X-Mailer: git-send-email 2.5.1 In-Reply-To: <1441285740-23686-1-git-send-email-sr@denx.de> References: <1441285740-23686-1-git-send-email-sr@denx.de> Cc: Luka Perkov Subject: [U-Boot] [PATCH 4/7] arm: mvebu: Add DM (driver model) support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch adds driver model support for some Marvell MVEBU SoC's. Including Armada XP and 38x. All 3 currently mainlined boards are converted. DM is now selected automatically for MVEBU platforms. With this DM support now available for MVEBU, hardcoding the base addresses and other information is not necessary any more. Probing should be done by using the values provided via the device tree now instead. For this the driver also need to be converted to DM. Patches for some of the drivers will follow. Signed-off-by: Stefan Roese Cc: Simon Glass Cc: Luka Perkov --- Makefile | 2 +- arch/arm/Kconfig | 3 +++ arch/arm/mach-mvebu/spl.c | 3 --- configs/db-88f6820-gp_defconfig | 1 + configs/db-mv784mp-gp_defconfig | 1 + configs/maxbcm_defconfig | 1 + 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d47e1ba..7372da8 100644 --- a/Makefile +++ b/Makefile @@ -918,7 +918,7 @@ ifdef CONFIG_MVEBU_BOOTROM_UARTBOOT u-boot-spl.kwb: u-boot.bin spl/u-boot-spl.bin FORCE $(call if_changed,mkimage) else -u-boot-spl.kwb: u-boot.img spl/u-boot-spl.bin FORCE +u-boot-spl.kwb: u-boot-dtb.img spl/u-boot-spl.bin FORCE $(call if_changed,mkimage) endif diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 226599f..8f5a0ea 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -113,6 +113,9 @@ config ARCH_MVEBU bool "Marvell MVEBU family (Armada XP/38x)" select CPU_V7 select SUPPORT_SPL + select OF_CONTROL + select OF_SEPARATE + select DM config TARGET_DEVKIT3250 bool "Support devkit3250" diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c index e273339..0ab729a 100644 --- a/arch/arm/mach-mvebu/spl.c +++ b/arch/arm/mach-mvebu/spl.c @@ -31,9 +31,6 @@ u32 spl_boot_mode(void) void board_init_f(ulong dummy) { - /* Set global data pointer */ - gd = &gdata; - #ifndef CONFIG_MVEBU_BOOTROM_UARTBOOT /* * Only call arch_cpu_init() when not returning to the diff --git a/configs/db-88f6820-gp_defconfig b/configs/db-88f6820-gp_defconfig index 24647ce..f2b1126 100644 --- a/configs/db-88f6820-gp_defconfig +++ b/configs/db-88f6820-gp_defconfig @@ -1,6 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_MVEBU=y CONFIG_TARGET_DB_88F6820_GP=y +CONFIG_DEFAULT_DEVICE_TREE="armada-388-gp" CONFIG_SPL=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set diff --git a/configs/db-mv784mp-gp_defconfig b/configs/db-mv784mp-gp_defconfig index 4e4da3c..df17dba 100644 --- a/configs/db-mv784mp-gp_defconfig +++ b/configs/db-mv784mp-gp_defconfig @@ -1,6 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_MVEBU=y CONFIG_TARGET_DB_MV784MP_GP=y +CONFIG_DEFAULT_DEVICE_TREE="armada-xp-gp" CONFIG_SPL=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set diff --git a/configs/maxbcm_defconfig b/configs/maxbcm_defconfig index 5957997..d49def1 100644 --- a/configs/maxbcm_defconfig +++ b/configs/maxbcm_defconfig @@ -1,6 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_MVEBU=y CONFIG_TARGET_MAXBCM=y +CONFIG_DEFAULT_DEVICE_TREE="armada-xp-gp" CONFIG_SPL=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set