public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/7] arm: mvebu: Add DM (driver model) support
Date: Thu,  3 Sep 2015 15:08:57 +0200	[thread overview]
Message-ID: <1441285740-23686-4-git-send-email-sr@denx.de> (raw)
In-Reply-To: <1441285740-23686-1-git-send-email-sr@denx.de>

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 <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Luka Perkov <luka.perkov@sartura.hr>
---
 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
-- 
2.5.1

  parent reply	other threads:[~2015-09-03 13:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03 13:08 [U-Boot] [PATCH 1/7] kwbimage: Align payload size to 4 bytes Stefan Roese
2015-09-03 13:08 ` [U-Boot] [PATCH 2/7] arm: mvebu: Do not call board_init_r() from board_init_f() Stefan Roese
2015-09-03 13:11   ` Marek Vasut
2015-09-04  0:58     ` Simon Glass
2015-09-03 13:08 ` [U-Boot] [PATCH 3/7] arm: mvebu: Add basic Armada XP / 38x dtsi/dts files Stefan Roese
2015-09-03 13:08 ` Stefan Roese [this message]
2015-09-03 13:08 ` [U-Boot] [PATCH 5/7] usb: ehci-marvell.c: Add DM support Stefan Roese
2015-09-03 13:12   ` Marek Vasut
2015-09-03 13:16     ` Stefan Roese
2015-09-03 14:26       ` Marek Vasut
2015-09-03 14:33         ` Stefan Roese
2015-09-03 14:37           ` Marek Vasut
2015-09-03 13:08 ` [U-Boot] [PATCH 6/7] arm: mvebu: Enable DM_USB on AXP / A38x boards Stefan Roese
2015-09-03 13:09 ` [U-Boot] [PATCH 7/7] arm: mvebu: Enable DM_SERIAL " Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441285740-23686-4-git-send-email-sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox