All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Schwarz <simonschwarzcor@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V7 6/7] omap3: new SPL structure support
Date: Fri, 29 Jul 2011 18:53:40 +0200	[thread overview]
Message-ID: <1311958421-9607-7-git-send-email-simonschwarzcor@gmail.com> (raw)
In-Reply-To: <1311958421-9607-1-git-send-email-simonschwarzcor@gmail.com>

Support for the new spl structure. Using the interface defined by Aneesh V for
OMAP4

Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com>
---
V1 changes:
ADD support for early console output in SPL

V2 changes:
ADD include omap_common.h in board.c
ADD implement new omap common interface omap_boot_device, omap_boot_mode and
    omap_rev_string (very basic)
CHG cosmetic
CHG Don't add ecc switch command in SPL
ADD save_boot_params stump with warning to implement it

V3 changes:
none

V4 changes:
CHG cosmetic - corrected style problem

V5 changes:
nothing

V6 changes:
nothing

V7 changes:
ADD copied config.mk from OMAP4 to OMAP3

Transition from V1 to V2 also includes that this patch is now based on
    - the new SPL layout by Aneesh V and Daniel Schwierzeck
    - the OMAP4 SPL patches by Aneesh V

This is in some parts a anccesstor of "[U-Boot,2/5] devkit8000 nand_spl: omap3
support nand_spl boot"
(http://article.gmane.org/gmane.comp.boot-loaders.u-boot/102114) in V1
---
 arch/arm/cpu/armv7/omap3/board.c            |   37 +++++++++++++++++++++++++-
 arch/arm/cpu/armv7/omap3/config.mk          |   30 +++++++++++++++++++++
 arch/arm/cpu/armv7/omap3/lowlevel_init.S    |    5 +++
 arch/arm/include/asm/arch-omap3/sys_proto.h |    1 +
 4 files changed, 71 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/omap3/config.mk

diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
index 4aaf97b..ee3285f 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/cpu/armv7/omap3/board.c
@@ -39,6 +39,7 @@
 #include <asm/cache.h>
 #include <asm/armv7.h>
 #include <asm/omap_gpio.h>
+#include <asm/omap_common.h>
 
 /* Declarations */
 extern omap3_sysinfo sysinfo;
@@ -56,6 +57,28 @@ static const struct gpio_bank gpio_bank_34xx[6] = {
 
 const struct gpio_bank *const omap_gpio_bank = gpio_bank_34xx;
 
+#ifdef CONFIG_SPL_BUILD
+/*
+* We use static variables because global data is not ready yet.
+* Initialized data is available in SPL right from the beginning.
+* We would not typically need to save these parameters in regular
+* U-Boot. This is needed only in SPL at the moment.
+*/
+u32 omap3_boot_device = BOOT_DEVICE_NAND;
+u32 omap3_boot_mode = NAND_MODE_HW_ECC;
+
+u32 omap_boot_device(void)
+{
+	return omap3_boot_device;
+}
+
+u32 omap_boot_mode(void)
+{
+	return omap3_boot_mode;
+}
+#endif /* CONFIG_SPL_BUILD */
+
+
 /******************************************************************************
  * Routine: delay
  * Description: spinning delay to use before udelay works
@@ -197,6 +220,10 @@ void s_init(void)
 
 	per_clocks_enable();
 
+#ifdef CONFIG_SPL_BUILD
+	preloader_console_init();
+#endif
+
 	if (!in_sdram)
 		mem_init();
 }
@@ -245,7 +272,7 @@ void abort(void)
 {
 }
 
-#ifdef CONFIG_NAND_OMAP_GPMC
+#if defined(CONFIG_NAND_OMAP_GPMC) & !defined(CONFIG_SPL_BUILD)
 /******************************************************************************
  * OMAP3 specific command to switch between NAND HW and SW ecc
  *****************************************************************************/
@@ -273,7 +300,7 @@ U_BOOT_CMD(
 	"[hw/sw] - Switch between NAND hardware (hw) or software (sw) ecc algorithm"
 );
 
-#endif /* CONFIG_NAND_OMAP_GPMC */
+#endif /* CONFIG_NAND_OMAP_GPMC & !CONFIG_SPL_BUILD */
 
 #ifdef CONFIG_DISPLAY_BOARDINFO
 /**
@@ -402,3 +429,9 @@ void v7_outer_cache_disable(void)
 	omap3_update_aux_cr(0, 0x2);
 }
 #endif
+
+void omap_rev_string(char *omap_rev_string)
+{
+	sprintf(omap_rev_string, "OMAP3, sorry revision detection" \
+		" unimplemented");
+}
diff --git a/arch/arm/cpu/armv7/omap3/config.mk b/arch/arm/cpu/armv7/omap3/config.mk
new file mode 100644
index 0000000..b34fa64
--- /dev/null
+++ b/arch/arm/cpu/armv7/omap3/config.mk
@@ -0,0 +1,30 @@
+#
+# Copyright 2011 Linaro Limited
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# (C) Copyright 2010
+# Texas Instruments, <www.ti.com>
+#
+# Aneesh V <aneesh@ti.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+ifdef CONFIG_SPL_BUILD
+ALL-y	+= $(OBJTREE)/MLO
+else
+ALL-y	+= $(obj)u-boot.img
+endif
diff --git a/arch/arm/cpu/armv7/omap3/lowlevel_init.S b/arch/arm/cpu/armv7/omap3/lowlevel_init.S
index 67e8ceb..48a7ec6 100644
--- a/arch/arm/cpu/armv7/omap3/lowlevel_init.S
+++ b/arch/arm/cpu/armv7/omap3/lowlevel_init.S
@@ -35,6 +35,11 @@
 _TEXT_BASE:
 	.word	CONFIG_SYS_TEXT_BASE	/* sdram load addr from config.mk */
 
+.global save_boot_params
+save_boot_params:
+	#warning "Please implement save_boot_params for OMAP3"
+	bx lr
+
 .global omap3_gp_romcode_call
 omap3_gp_romcode_call:
 	PUSH {r4-r12, lr} @ Save all registers from ROM code!
diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h
index 995e7cb..7b60051 100644
--- a/arch/arm/include/asm/arch-omap3/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap3/sys_proto.h
@@ -71,4 +71,5 @@ void power_init_r(void);
 void dieid_num_r(void);
 void do_omap3_emu_romcode_call(u32 service_id, u32 parameters);
 void omap3_gp_romcode_call(u32 service_id, u32 parameter);
+void omap_rev_string(char *omap_rev_string);
 #endif
-- 
1.7.4.1

  parent reply	other threads:[~2011-07-29 16:53 UTC|newest]

Thread overview: 134+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-28 14:14 [U-Boot] [0/5]devkit8000 nand_spl support simonschwarzcor at googlemail.com
2011-06-28 14:14 ` [U-Boot] [1/5]devkit8000 nand_spl: armv7 support nand_spl boot simonschwarzcor at googlemail.com
2011-06-29  8:27   ` Andreas Bießmann
2011-06-30 11:10     ` Aneesh V
2011-06-28 14:14 ` [U-Boot] [2/5]devkit8000 nand_spl: omap3 " simonschwarzcor at googlemail.com
2011-06-29  8:43   ` Andreas Bießmann
2011-06-30  9:06     ` Simon Schwarz
2011-06-30 10:38   ` Aneesh V
2011-06-28 14:14 ` [U-Boot] [3/5]devkit8000 nand_spl: Add RAM configuration independent of x-loader or CH simonschwarzcor at googlemail.com
2011-06-28 14:14 ` [U-Boot] [4/5]devkit8000 nand_spl: Add SPL NAND support to omap_gpmc driver simonschwarzcor at googlemail.com
2011-06-29  8:58   ` Andreas Bießmann
2011-06-30 11:01     ` Simon Schwarz
2011-06-28 14:14 ` [U-Boot] [5/5]devkit8000 nand_spl: add nand_spl support simonschwarzcor at googlemail.com
2011-06-28 15:01   ` Andreas Bießmann
2011-07-25 18:05 ` [U-Boot] [PATCH V2 0/5] OMAP3 and devkit8000 SPL support Simon Schwarz
2011-07-25 18:05   ` [U-Boot] [PATCH V2 1/5] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-07-25 18:05   ` [U-Boot] [PATCH V2 2/5] omap-common: add nand spl support Simon Schwarz
2011-07-26  6:07     ` Andreas Bießmann
2011-07-26  8:42       ` Simon Schwarz
2011-07-28  6:20         ` Aneesh V
2011-07-25 18:05   ` [U-Boot] [PATCH V2 3/5] nand spl: add NAND Library to new SPL Simon Schwarz
2011-07-26  5:59     ` Andreas Bießmann
2011-07-26  8:47       ` Simon Schwarz
2011-07-25 18:05   ` [U-Boot] [PATCH V2 4/5] omap3: new SPL structure support Simon Schwarz
2011-07-26  6:11     ` Andreas Bießmann
2011-07-25 18:05   ` [U-Boot] [PATCH V2 5/5] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-07-26  6:17     ` Andreas Bießmann
2011-07-26  9:09       ` Simon Schwarz
2011-07-26 10:22   ` [U-Boot] [PATCH V3 0/5] OMAP3 and devkit8000 SPL support Simon Schwarz
2011-07-26 10:22     ` [U-Boot] [PATCH V3 1/5] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-07-26 10:22     ` [U-Boot] [PATCH V3 2/5] omap-common: add nand spl support Simon Schwarz
2011-07-26 10:22     ` [U-Boot] [PATCH V3 3/5] nand spl: add NAND Library to new SPL Simon Schwarz
2011-07-26 10:22     ` [U-Boot] [PATCH V3 4/5] omap3: new SPL structure support Simon Schwarz
2011-07-26 10:22     ` [U-Boot] [PATCH V3 5/5] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-07-26 10:42       ` Andreas Bießmann
2011-07-26 12:34         ` Simon Schwarz
2011-07-26 11:04       ` Wolfgang Denk
2011-07-26 11:06     ` [U-Boot] [PATCH V3 0/5] OMAP3 and devkit8000 SPL support Wolfgang Denk
2011-07-26 12:31       ` Simon Schwarz
2011-07-26 12:09     ` [U-Boot] [PATCH V4 " Simon Schwarz
2011-07-26 12:09       ` [U-Boot] [PATCH V4 1/5] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-07-26 12:09       ` [U-Boot] [PATCH V4 2/5] omap-common: add nand spl support Simon Schwarz
2011-07-26 18:06         ` Scott Wood
     [not found]           ` <4E2FCF6E.10701@gmail.com>
     [not found]             ` <20110727163839.736d5bed@schlenkerla.am.freescale.net>
2011-07-28  7:51               ` Simon Schwarz
2011-07-28 18:56                 ` Scott Wood
2011-07-29  8:48                   ` Simon Schwarz
2011-07-26 12:09       ` [U-Boot] [PATCH V4 3/5] nand spl: add NAND Library to new SPL Simon Schwarz
2011-07-26 18:04         ` Scott Wood
2011-07-26 18:12           ` Scott Wood
2011-07-27  9:22           ` Simon Schwarz
2011-07-27 14:55             ` V, Aneesh
2011-07-27 22:01               ` Scott Wood
2011-07-28  7:27                 ` Aneesh V
2011-07-26 12:09       ` [U-Boot] [PATCH V4 4/5] omap3: new SPL structure support Simon Schwarz
2011-07-26 12:09       ` [U-Boot] [PATCH V4 5/5] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-07-27 12:50       ` [U-Boot] [PATCH V5 0/5] OMAP3 and devkit8000 SPL support Simon Schwarz
2011-07-27 12:50         ` [U-Boot] [PATCH V5 1/5] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-07-27 12:50         ` [U-Boot] [PATCH V5 2/5] omap-common: add nand spl support Simon Schwarz
2011-07-27 12:50         ` [U-Boot] [PATCH V5 3/5] nand spl: add NAND Library to new SPL Simon Schwarz
2011-07-27 12:50         ` [U-Boot] [PATCH V5 4/5] omap3: new SPL structure support Simon Schwarz
2011-07-27 12:50         ` [U-Boot] [PATCH V5 5/5] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-07-28  8:38         ` [U-Boot] [PATCH V6 0/5] OMAP3 and devkit8000 SPL support Simon Schwarz
2011-07-28  8:38           ` [U-Boot] [PATCH V6 1/5] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-07-28  8:50             ` Aneesh V
2011-07-28  9:42               ` Simon Schwarz
2011-07-29 16:53                 ` Simon Schwarz
2011-07-28  8:38           ` [U-Boot] [PATCH V6 2/5] omap-common: add nand spl support Simon Schwarz
2011-07-28  9:42             ` Aneesh V
2011-07-28 12:44               ` Simon Schwarz
2011-07-28 14:24                 ` Aneesh V
2011-07-28 14:34                   ` Simon Schwarz
2011-08-02 12:03               ` Simon Schwarz
2011-08-02 12:18                 ` Aneesh V
2011-08-02 12:30                   ` Simon Schwarz
2011-07-28  9:58             ` Aneesh V
2011-07-28 12:54               ` Simon Schwarz
2011-07-28 14:16             ` Aneesh V
2011-07-28 18:50               ` Scott Wood
2011-07-28 19:07                 ` Wolfgang Denk
2011-07-29  7:34                 ` Aneesh V
2011-07-29  8:19                   ` Simon Schwarz
2011-07-28  8:38           ` [U-Boot] [PATCH V6 3/5] nand spl: add NAND Library to new SPL Simon Schwarz
2011-07-28 11:54             ` Aneesh V
2011-07-28 14:04               ` Simon Schwarz
2011-07-28 16:18                 ` Aneesh V
2011-07-29 12:17                   ` Simon Schwarz
2011-07-28 19:16             ` Scott Wood
2011-07-29  9:12               ` Simon Schwarz
2011-07-29  9:27                 ` Wolfgang Denk
2011-07-29 12:27                   ` Simon Schwarz
2011-07-28  8:38           ` [U-Boot] [PATCH V6 4/5] omap3: new SPL structure support Simon Schwarz
2011-07-28  8:38           ` [U-Boot] [PATCH V6 5/5] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-07-28 10:51             ` Aneesh V
2011-07-28 11:54               ` Simon Schwarz
2011-07-29 16:53           ` [U-Boot] [PATCH V7 0/7] OMAP3 and devkit8000 SPL support Simon Schwarz
2011-07-29 16:53             ` [U-Boot] [PATCH V7 1/7] omap-common/omap4: relocate early UART clock setup Simon Schwarz
2011-07-29 16:53             ` [U-Boot] [PATCH V7 2/7] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-07-29 16:53             ` [U-Boot] [PATCH V7 3/7] omap-common: add nand spl support Simon Schwarz
2011-07-29 16:53             ` [U-Boot] [PATCH V7 4/7] spl: add NAND Library to new SPL Simon Schwarz
2011-08-01 17:58               ` Scott Wood
2011-08-02  8:15                 ` Simon Schwarz
2011-07-29 16:53             ` [U-Boot] [PATCH V7 5/7] spl: Add POWER library to new spl Simon Schwarz
2011-07-29 16:53             ` Simon Schwarz [this message]
2011-07-29 16:53             ` [U-Boot] [PATCH V7 7/7] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-08-01 16:23             ` [U-Boot] [PATCH V7 0/7] OMAP3 and devkit8000 SPL support Simon Schwarz
2011-08-02 15:59             ` [U-Boot] [PATCH V8 0/9] " Simon Schwarz
2011-08-02 15:59               ` [U-Boot] [PATCH V8 1/9] omap-common/omap4: relocate early UART clock setup Simon Schwarz
2011-08-02 15:59               ` [U-Boot] [PATCH V8 2/9] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-08-02 15:59               ` [U-Boot] [PATCH V8 3/9] omap-common: add nand spl support Simon Schwarz
2011-08-05  7:30                 ` Aneesh V
2011-08-08  7:50                   ` Simon Schwarz
2011-08-08  9:04                     ` Aneesh V
2011-08-02 15:59               ` [U-Boot] [PATCH V8 4/9] spl: add NAND Library to new SPL Simon Schwarz
2011-08-02 16:12                 ` Scott Wood
2011-08-02 15:59               ` [U-Boot] [PATCH V8 5/9] spl: Add POWER library to new spl Simon Schwarz
2011-08-02 15:59               ` [U-Boot] [PATCH V8 6/9] omap3: new SPL structure support Simon Schwarz
2011-08-02 15:59               ` [U-Boot] [PATCH V8 7/9] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-08-02 15:59               ` [U-Boot] [PATCH V8 8/9] omap3: implement boot parameter saving Simon Schwarz
2011-08-05  7:41                 ` Aneesh V
2011-08-08  8:03                   ` Simon Schwarz
2011-08-08  8:44                     ` Aneesh V
2011-08-08 10:59                       ` Simon Schwarz
2011-08-02 15:59               ` [U-Boot] [PATCH V8 9/9] omap-common: reorganize spl.c Simon Schwarz
2011-08-08 13:11               ` [U-Boot] [PATCH V9 0/9] OMAP3 and devkit8000 SPL support Simon Schwarz
2011-08-08 13:11                 ` [U-Boot] [PATCH V9 1/9] omap-common/omap4: relocate early UART clock setup Simon Schwarz
2011-08-08 13:11                 ` [U-Boot] [PATCH V9 2/9] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-08-08 13:11                 ` [U-Boot] [PATCH V9 3/9] omap-common: add nand spl support Simon Schwarz
2011-08-08 13:11                 ` [U-Boot] [PATCH V9 4/9] spl: add NAND Library to new SPL Simon Schwarz
2011-08-08 23:34                   ` Scott Wood
2011-08-08 13:11                 ` [U-Boot] [PATCH V9 5/9] spl: Add POWER library to new spl Simon Schwarz
2011-08-08 13:11                 ` [U-Boot] [PATCH V9 6/9] omap3: new SPL structure support Simon Schwarz
2011-08-08 13:11                 ` [U-Boot] [PATCH V9 7/9] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-08-08 13:11                 ` [U-Boot] [PATCH V9 8/9] omap3: implement boot parameter saving Simon Schwarz
2011-08-08 13:11                 ` [U-Boot] [PATCH V9 9/9] omap-common: reorganize spl.c Simon Schwarz

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=1311958421-9607-7-git-send-email-simonschwarzcor@gmail.com \
    --to=simonschwarzcor@googlemail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.