* [U-Boot] [RFC PATCH v2 00/12] *** SUBJECT HERE ***
[not found] <1321893227-19545-1-git-send-email-christian.riesch@omicron.at>
@ 2011-11-21 16:33 ` Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 01/12] arm, davinci: Move pinmux functions from board to arch tree Christian Riesch
` (11 subsequent siblings)
12 siblings, 0 replies; 23+ messages in thread
From: Christian Riesch @ 2011-11-21 16:33 UTC (permalink / raw)
To: u-boot
*** BLURB HERE ***
Christian Riesch (12):
arm, davinci: Move pinmux functions from board to arch tree
arm, hawkboard: Remove obsolete struct pinmux_config i2c_pins
arm, da850: Move the definitions of pinmux configurations to the arch
tree
arm, da830: Move the definitions of pinmux configurations to the arch
tree
arm, davinci: Remove duplication of pinmux configuration code
arm, davinci: Fix clear bss loop for zero length bss
arm: printf() is not available in some SPL configurations
sf: Add spi_boot() to allow booting from SPI flash in an SPL
arm, davinci: Add SPL support for DA850 SoCs
arm, da850evm: Add an SPL for SPI boot
mkimage: Fix variable length header support
arm, davinci: Add support for generating AIS images to the Makefile
.gitignore | 1 +
Makefile | 10 ++
arch/arm/cpu/arm926ejs/davinci/Makefile | 5 +-
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c | 36 +----
.../arm/cpu/arm926ejs/davinci/pinmux.c | 0
arch/arm/cpu/arm926ejs/davinci/spl.c | 34 +++++-
arch/arm/cpu/arm926ejs/start.S | 8 +-
arch/arm/include/asm/arch-davinci/da830_pinmux.h | 131 +++++++++++++++++
arch/arm/include/asm/arch-davinci/da850_pinmux.h | 152 ++++++++++++++++++++
arch/arm/include/asm/arch-davinci/hardware.h | 2 +
arch/arm/lib/eabi_compat.c | 3 +
board/davinci/common/Makefile | 2 +-
board/davinci/da8xxevm/config.mk | 5 +
board/davinci/da8xxevm/da830evm.c | 116 +--------------
board/davinci/da8xxevm/da850evm.c | 141 ++----------------
board/davinci/da8xxevm/hawkboard_nand_spl.c | 51 +-------
board/davinci/da8xxevm/u-boot-spl.lds | 73 ++++++++++
board/davinci/ea20/ea20.c | 2 -
doc/README.SPL | 1 +
drivers/mtd/spi/Makefile | 6 +
drivers/mtd/spi/spi_spl_load.c | 60 ++++++++
include/configs/da850evm.h | 53 +++++++-
include/spi_flash.h | 2 +
lib/Makefile | 2 +
nand_spl/board/davinci/da8xxevm/Makefile | 6 +-
tools/mkimage.c | 97 +++++++------
26 files changed, 622 insertions(+), 377 deletions(-)
rename board/davinci/common/davinci_pinmux.c => arch/arm/cpu/arm926ejs/davinci/pinmux.c (100%)
create mode 100644 arch/arm/include/asm/arch-davinci/da830_pinmux.h
create mode 100644 arch/arm/include/asm/arch-davinci/da850_pinmux.h
create mode 100644 board/davinci/da8xxevm/config.mk
create mode 100644 board/davinci/da8xxevm/u-boot-spl.lds
create mode 100644 drivers/mtd/spi/spi_spl_load.c
^ permalink raw reply [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 01/12] arm, davinci: Move pinmux functions from board to arch tree
[not found] <1321893227-19545-1-git-send-email-christian.riesch@omicron.at>
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 00/12] *** SUBJECT HERE *** Christian Riesch
@ 2011-11-21 16:33 ` Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 02/12] arm, hawkboard: Remove obsolete struct pinmux_config i2c_pins Christian Riesch
` (10 subsequent siblings)
12 siblings, 0 replies; 23+ messages in thread
From: Christian Riesch @ 2011-11-21 16:33 UTC (permalink / raw)
To: u-boot
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Syed Mohammed Khasim <sm.khasim@gmail.com>
Cc: Sughosh Ganu <urwithsughosh@gmail.com>
Cc: Nick Thompson <nick.thompson@gefanuc.com>
Cc: Stefano Babic <sbabic@denx.de>
---
arch/arm/cpu/arm926ejs/davinci/Makefile | 2 +-
.../arm/cpu/arm926ejs/davinci/pinmux.c | 0
arch/arm/include/asm/arch-davinci/hardware.h | 2 ++
board/davinci/common/Makefile | 2 +-
board/davinci/da8xxevm/da830evm.c | 2 --
board/davinci/da8xxevm/da850evm.c | 2 --
board/davinci/da8xxevm/hawkboard_nand_spl.c | 2 --
board/davinci/ea20/ea20.c | 2 --
nand_spl/board/davinci/da8xxevm/Makefile | 6 +++---
9 files changed, 7 insertions(+), 13 deletions(-)
rename board/davinci/common/davinci_pinmux.c => arch/arm/cpu/arm926ejs/davinci/pinmux.c (100%)
diff --git a/arch/arm/cpu/arm926ejs/davinci/Makefile b/arch/arm/cpu/arm926ejs/davinci/Makefile
index aeb058a..2105ec5 100644
--- a/arch/arm/cpu/arm926ejs/davinci/Makefile
+++ b/arch/arm/cpu/arm926ejs/davinci/Makefile
@@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(SOC).o
-COBJS-y += cpu.o timer.o psc.o
+COBJS-y += cpu.o timer.o psc.o pinmux.o
COBJS-$(CONFIG_DA850_LOWLEVEL) += da850_lowlevel.o
COBJS-$(CONFIG_SOC_DM355) += dm355.o
COBJS-$(CONFIG_SOC_DM365) += dm365.o
diff --git a/board/davinci/common/davinci_pinmux.c b/arch/arm/cpu/arm926ejs/davinci/pinmux.c
similarity index 100%
rename from board/davinci/common/davinci_pinmux.c
rename to arch/arm/cpu/arm926ejs/davinci/pinmux.c
diff --git a/arch/arm/include/asm/arch-davinci/hardware.h b/arch/arm/include/asm/arch-davinci/hardware.h
index 3e9a3b6..06819a6 100644
--- a/arch/arm/include/asm/arch-davinci/hardware.h
+++ b/arch/arm/include/asm/arch-davinci/hardware.h
@@ -480,6 +480,8 @@ struct davinci_syscfg_regs {
#define davinci_syscfg_regs \
((struct davinci_syscfg_regs *)DAVINCI_BOOTCFG_BASE)
+#define pinmux(x) (&davinci_syscfg_regs->pinmux[x])
+
/* Emulation suspend bits */
#define DAVINCI_SYSCFG_SUSPSRC_EMAC (1 << 5)
#define DAVINCI_SYSCFG_SUSPSRC_I2C (1 << 16)
diff --git a/board/davinci/common/Makefile b/board/davinci/common/Makefile
index 9d7b164..bc99da3 100644
--- a/board/davinci/common/Makefile
+++ b/board/davinci/common/Makefile
@@ -29,7 +29,7 @@ endif
LIB = $(obj)lib$(VENDOR).o
-COBJS := misc.o davinci_pinmux.o
+COBJS := misc.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
diff --git a/board/davinci/da8xxevm/da830evm.c b/board/davinci/da8xxevm/da830evm.c
index 2021e73..c45c94b 100644
--- a/board/davinci/da8xxevm/da830evm.c
+++ b/board/davinci/da8xxevm/da830evm.c
@@ -46,8 +46,6 @@
DECLARE_GLOBAL_DATA_PTR;
-#define pinmux(x) (&davinci_syscfg_regs->pinmux[x])
-
/* SPI0 pin muxer settings */
static const struct pinmux_config spi0_pins[] = {
{ pinmux(7), 1, 3 },
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index e0a3bbe..844e585 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -34,8 +34,6 @@
DECLARE_GLOBAL_DATA_PTR;
-#define pinmux(x) (&davinci_syscfg_regs->pinmux[x])
-
/* SPI0 pin muxer settings */
static const struct pinmux_config spi1_pins[] = {
{ pinmux(5), 1, 1 },
diff --git a/board/davinci/da8xxevm/hawkboard_nand_spl.c b/board/davinci/da8xxevm/hawkboard_nand_spl.c
index 32b17ce..0fdccac 100644
--- a/board/davinci/da8xxevm/hawkboard_nand_spl.c
+++ b/board/davinci/da8xxevm/hawkboard_nand_spl.c
@@ -32,8 +32,6 @@
DECLARE_GLOBAL_DATA_PTR;
-#define pinmux(x) (&davinci_syscfg_regs->pinmux[x])
-
static const struct pinmux_config mii_pins[] = {
{ pinmux(2), 8, 1 },
{ pinmux(2), 8, 2 },
diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c
index 720a360..9b6c4c0 100644
--- a/board/davinci/ea20/ea20.c
+++ b/board/davinci/ea20/ea20.c
@@ -40,8 +40,6 @@
DECLARE_GLOBAL_DATA_PTR;
-#define pinmux(x) (&davinci_syscfg_regs->pinmux[x])
-
static const struct da8xx_panel lcd_panel = {
/* Casio COM57H531x */
.name = "Casio_COM57H531x",
diff --git a/nand_spl/board/davinci/da8xxevm/Makefile b/nand_spl/board/davinci/da8xxevm/Makefile
index accf716..7b06cd2 100644
--- a/nand_spl/board/davinci/da8xxevm/Makefile
+++ b/nand_spl/board/davinci/da8xxevm/Makefile
@@ -42,7 +42,7 @@ SOBJS = _divsi3.o \
COBJS = cpu.o \
davinci_nand.o \
- davinci_pinmux.o \
+ pinmux.o \
div0.o \
hawkboard_nand_spl.o \
memsize.o \
@@ -78,9 +78,9 @@ $(nandobj)u-boot.lds: $(LDSCRIPT)
# create symbolic links for common files
# from board directory
-$(obj)davinci_pinmux.c:
+$(obj)pinmux.c:
@rm -f $@
- @ln -s $(TOPDIR)/board/davinci/common/davinci_pinmux.c $@
+ @ln -s $(TOPDIR)/arch/arm/cpu/arm926ejs/davinci/pinmux.c $@
# from drivers/mtd/nand directory
$(obj)davinci_nand.c:
--
1.7.0.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 02/12] arm, hawkboard: Remove obsolete struct pinmux_config i2c_pins
[not found] <1321893227-19545-1-git-send-email-christian.riesch@omicron.at>
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 00/12] *** SUBJECT HERE *** Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 01/12] arm, davinci: Move pinmux functions from board to arch tree Christian Riesch
@ 2011-11-21 16:33 ` Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 03/12] arm, da850: Move the definitions of pinmux configurations to the arch tree Christian Riesch
` (9 subsequent siblings)
12 siblings, 0 replies; 23+ messages in thread
From: Christian Riesch @ 2011-11-21 16:33 UTC (permalink / raw)
To: u-boot
The configuration in struct pinmux_config i2c_pins does not configure
the pins for i2c but for uart. Since this function is already
configured by struct pinmux_config uart2_pins the i2c_pins struct
is obsolete.
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Heiko Schocher <hs@denx.de>
Cc: Syed Mohammed Khasim <sm.khasim@gmail.com>
Cc: Sughosh Ganu <urwithsughosh@gmail.com>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
---
board/davinci/da8xxevm/hawkboard_nand_spl.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/board/davinci/da8xxevm/hawkboard_nand_spl.c b/board/davinci/da8xxevm/hawkboard_nand_spl.c
index 0fdccac..fd130fa 100644
--- a/board/davinci/da8xxevm/hawkboard_nand_spl.c
+++ b/board/davinci/da8xxevm/hawkboard_nand_spl.c
@@ -71,15 +71,9 @@ static const struct pinmux_config uart2_pins[] = {
{ pinmux(4), 2, 5 }
};
-static const struct pinmux_config i2c_pins[] = {
- { pinmux(4), 2, 4 },
- { pinmux(4), 2, 5 }
-};
-
static const struct pinmux_resource pinmuxes[] = {
PINMUX_ITEM(mii_pins),
PINMUX_ITEM(mdio_pins),
- PINMUX_ITEM(i2c_pins),
PINMUX_ITEM(nand_pins),
PINMUX_ITEM(uart2_pins),
};
--
1.7.0.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 03/12] arm, da850: Move the definitions of pinmux configurations to the arch tree
[not found] <1321893227-19545-1-git-send-email-christian.riesch@omicron.at>
` (2 preceding siblings ...)
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 02/12] arm, hawkboard: Remove obsolete struct pinmux_config i2c_pins Christian Riesch
@ 2011-11-21 16:33 ` Christian Riesch
2011-11-21 19:03 ` Mike Frysinger
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 04/12] arm, da830: " Christian Riesch
` (8 subsequent siblings)
12 siblings, 1 reply; 23+ messages in thread
From: Christian Riesch @ 2011-11-21 16:33 UTC (permalink / raw)
To: u-boot
The boards in board/davinci/da8xxevm/ define pinmux_config[] vectors
that contain pinmux configurations for emac, uarts, memory controllers...
This patch moves common configurations to a header file in the
arch tree for the da850evm and the hawkboard.
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Syed Mohammed Khasim <sm.khasim@gmail.com>
Cc: Sughosh Ganu <urwithsughosh@gmail.com>
---
arch/arm/include/asm/arch-davinci/da850_pinmux.h | 152 ++++++++++++++++++++++
board/davinci/da8xxevm/da850evm.c | 135 ++------------------
board/davinci/da8xxevm/hawkboard_nand_spl.c | 43 +------
3 files changed, 165 insertions(+), 165 deletions(-)
create mode 100644 arch/arm/include/asm/arch-davinci/da850_pinmux.h
diff --git a/arch/arm/include/asm/arch-davinci/da850_pinmux.h b/arch/arm/include/asm/arch-davinci/da850_pinmux.h
new file mode 100644
index 0000000..53df3f7
--- /dev/null
+++ b/arch/arm/include/asm/arch-davinci/da850_pinmux.h
@@ -0,0 +1,152 @@
+/*
+ * Pinmux configurations for the DA850 SoCs
+ *
+ * Copyright (C) 2011 OMICRON electronics GmbH
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __ASM_ARCH_DA850_PINMUX_H
+#define __ASM_ARCH_DA850_PINMUX_H
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/davinci_misc.h>
+
+/* SPI pin muxer settings */
+const struct pinmux_config spi1_pins[] = {
+ { pinmux(5), 1, 1 },
+ { pinmux(5), 1, 2 },
+ { pinmux(5), 1, 4 },
+ { pinmux(5), 1, 5 }
+};
+
+/* UART pin muxer settings */
+const struct pinmux_config uart2_pins[] = {
+ { pinmux(0), 4, 6 },
+ { pinmux(0), 4, 7 },
+ { pinmux(4), 2, 4 },
+ { pinmux(4), 2, 5 }
+};
+
+/* EMAC pin muxer settings*/
+const struct pinmux_config emac_pins[] = {
+#ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
+ { pinmux(14), 8, 2 },
+ { pinmux(14), 8, 3 },
+ { pinmux(14), 8, 4 },
+ { pinmux(14), 8, 5 },
+ { pinmux(14), 8, 6 },
+ { pinmux(14), 8, 7 },
+ { pinmux(15), 8, 1 },
+#else /* ! CONFIG_DRIVER_TI_EMAC_USE_RMII */
+ { pinmux(2), 8, 1 },
+ { pinmux(2), 8, 2 },
+ { pinmux(2), 8, 3 },
+ { pinmux(2), 8, 4 },
+ { pinmux(2), 8, 5 },
+ { pinmux(2), 8, 6 },
+ { pinmux(2), 8, 7 },
+ { pinmux(3), 8, 0 },
+ { pinmux(3), 8, 1 },
+ { pinmux(3), 8, 2 },
+ { pinmux(3), 8, 3 },
+ { pinmux(3), 8, 4 },
+ { pinmux(3), 8, 5 },
+ { pinmux(3), 8, 6 },
+ { pinmux(3), 8, 7 },
+#endif /* CONFIG_DRIVER_TI_EMAC_USE_RMII */
+ { pinmux(4), 8, 0 },
+ { pinmux(4), 8, 1 }
+};
+
+/* I2C pin muxer settings */
+const struct pinmux_config i2c0_pins[] = {
+ { pinmux(4), 2, 2 },
+ { pinmux(4), 2, 3 }
+};
+
+const struct pinmux_config i2c1_pins[] = {
+ { pinmux(4), 4, 4 },
+ { pinmux(4), 4, 5 }
+};
+
+/* NAND pin muxer settings */
+const struct pinmux_config nand_pins[] = {
+ { pinmux(7), 1, 1 },
+ { pinmux(7), 1, 2 },
+ { pinmux(7), 1, 4 },
+ { pinmux(7), 1, 5 },
+ { pinmux(9), 1, 0 },
+ { pinmux(9), 1, 1 },
+ { pinmux(9), 1, 2 },
+ { pinmux(9), 1, 3 },
+ { pinmux(9), 1, 4 },
+ { pinmux(9), 1, 5 },
+ { pinmux(9), 1, 6 },
+ { pinmux(9), 1, 7 },
+ { pinmux(12), 1, 5 },
+ { pinmux(12), 1, 6 }
+};
+
+/* NOR pin muxer settings */
+const struct pinmux_config nor_pins[] = {
+ { pinmux(5), 1, 6 },
+ { pinmux(6), 1, 6 },
+ { pinmux(7), 1, 0 },
+ { pinmux(7), 1, 4 },
+ { pinmux(7), 1, 5 },
+ { pinmux(8), 1, 0 },
+ { pinmux(8), 1, 1 },
+ { pinmux(8), 1, 2 },
+ { pinmux(8), 1, 3 },
+ { pinmux(8), 1, 4 },
+ { pinmux(8), 1, 5 },
+ { pinmux(8), 1, 6 },
+ { pinmux(8), 1, 7 },
+ { pinmux(9), 1, 0 },
+ { pinmux(9), 1, 1 },
+ { pinmux(9), 1, 2 },
+ { pinmux(9), 1, 3 },
+ { pinmux(9), 1, 4 },
+ { pinmux(9), 1, 5 },
+ { pinmux(9), 1, 6 },
+ { pinmux(9), 1, 7 },
+ { pinmux(10), 1, 0 },
+ { pinmux(10), 1, 1 },
+ { pinmux(10), 1, 2 },
+ { pinmux(10), 1, 3 },
+ { pinmux(10), 1, 4 },
+ { pinmux(10), 1, 5 },
+ { pinmux(10), 1, 6 },
+ { pinmux(10), 1, 7 },
+ { pinmux(11), 1, 0 },
+ { pinmux(11), 1, 1 },
+ { pinmux(11), 1, 2 },
+ { pinmux(11), 1, 3 },
+ { pinmux(11), 1, 4 },
+ { pinmux(11), 1, 5 },
+ { pinmux(11), 1, 6 },
+ { pinmux(11), 1, 7 },
+ { pinmux(12), 1, 0 },
+ { pinmux(12), 1, 1 },
+ { pinmux(12), 1, 2 },
+ { pinmux(12), 1, 3 },
+ { pinmux(12), 1, 4 },
+ { pinmux(12), 1, 5 },
+ { pinmux(12), 1, 6 },
+ { pinmux(12), 1, 7 }
+};
+
+#endif
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index 844e585..7bc16e7 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -28,135 +28,14 @@
#include <asm/arch/hardware.h>
#include <asm/arch/emif_defs.h>
#include <asm/arch/emac_defs.h>
+#include <asm/arch/da850_pinmux.h>
#include <asm/io.h>
#include <asm/arch/davinci_misc.h>
#include <hwconfig.h>
DECLARE_GLOBAL_DATA_PTR;
-/* SPI0 pin muxer settings */
-static const struct pinmux_config spi1_pins[] = {
- { pinmux(5), 1, 1 },
- { pinmux(5), 1, 2 },
- { pinmux(5), 1, 4 },
- { pinmux(5), 1, 5 }
-};
-
-/* UART pin muxer settings */
-static const struct pinmux_config uart_pins[] = {
- { pinmux(0), 4, 6 },
- { pinmux(0), 4, 7 },
- { pinmux(4), 2, 4 },
- { pinmux(4), 2, 5 }
-};
-
#ifdef CONFIG_DRIVER_TI_EMAC
-static const struct pinmux_config emac_pins[] = {
-#ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
- { pinmux(14), 8, 2 },
- { pinmux(14), 8, 3 },
- { pinmux(14), 8, 4 },
- { pinmux(14), 8, 5 },
- { pinmux(14), 8, 6 },
- { pinmux(14), 8, 7 },
- { pinmux(15), 8, 1 },
-#else /* ! CONFIG_DRIVER_TI_EMAC_USE_RMII */
- { pinmux(2), 8, 1 },
- { pinmux(2), 8, 2 },
- { pinmux(2), 8, 3 },
- { pinmux(2), 8, 4 },
- { pinmux(2), 8, 5 },
- { pinmux(2), 8, 6 },
- { pinmux(2), 8, 7 },
- { pinmux(3), 8, 0 },
- { pinmux(3), 8, 1 },
- { pinmux(3), 8, 2 },
- { pinmux(3), 8, 3 },
- { pinmux(3), 8, 4 },
- { pinmux(3), 8, 5 },
- { pinmux(3), 8, 6 },
- { pinmux(3), 8, 7 },
-#endif /* CONFIG_DRIVER_TI_EMAC_USE_RMII */
- { pinmux(4), 8, 0 },
- { pinmux(4), 8, 1 }
-};
-
-/* I2C pin muxer settings */
-static const struct pinmux_config i2c_pins[] = {
- { pinmux(4), 2, 2 },
- { pinmux(4), 2, 3 }
-};
-
-#ifdef CONFIG_NAND_DAVINCI
-const struct pinmux_config nand_pins[] = {
- { pinmux(7), 1, 1 },
- { pinmux(7), 1, 2 },
- { pinmux(7), 1, 4 },
- { pinmux(7), 1, 5 },
- { pinmux(9), 1, 0 },
- { pinmux(9), 1, 1 },
- { pinmux(9), 1, 2 },
- { pinmux(9), 1, 3 },
- { pinmux(9), 1, 4 },
- { pinmux(9), 1, 5 },
- { pinmux(9), 1, 6 },
- { pinmux(9), 1, 7 },
- { pinmux(12), 1, 5 },
- { pinmux(12), 1, 6 }
-};
-#elif defined(CONFIG_USE_NOR)
-/* NOR pin muxer settings */
-const struct pinmux_config nor_pins[] = {
- /* GP0[11] is required for NOR to work on Rev 3 EVMs */
- { pinmux(0), 8, 4 }, /* GP0[11] */
- { pinmux(5), 1, 6 },
- { pinmux(6), 1, 6 },
- { pinmux(7), 1, 0 },
- { pinmux(7), 1, 4 },
- { pinmux(7), 1, 5 },
- { pinmux(8), 1, 0 },
- { pinmux(8), 1, 1 },
- { pinmux(8), 1, 2 },
- { pinmux(8), 1, 3 },
- { pinmux(8), 1, 4 },
- { pinmux(8), 1, 5 },
- { pinmux(8), 1, 6 },
- { pinmux(8), 1, 7 },
- { pinmux(9), 1, 0 },
- { pinmux(9), 1, 1 },
- { pinmux(9), 1, 2 },
- { pinmux(9), 1, 3 },
- { pinmux(9), 1, 4 },
- { pinmux(9), 1, 5 },
- { pinmux(9), 1, 6 },
- { pinmux(9), 1, 7 },
- { pinmux(10), 1, 0 },
- { pinmux(10), 1, 1 },
- { pinmux(10), 1, 2 },
- { pinmux(10), 1, 3 },
- { pinmux(10), 1, 4 },
- { pinmux(10), 1, 5 },
- { pinmux(10), 1, 6 },
- { pinmux(10), 1, 7 },
- { pinmux(11), 1, 0 },
- { pinmux(11), 1, 1 },
- { pinmux(11), 1, 2 },
- { pinmux(11), 1, 3 },
- { pinmux(11), 1, 4 },
- { pinmux(11), 1, 5 },
- { pinmux(11), 1, 6 },
- { pinmux(11), 1, 7 },
- { pinmux(12), 1, 0 },
- { pinmux(12), 1, 1 },
- { pinmux(12), 1, 2 },
- { pinmux(12), 1, 3 },
- { pinmux(12), 1, 4 },
- { pinmux(12), 1, 5 },
- { pinmux(12), 1, 6 },
- { pinmux(12), 1, 7 }
-};
-#endif
-
#ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
#define HAS_RMII 1
#else
@@ -222,17 +101,25 @@ int misc_init_r(void)
return 0;
}
+const struct pinmux_config gpio_pins[] = {
+#ifdef CONFIG_USE_NOR
+ /* GP0[11] is required for NOR to work on Rev 3 EVMs */
+ { pinmux(0), 8, 4 }, /* GP0[11] */
+#endif
+};
+
static const struct pinmux_resource pinmuxes[] = {
#ifdef CONFIG_SPI_FLASH
PINMUX_ITEM(spi1_pins),
#endif
- PINMUX_ITEM(uart_pins),
- PINMUX_ITEM(i2c_pins),
+ PINMUX_ITEM(uart2_pins),
+ PINMUX_ITEM(i2c0_pins),
#ifdef CONFIG_NAND_DAVINCI
PINMUX_ITEM(nand_pins),
#elif defined(CONFIG_USE_NOR)
PINMUX_ITEM(nor_pins),
#endif
+ PINMUX_ITEM(gpio_pins),
};
static const struct lpsc_resource lpsc[] = {
diff --git a/board/davinci/da8xxevm/hawkboard_nand_spl.c b/board/davinci/da8xxevm/hawkboard_nand_spl.c
index fd130fa..fcc5f23 100644
--- a/board/davinci/da8xxevm/hawkboard_nand_spl.c
+++ b/board/davinci/da8xxevm/hawkboard_nand_spl.c
@@ -27,53 +27,14 @@
#include <asm/arch/hardware.h>
#include <asm/io.h>
#include <asm/arch/davinci_misc.h>
+#include <asm/arch/da850_pinmux.h>
#include <ns16550.h>
#include <nand.h>
DECLARE_GLOBAL_DATA_PTR;
-static const struct pinmux_config mii_pins[] = {
- { pinmux(2), 8, 1 },
- { pinmux(2), 8, 2 },
- { pinmux(2), 8, 3 },
- { pinmux(2), 8, 4 },
- { pinmux(2), 8, 5 },
- { pinmux(2), 8, 6 },
- { pinmux(2), 8, 7 }
-};
-
-static const struct pinmux_config mdio_pins[] = {
- { pinmux(4), 8, 0 },
- { pinmux(4), 8, 1 }
-};
-
-static const struct pinmux_config nand_pins[] = {
- { pinmux(7), 1, 1 },
- { pinmux(7), 1, 2 },
- { pinmux(7), 1, 4 },
- { pinmux(7), 1, 5 },
- { pinmux(9), 1, 0 },
- { pinmux(9), 1, 1 },
- { pinmux(9), 1, 2 },
- { pinmux(9), 1, 3 },
- { pinmux(9), 1, 4 },
- { pinmux(9), 1, 5 },
- { pinmux(9), 1, 6 },
- { pinmux(9), 1, 7 },
- { pinmux(12), 1, 5 },
- { pinmux(12), 1, 6 }
-};
-
-static const struct pinmux_config uart2_pins[] = {
- { pinmux(0), 4, 6 },
- { pinmux(0), 4, 7 },
- { pinmux(4), 2, 4 },
- { pinmux(4), 2, 5 }
-};
-
static const struct pinmux_resource pinmuxes[] = {
- PINMUX_ITEM(mii_pins),
- PINMUX_ITEM(mdio_pins),
+ PINMUX_ITEM(emac_pins),
PINMUX_ITEM(nand_pins),
PINMUX_ITEM(uart2_pins),
};
--
1.7.0.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 04/12] arm, da830: Move the definitions of pinmux configurations to the arch tree
[not found] <1321893227-19545-1-git-send-email-christian.riesch@omicron.at>
` (3 preceding siblings ...)
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 03/12] arm, da850: Move the definitions of pinmux configurations to the arch tree Christian Riesch
@ 2011-11-21 16:33 ` Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 05/12] arm, davinci: Remove duplication of pinmux configuration code Christian Riesch
` (7 subsequent siblings)
12 siblings, 0 replies; 23+ messages in thread
From: Christian Riesch @ 2011-11-21 16:33 UTC (permalink / raw)
To: u-boot
The boards in board/davinci/da8xxevm/ define pinmux_config[] vectors
that contain pinmux configurations for emac, uarts, memory controllers...
This patch moves the pinmux configurations to a header file in the
arch tree for the da830evm.
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Nick Thompson <nick.thompson@gefanuc.com>
---
arch/arm/include/asm/arch-davinci/da830_pinmux.h | 131 ++++++++++++++++++++++
board/davinci/da8xxevm/da830evm.c | 114 +------------------
2 files changed, 135 insertions(+), 110 deletions(-)
create mode 100644 arch/arm/include/asm/arch-davinci/da830_pinmux.h
diff --git a/arch/arm/include/asm/arch-davinci/da830_pinmux.h b/arch/arm/include/asm/arch-davinci/da830_pinmux.h
new file mode 100644
index 0000000..2900b6c
--- /dev/null
+++ b/arch/arm/include/asm/arch-davinci/da830_pinmux.h
@@ -0,0 +1,131 @@
+/*
+ * Pinmux configurations for the DA830 SoCs
+ *
+ * Copyright (C) 2011 OMICRON electronics GmbH
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __ASM_ARCH_DA830_PINMUX_H
+#define __ASM_ARCH_DA830_PINMUX_H
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/davinci_misc.h>
+
+/* SPI pin muxer settings */
+const struct pinmux_config spi0_pins[] = {
+ { pinmux(7), 1, 3 },
+ { pinmux(7), 1, 4 },
+ { pinmux(7), 1, 5 },
+ { pinmux(7), 1, 6 },
+ { pinmux(7), 1, 7 }
+};
+
+/* EMIF-A bus pins for 8-bit NAND support on CS3 */
+const struct pinmux_config emifa_nand_8bit_cs3_pins[] = {
+ { pinmux(13), 1, 6 },
+ { pinmux(13), 1, 7 },
+ { pinmux(14), 1, 0 },
+ { pinmux(14), 1, 1 },
+ { pinmux(14), 1, 2 },
+ { pinmux(14), 1, 3 },
+ { pinmux(14), 1, 4 },
+ { pinmux(14), 1, 5 },
+ { pinmux(15), 1, 7 },
+ { pinmux(16), 1, 0 },
+ { pinmux(18), 1, 1 },
+ { pinmux(18), 1, 4 },
+ { pinmux(18), 1, 5 },
+};
+
+/* EMAC PHY interface pins */
+const struct pinmux_config emac_pins[] = {
+ { pinmux(9), 0, 5 },
+ { pinmux(10), 2, 1 },
+ { pinmux(10), 2, 2 },
+ { pinmux(10), 2, 3 },
+ { pinmux(10), 2, 4 },
+ { pinmux(10), 2, 5 },
+ { pinmux(10), 2, 6 },
+ { pinmux(10), 2, 7 },
+ { pinmux(11), 2, 0 },
+ { pinmux(11), 2, 1 },
+};
+
+/* UART pin muxer settings */
+const struct pinmux_config uart2_pins[] = {
+ { pinmux(8), 2, 7 },
+ { pinmux(9), 2, 0 }
+};
+
+/* I2C pin muxer settings */
+const struct pinmux_config i2c0_pins[] = {
+ { pinmux(8), 2, 3 },
+ { pinmux(8), 2, 4 }
+};
+
+/* NAND pin muxer settings */
+const struct pinmux_config aemif_pins[] = {
+ { pinmux(13), 1, 6 },
+ { pinmux(13), 1, 7 },
+ { pinmux(14), 1, 0 },
+ { pinmux(14), 1, 1 },
+ { pinmux(14), 1, 2 },
+ { pinmux(14), 1, 3 },
+ { pinmux(14), 1, 4 },
+ { pinmux(14), 1, 5 },
+ { pinmux(14), 1, 6 },
+ { pinmux(14), 1, 7 },
+ { pinmux(15), 1, 0 },
+ { pinmux(15), 1, 1 },
+ { pinmux(15), 1, 2 },
+ { pinmux(15), 1, 3 },
+ { pinmux(15), 1, 4 },
+ { pinmux(15), 1, 5 },
+ { pinmux(15), 1, 6 },
+ { pinmux(15), 1, 7 },
+ { pinmux(16), 1, 0 },
+ { pinmux(16), 1, 1 },
+ { pinmux(16), 1, 2 },
+ { pinmux(16), 1, 3 },
+ { pinmux(16), 1, 4 },
+ { pinmux(16), 1, 5 },
+ { pinmux(16), 1, 6 },
+ { pinmux(16), 1, 7 },
+ { pinmux(17), 1, 0 },
+ { pinmux(17), 1, 1 },
+ { pinmux(17), 1, 2 },
+ { pinmux(17), 1, 3 },
+ { pinmux(17), 1, 4 },
+ { pinmux(17), 1, 5 },
+ { pinmux(17), 1, 6 },
+ { pinmux(17), 1, 7 },
+ { pinmux(18), 1, 0 },
+ { pinmux(18), 1, 1 },
+ { pinmux(18), 1, 2 },
+ { pinmux(18), 1, 3 },
+ { pinmux(18), 1, 4 },
+ { pinmux(18), 1, 5 },
+ { pinmux(18), 1, 6 },
+ { pinmux(18), 1, 7 },
+ { pinmux(10), 1, 0 }
+};
+
+/* USB0_DRVVBUS pin muxer settings */
+const struct pinmux_config usb_pins[] = {
+ { pinmux(9), 1, 1 }
+};
+
+#endif
diff --git a/board/davinci/da8xxevm/da830evm.c b/board/davinci/da8xxevm/da830evm.c
index c45c94b..07789f6 100644
--- a/board/davinci/da8xxevm/da830evm.c
+++ b/board/davinci/da8xxevm/da830evm.c
@@ -39,6 +39,7 @@
#include <asm/arch/hardware.h>
#include <asm/arch/emif_defs.h>
#include <asm/arch/emac_defs.h>
+#include <asm/arch/da830_pinmux.h>
#include <asm/io.h>
#include <nand.h>
#include <asm/arch/nand_defs.h>
@@ -46,124 +47,17 @@
DECLARE_GLOBAL_DATA_PTR;
-/* SPI0 pin muxer settings */
-static const struct pinmux_config spi0_pins[] = {
- { pinmux(7), 1, 3 },
- { pinmux(7), 1, 4 },
- { pinmux(7), 1, 5 },
- { pinmux(7), 1, 6 },
- { pinmux(7), 1, 7 }
-};
-
-/* EMIF-A bus pins for 8-bit NAND support on CS3 */
-static const struct pinmux_config emifa_nand_pins[] = {
- { pinmux(13), 1, 6 },
- { pinmux(13), 1, 7 },
- { pinmux(14), 1, 0 },
- { pinmux(14), 1, 1 },
- { pinmux(14), 1, 2 },
- { pinmux(14), 1, 3 },
- { pinmux(14), 1, 4 },
- { pinmux(14), 1, 5 },
- { pinmux(15), 1, 7 },
- { pinmux(16), 1, 0 },
- { pinmux(18), 1, 1 },
- { pinmux(18), 1, 4 },
- { pinmux(18), 1, 5 },
-};
-
-/* EMAC PHY interface pins */
-static const struct pinmux_config emac_pins[] = {
- { pinmux(9), 0, 5 },
- { pinmux(10), 2, 1 },
- { pinmux(10), 2, 2 },
- { pinmux(10), 2, 3 },
- { pinmux(10), 2, 4 },
- { pinmux(10), 2, 5 },
- { pinmux(10), 2, 6 },
- { pinmux(10), 2, 7 },
- { pinmux(11), 2, 0 },
- { pinmux(11), 2, 1 },
-};
-
-/* UART pin muxer settings */
-static const struct pinmux_config uart_pins[] = {
- { pinmux(8), 2, 7 },
- { pinmux(9), 2, 0 }
-};
-
-/* I2C pin muxer settings */
-static const struct pinmux_config i2c_pins[] = {
- { pinmux(8), 2, 3 },
- { pinmux(8), 2, 4 }
-};
-
-#ifdef CONFIG_USE_NAND
-/* NAND pin muxer settings */
-const struct pinmux_config aemif_pins[] = {
- { pinmux(13), 1, 6 },
- { pinmux(13), 1, 7 },
- { pinmux(14), 1, 0 },
- { pinmux(14), 1, 1 },
- { pinmux(14), 1, 2 },
- { pinmux(14), 1, 3 },
- { pinmux(14), 1, 4 },
- { pinmux(14), 1, 5 },
- { pinmux(14), 1, 6 },
- { pinmux(14), 1, 7 },
- { pinmux(15), 1, 0 },
- { pinmux(15), 1, 1 },
- { pinmux(15), 1, 2 },
- { pinmux(15), 1, 3 },
- { pinmux(15), 1, 4 },
- { pinmux(15), 1, 5 },
- { pinmux(15), 1, 6 },
- { pinmux(15), 1, 7 },
- { pinmux(16), 1, 0 },
- { pinmux(16), 1, 1 },
- { pinmux(16), 1, 2 },
- { pinmux(16), 1, 3 },
- { pinmux(16), 1, 4 },
- { pinmux(16), 1, 5 },
- { pinmux(16), 1, 6 },
- { pinmux(16), 1, 7 },
- { pinmux(17), 1, 0 },
- { pinmux(17), 1, 1 },
- { pinmux(17), 1, 2 },
- { pinmux(17), 1, 3 },
- { pinmux(17), 1, 4 },
- { pinmux(17), 1, 5 },
- { pinmux(17), 1, 6 },
- { pinmux(17), 1, 7 },
- { pinmux(18), 1, 0 },
- { pinmux(18), 1, 1 },
- { pinmux(18), 1, 2 },
- { pinmux(18), 1, 3 },
- { pinmux(18), 1, 4 },
- { pinmux(18), 1, 5 },
- { pinmux(18), 1, 6 },
- { pinmux(18), 1, 7 },
- { pinmux(10), 1, 0 }
-};
-#endif
-
-
-/* USB0_DRVVBUS pin muxer settings */
-static const struct pinmux_config usb_pins[] = {
- { pinmux(9), 1, 1 }
-};
-
static const struct pinmux_resource pinmuxes[] = {
#ifdef CONFIG_SPI_FLASH
PINMUX_ITEM(spi0_pins),
#endif
- PINMUX_ITEM(uart_pins),
- PINMUX_ITEM(i2c_pins),
+ PINMUX_ITEM(uart2_pins),
+ PINMUX_ITEM(i2c0_pins),
#ifdef CONFIG_USB_DA8XX
PINMUX_ITEM(usb_pins),
#endif
#ifdef CONFIG_USE_NAND
- PINMUX_ITEM(emifa_nand_pins),
+ PINMUX_ITEM(emifa_nand_8bit_cs3_pins),
PINMUX_ITEM(aemif_pins),
#endif
#if defined(CONFIG_DRIVER_TI_EMAC)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 05/12] arm, davinci: Remove duplication of pinmux configuration code
[not found] <1321893227-19545-1-git-send-email-christian.riesch@omicron.at>
` (4 preceding siblings ...)
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 04/12] arm, da830: " Christian Riesch
@ 2011-11-21 16:33 ` Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 06/12] arm, davinci: Fix clear bss loop for zero length bss Christian Riesch
` (6 subsequent siblings)
12 siblings, 0 replies; 23+ messages in thread
From: Christian Riesch @ 2011-11-21 16:33 UTC (permalink / raw)
To: u-boot
This patch replaces the pinmux configuration code in
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c by the code from
arch/arm/cpu/arm926ejs/davinci/pinmux.c.
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Heiko Schocher <hs@denx.de>
---
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c | 36 +++++-----------------
board/davinci/da8xxevm/da850evm.c | 4 ++-
2 files changed, 11 insertions(+), 29 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
index c7ec70f..a532f8a 100644
--- a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
+++ b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
@@ -27,6 +27,7 @@
#include <post.h>
#include <asm/arch/da850_lowlevel.h>
#include <asm/arch/hardware.h>
+#include <asm/arch/davinci_misc.h>
#include <asm/arch/ddr2_defs.h>
#include <asm/arch/emif_defs.h>
#include <asm/arch/pll_defs.h>
@@ -235,19 +236,16 @@ int da850_ddr_setup(void)
return 0;
}
-void da850_pinmux_ctl(unsigned long offset, unsigned long mask,
- unsigned long value)
-{
- clrbits_le32(&davinci_syscfg_regs->pinmux[offset], mask);
- setbits_le32(&davinci_syscfg_regs->pinmux[offset], (mask & value));
-}
-
__attribute__((weak))
void board_gpio_init(void)
{
return;
}
+/* pinmux_resource[] vector is defined in the board specific file */
+extern const struct pinmux_resource pinmuxes[];
+extern const int pinmuxes_size;
+
int arch_cpu_init(void)
{
/* Unlock kick registers */
@@ -257,27 +255,9 @@ int arch_cpu_init(void)
dv_maskbits(&davinci_syscfg_regs->suspsrc,
CONFIG_SYS_DA850_SYSCFG_SUSPSRC);
- /* Setup Pinmux */
- da850_pinmux_ctl(0, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX0);
- da850_pinmux_ctl(1, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX1);
- da850_pinmux_ctl(2, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX2);
- da850_pinmux_ctl(3, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX3);
- da850_pinmux_ctl(4, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX4);
- da850_pinmux_ctl(5, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX5);
- da850_pinmux_ctl(6, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX6);
- da850_pinmux_ctl(7, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX7);
- da850_pinmux_ctl(8, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX8);
- da850_pinmux_ctl(9, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX9);
- da850_pinmux_ctl(10, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX10);
- da850_pinmux_ctl(11, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX11);
- da850_pinmux_ctl(12, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX12);
- da850_pinmux_ctl(13, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX13);
- da850_pinmux_ctl(14, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX14);
- da850_pinmux_ctl(15, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX15);
- da850_pinmux_ctl(16, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX16);
- da850_pinmux_ctl(17, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX17);
- da850_pinmux_ctl(18, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX18);
- da850_pinmux_ctl(19, 0xFFFFFFFF, CONFIG_SYS_DA850_PINMUX19);
+ /* configure pinmux settings */
+ if (davinci_configure_pin_mux_items(pinmuxes, pinmuxes_size))
+ return 1;
/* PLL setup */
da850_pll_init(davinci_pllc0_regs, CONFIG_SYS_DA850_PLL0_PLLM);
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index 7bc16e7..bcea7b9 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -108,7 +108,7 @@ const struct pinmux_config gpio_pins[] = {
#endif
};
-static const struct pinmux_resource pinmuxes[] = {
+const struct pinmux_resource pinmuxes[] = {
#ifdef CONFIG_SPI_FLASH
PINMUX_ITEM(spi1_pins),
#endif
@@ -122,6 +122,8 @@ static const struct pinmux_resource pinmuxes[] = {
PINMUX_ITEM(gpio_pins),
};
+const int pinmuxes_size = ARRAY_SIZE(pinmuxes);
+
static const struct lpsc_resource lpsc[] = {
{ DAVINCI_LPSC_AEMIF }, /* NAND, NOR */
{ DAVINCI_LPSC_SPI1 }, /* Serial Flash */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 06/12] arm, davinci: Fix clear bss loop for zero length bss
[not found] <1321893227-19545-1-git-send-email-christian.riesch@omicron.at>
` (5 preceding siblings ...)
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 05/12] arm, davinci: Remove duplication of pinmux configuration code Christian Riesch
@ 2011-11-21 16:33 ` Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 07/12] arm: printf() is not available in some SPL configurations Christian Riesch
` (5 subsequent siblings)
12 siblings, 0 replies; 23+ messages in thread
From: Christian Riesch @ 2011-11-21 16:33 UTC (permalink / raw)
To: u-boot
This patch fixes the clear bss loop for bss sections that have
zero length, i.e., where __bss_start == __bss_end__.
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Heiko Schocher <hs@denx.de>
---
arch/arm/cpu/arm926ejs/start.S | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S
index 8b5355b..772793c 100644
--- a/arch/arm/cpu/arm926ejs/start.S
+++ b/arch/arm/cpu/arm926ejs/start.S
@@ -299,10 +299,12 @@ clear_bss:
#endif
mov r2, #0x00000000 /* clear */
-clbss_l:str r2, [r0] /* clear loop... */
+clbss_l:cmp r0, r1 /* clear loop... */
+ beq clbss_e
+ str r2, [r0]
add r0, r0, #4
- cmp r0, r1
- bne clbss_l
+ b clbss_l
+clbss_e:
#ifndef CONFIG_SPL_BUILD
bl coloured_LED_init
--
1.7.0.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 07/12] arm: printf() is not available in some SPL configurations
[not found] <1321893227-19545-1-git-send-email-christian.riesch@omicron.at>
` (6 preceding siblings ...)
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 06/12] arm, davinci: Fix clear bss loop for zero length bss Christian Riesch
@ 2011-11-21 16:33 ` Christian Riesch
2011-11-21 17:52 ` Tom Rini
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 08/12] sf: Add spi_boot() to allow booting from SPI flash in an SPL Christian Riesch
` (4 subsequent siblings)
12 siblings, 1 reply; 23+ messages in thread
From: Christian Riesch @ 2011-11-21 16:33 UTC (permalink / raw)
To: u-boot
This patch avoids build breakage for SPLs that do not support printf.
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <tom.rini@gmail.com>
---
arch/arm/lib/eabi_compat.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c
index eb3e26d..748c808 100644
--- a/arch/arm/lib/eabi_compat.c
+++ b/arch/arm/lib/eabi_compat.c
@@ -13,10 +13,13 @@
int raise (int signum)
{
+#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
printf("raise: Signal # %d caught\n", signum);
+#endif
return 0;
}
+
/* Dummy function to avoid linker complaints */
void __aeabi_unwind_cpp_pr0(void)
{
--
1.7.0.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 08/12] sf: Add spi_boot() to allow booting from SPI flash in an SPL
[not found] <1321893227-19545-1-git-send-email-christian.riesch@omicron.at>
` (7 preceding siblings ...)
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 07/12] arm: printf() is not available in some SPL configurations Christian Riesch
@ 2011-11-21 16:33 ` Christian Riesch
2011-11-21 19:07 ` Mike Frysinger
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 09/12] arm, davinci: Add SPL support for DA850 SoCs Christian Riesch
` (3 subsequent siblings)
12 siblings, 1 reply; 23+ messages in thread
From: Christian Riesch @ 2011-11-21 16:33 UTC (permalink / raw)
To: u-boot
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Heiko Schocher <hs@denx.de>
---
doc/README.SPL | 1 +
drivers/mtd/spi/Makefile | 6 ++++
drivers/mtd/spi/spi_spl_load.c | 60 ++++++++++++++++++++++++++++++++++++++++
include/spi_flash.h | 2 +
lib/Makefile | 2 +
5 files changed, 71 insertions(+), 0 deletions(-)
create mode 100644 drivers/mtd/spi/spi_spl_load.c
diff --git a/doc/README.SPL b/doc/README.SPL
index 89d24a7..f01a8bd 100644
--- a/doc/README.SPL
+++ b/doc/README.SPL
@@ -65,3 +65,4 @@ CONFIG_SPL_NAND_SUPPORT (drivers/mtd/nand/libnand.o)
CONFIG_SPL_DMA_SUPPORT (drivers/dma/libdma.o)
CONFIG_SPL_POST_MEM_SUPPORT (post/drivers/memory.o)
CONFIG_SPL_NAND_LOAD (drivers/mtd/nand/nand_spl_load.o)
+CONFIG_SPL_SPI_LOAD (drivers/mtd/spi/spi_spl_load.o)
diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile
index 57112af..071e2b6 100644
--- a/drivers/mtd/spi/Makefile
+++ b/drivers/mtd/spi/Makefile
@@ -25,6 +25,12 @@ include $(TOPDIR)/config.mk
LIB := $(obj)libspi_flash.o
+ifdef CONFIG_SPL_BUILD
+ifdef CONFIG_SPL_SPI_LOAD
+COBJS-y += spi_spl_load.o
+endif
+endif
+
COBJS-$(CONFIG_SPI_FLASH) += spi_flash.o
COBJS-$(CONFIG_SPI_FLASH_ATMEL) += atmel.o
COBJS-$(CONFIG_SPI_FLASH_EON) += eon.o
diff --git a/drivers/mtd/spi/spi_spl_load.c b/drivers/mtd/spi/spi_spl_load.c
new file mode 100644
index 0000000..d434457
--- /dev/null
+++ b/drivers/mtd/spi/spi_spl_load.c
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2011 OMICRON electronics GmbH
+ *
+ * based on drivers/mtd/nand/nand_spl_load.c
+ *
+ * Copyright (C) 2011
+ * Heiko Schocher, DENX Software Engineering, hs at denx.de.
+ *
+ * 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
+ */
+
+#include <common.h>
+#include <spi_flash.h>
+
+/*
+ * The main entry for SPI booting. It's necessary that SDRAM is already
+ * configured and available since this code loads the main U-Boot image
+ * from SPI into SDRAM and starts it from there.
+ */
+void spi_boot(void)
+{
+ struct spi_flash *flash;
+ __attribute__((noreturn)) void (*uboot)(void);
+
+ /*
+ * Load U-Boot image from SPI flash into RAM
+ */
+
+ puts("Probing SPI flash...\n");
+ flash = spi_flash_probe(0, 0, CONFIG_SF_DEFAULT_SPEED, SPI_MODE_3);
+ if (!flash) {
+ puts("failed.\n");
+ hang();
+ }
+
+ puts("Load image from SPI flash\n");
+ spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS,
+ CONFIG_SYS_SPI_U_BOOT_SIZE,
+ (void *) CONFIG_SYS_TEXT_BASE);
+ puts("Loading finished, starting u-boot...\n");
+
+ /*
+ * Jump to U-Boot image
+ */
+ uboot = (void *) CONFIG_SYS_TEXT_BASE;
+ (*uboot)();
+}
diff --git a/include/spi_flash.h b/include/spi_flash.h
index 2671ab5..e22e294 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -68,4 +68,6 @@ static inline int spi_flash_erase(struct spi_flash *flash, u32 offset,
return flash->erase(flash, offset, len);
}
+__attribute__((noreturn)) void spi_boot(void);
+
#endif /* _SPI_FLASH_H_ */
diff --git a/lib/Makefile b/lib/Makefile
index 54708c2..35ba7ff 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -50,6 +50,8 @@ COBJS-$(CONFIG_SHA1) += sha1.o
COBJS-$(CONFIG_SHA256) += sha256.o
COBJS-y += strmhz.o
COBJS-$(CONFIG_RBTREE) += rbtree.o
+else
+COBJS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += display_options.o
endif
COBJS-y += ctype.o
--
1.7.0.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 09/12] arm, davinci: Add SPL support for DA850 SoCs
[not found] <1321893227-19545-1-git-send-email-christian.riesch@omicron.at>
` (8 preceding siblings ...)
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 08/12] sf: Add spi_boot() to allow booting from SPI flash in an SPL Christian Riesch
@ 2011-11-21 16:33 ` Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 10/12] arm, da850evm: Add an SPL for SPI boot Christian Riesch
` (2 subsequent siblings)
12 siblings, 0 replies; 23+ messages in thread
From: Christian Riesch @ 2011-11-21 16:33 UTC (permalink / raw)
To: u-boot
This code adds an SPL for booting from SPI flash on DA850 SoCs.
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Heiko Schocher <hs@denx.de>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
---
arch/arm/cpu/arm926ejs/davinci/Makefile | 3 +-
arch/arm/cpu/arm926ejs/davinci/spl.c | 34 ++++++++++++++++++++++++++++++-
2 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/davinci/Makefile b/arch/arm/cpu/arm926ejs/davinci/Makefile
index 2105ec5..99df0df 100644
--- a/arch/arm/cpu/arm926ejs/davinci/Makefile
+++ b/arch/arm/cpu/arm926ejs/davinci/Makefile
@@ -37,7 +37,8 @@ COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o
ifdef CONFIG_SPL_BUILD
COBJS-y += spl.o
-COBJS-y += dm365_lowlevel.o
+COBJS-$(CONFIG_SOC_DM365) += dm365_lowlevel.o
+COBJS-$(CONFIG_SOC_DA8XX) += da850_lowlevel.o
endif
SOBJS = reset.o
diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c
index d9b9398..20f798e 100644
--- a/arch/arm/cpu/arm926ejs/davinci/spl.c
+++ b/arch/arm/cpu/arm926ejs/davinci/spl.c
@@ -26,6 +26,16 @@
#include <nand.h>
#include <asm/arch/dm365_lowlevel.h>
#include <ns16550.h>
+#include <malloc.h>
+#include <spi_flash.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* Define global data structure pointer to it*/
+static gd_t gdata __attribute__ ((section(".data")));
+static bd_t bdata __attribute__ ((section(".data")));
+
+#ifndef CONFIG_SPL_LIBCOMMON_SUPPORT
void puts(const char *str)
{
@@ -41,6 +51,8 @@ void putc(char c)
NS16550_putc((NS16550_t)(CONFIG_SYS_NS16550_COM1), c);
}
+#endif /* CONFIG_SPL_LIBCOMMON_SUPPORT */
+
inline void hang(void)
{
puts("### ERROR ### Please RESET the board ###\n");
@@ -50,14 +62,34 @@ inline void hang(void)
void board_init_f(ulong dummy)
{
+#ifdef CONFIG_SOC_DM365
dm36x_lowlevel_init(0);
+#endif
+#ifdef CONFIG_SOC_DA8XX
+ arch_cpu_init();
+#endif
relocate_code(CONFIG_SPL_STACK, NULL, CONFIG_SPL_TEXT_BASE);
}
void board_init_r(gd_t *id, ulong dummy)
{
-
+#ifdef CONFIG_SOC_DM365
nand_init();
puts("Nand boot...\n");
nand_boot();
+#endif
+#ifdef CONFIG_SOC_DA8XX
+ mem_malloc_init(CONFIG_SYS_TEXT_BASE - CONFIG_SYS_MALLOC_LEN,
+ CONFIG_SYS_MALLOC_LEN);
+
+ gd = &gdata;
+ gd->bd = &bdata;
+ gd->flags |= GD_FLG_RELOC;
+ gd->baudrate = CONFIG_BAUDRATE;
+ serial_init(); /* serial communications setup */
+ gd->have_console = 1;
+
+ puts("SPI boot...\n");
+ spi_boot();
+#endif
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 10/12] arm, da850evm: Add an SPL for SPI boot
[not found] <1321893227-19545-1-git-send-email-christian.riesch@omicron.at>
` (9 preceding siblings ...)
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 09/12] arm, davinci: Add SPL support for DA850 SoCs Christian Riesch
@ 2011-11-21 16:33 ` Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 11/12] mkimage: Fix variable length header support Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 12/12] arm, davinci: Add support for generating AIS images to the Makefile Christian Riesch
12 siblings, 0 replies; 23+ messages in thread
From: Christian Riesch @ 2011-11-21 16:33 UTC (permalink / raw)
To: u-boot
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Heiko Schocher <hs@denx.de>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
---
board/davinci/da8xxevm/u-boot-spl.lds | 73 +++++++++++++++++++++++++++++++++
include/configs/da850evm.h | 53 +++++++++++++++++++++++-
2 files changed, 125 insertions(+), 1 deletions(-)
create mode 100644 board/davinci/da8xxevm/u-boot-spl.lds
diff --git a/board/davinci/da8xxevm/u-boot-spl.lds b/board/davinci/da8xxevm/u-boot-spl.lds
new file mode 100644
index 0000000..6f6e065
--- /dev/null
+++ b/board/davinci/da8xxevm/u-boot-spl.lds
@@ -0,0 +1,73 @@
+/*
+ * (C) Copyright 2002
+ * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
+ *
+ * (C) Copyright 2008
+ * Guennadi Liakhovetki, DENX Software Engineering, <lg@denx.de>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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
+ */
+
+MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE,\
+ LENGTH = CONFIG_SPL_MAX_SIZE }
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(_start)
+SECTIONS
+{
+ . = 0x00000000;
+
+ . = ALIGN(4);
+ .text :
+ {
+ __start = .;
+ arch/arm/cpu/arm926ejs/start.o (.text)
+ *(.text*)
+ } >.sram
+
+ . = ALIGN(4);
+ .rodata : { *(SORT_BY_ALIGNMENT(.rodata*)) } >.sram
+
+ . = ALIGN(4);
+ .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
+ . = ALIGN(4);
+ .rel.dyn : {
+ __rel_dyn_start = .;
+ *(.rel*)
+ __rel_dyn_end = .;
+ } >.sram
+
+ .dynsym : {
+ __dynsym_start = .;
+ *(.dynsym)
+ } >.sram
+
+ .bss :
+ {
+ . = ALIGN(4);
+ __bss_start = .;
+ *(.bss*)
+ . = ALIGN(4);
+ __bss_end__ = .;
+ } >.sram
+
+ __image_copy_end = .;
+ _end = .;
+}
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 4c14370..517e2ef 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -29,7 +29,6 @@
#define CONFIG_DRIVER_TI_EMAC
#define CONFIG_USE_SPIFLASH
-
/*
* SoC Configuration
*/
@@ -64,6 +63,41 @@
#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
#define CONFIG_STACKSIZE (256*1024) /* regular stack */
+#define CONFIG_SYS_DA850_SYSCFG_SUSPSRC ((1 << 27) | (1 << 22) | (1 << 20) | \
+ (1 << 5) | (1 << 16))
+
+/*
+ * PLL configuration
+ */
+#define CONFIG_SYS_DV_CLKMODE 0
+#define CONFIG_SYS_DA850_PLL0_POSTDIV 1
+#define CONFIG_SYS_DA850_PLL0_PLLDIV1 0x8000
+#define CONFIG_SYS_DA850_PLL0_PLLDIV2 0x8001
+#define CONFIG_SYS_DA850_PLL0_PLLDIV3 0x8002
+#define CONFIG_SYS_DA850_PLL0_PLLDIV4 0x8003
+#define CONFIG_SYS_DA850_PLL0_PLLDIV5 0x8002
+#define CONFIG_SYS_DA850_PLL0_PLLDIV6 CONFIG_SYS_DA850_PLL0_PLLDIV1
+#define CONFIG_SYS_DA850_PLL0_PLLDIV7 0x8005
+
+#define CONFIG_SYS_DA850_PLL1_POSTDIV 1
+#define CONFIG_SYS_DA850_PLL1_PLLDIV1 0x8000
+#define CONFIG_SYS_DA850_PLL1_PLLDIV2 0x8001
+#define CONFIG_SYS_DA850_PLL1_PLLDIV3 0x8002
+
+#define CONFIG_SYS_DA850_PLL0_PLLM 24
+#define CONFIG_SYS_DA850_PLL1_PLLM 21
+
+/*
+ * DDR2 memory configuration
+ */
+#define CONFIG_SYS_DA850_DDR2_DDRPHYCR 0x000000C4
+#define CONFIG_SYS_DA850_DDR2_SDBCR 0x0A034622
+#define CONFIG_SYS_DA850_DDR2_SDBCR2 0x00000000
+#define CONFIG_SYS_DA850_DDR2_SDTIMR 0x184929C8
+#define CONFIG_SYS_DA850_DDR2_SDTIMR2 0xB80FC700
+#define CONFIG_SYS_DA850_DDR2_SDRCR 0x00000406
+#define CONFIG_SYS_DA850_DDR2_PBBPR 0x30
+
/*
* Serial Driver info
*/
@@ -75,6 +109,7 @@
#define CONFIG_CONS_INDEX 1 /* use UART0 for console */
#define CONFIG_BAUDRATE 115200 /* Default baud rate */
#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
+#define CONFIG_SYS_DA850_LPSC_UART DAVINCI_LPSC_UART2
#define CONFIG_SPI
#define CONFIG_SPI_FLASH
@@ -241,8 +276,24 @@
#undef CONFIG_CMD_ENV
#endif
+/* defines for SPL */
+#define CONFIG_SPL
+#define CONFIG_SPL_SPI_SUPPORT
+#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_LOAD
+#define CONFIG_SPL_SERIAL_SUPPORT
+#define CONFIG_SPL_LIBCOMMON_SUPPORT
+#define CONFIG_SPL_LIBGENERIC_SUPPORT
+#define CONFIG_SPL_LDSCRIPT "$(BOARDDIR)/u-boot-spl.lds"
+#define CONFIG_SPL_STACK 0x8001ff00
+#define CONFIG_SPL_TEXT_BASE 0x80000000
+#define CONFIG_SPL_MAX_SIZE (20<<10)
+#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x8000
+#define CONFIG_SYS_SPI_U_BOOT_SIZE 0x30000
+
/* additions for new relocation code, must added to all boards */
#define CONFIG_SYS_SDRAM_BASE 0xc0000000
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
GENERATED_GBL_DATA_SIZE)
+
#endif /* __CONFIG_H */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 11/12] mkimage: Fix variable length header support
[not found] <1321893227-19545-1-git-send-email-christian.riesch@omicron.at>
` (10 preceding siblings ...)
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 10/12] arm, da850evm: Add an SPL for SPI boot Christian Riesch
@ 2011-11-21 16:33 ` Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 12/12] arm, davinci: Add support for generating AIS images to the Makefile Christian Riesch
12 siblings, 0 replies; 23+ messages in thread
From: Christian Riesch @ 2011-11-21 16:33 UTC (permalink / raw)
To: u-boot
Support for variable length images like AIS image was introduced
in commit f0662105b674a3874227316abf8536bebc9b5995. A parameter
"-s" was also introduced to prohibit copying of the image file
automatically in the main program. However, this parameter
was implemented incorrectly and the image file was copied
nevertheless.
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Heiko Schocher <hs@denx.de>
---
tools/mkimage.c | 97 ++++++++++++++++++++++++++++---------------------------
1 files changed, 49 insertions(+), 48 deletions(-)
diff --git a/tools/mkimage.c b/tools/mkimage.c
index 36e28ec..eeb1b10 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -383,65 +383,66 @@ NXTARG: ;
exit (EXIT_FAILURE);
}
- if (!params.skipcpy &&
- (params.type == IH_TYPE_MULTI ||
- params.type == IH_TYPE_SCRIPT)) {
- char *file = params.datafile;
- uint32_t size;
-
- for (;;) {
- char *sep = NULL;
-
- if (file) {
- if ((sep = strchr(file, ':')) != NULL) {
- *sep = '\0';
+ if (!params.skipcpy) {
+ if (params.type == IH_TYPE_MULTI ||
+ params.type == IH_TYPE_SCRIPT) {
+ char *file = params.datafile;
+ uint32_t size;
+
+ for (;;) {
+ char *sep = NULL;
+
+ if (file) {
+ if ((sep = strchr(file, ':')) != NULL) {
+ *sep = '\0';
+ }
+
+ if (stat (file, &sbuf) < 0) {
+ fprintf (stderr, "%s: Can't stat %s: %s\n",
+ params.cmdname, file, strerror(errno));
+ exit (EXIT_FAILURE);
+ }
+ size = cpu_to_uimage (sbuf.st_size);
+ } else {
+ size = 0;
}
- if (stat (file, &sbuf) < 0) {
- fprintf (stderr, "%s: Can't stat %s: %s\n",
- params.cmdname, file, strerror(errno));
+ if (write(ifd, (char *)&size, sizeof(size)) != sizeof(size)) {
+ fprintf (stderr, "%s: Write error on %s: %s\n",
+ params.cmdname, params.imagefile,
+ strerror(errno));
exit (EXIT_FAILURE);
}
- size = cpu_to_uimage (sbuf.st_size);
- } else {
- size = 0;
- }
- if (write(ifd, (char *)&size, sizeof(size)) != sizeof(size)) {
- fprintf (stderr, "%s: Write error on %s: %s\n",
- params.cmdname, params.imagefile,
- strerror(errno));
- exit (EXIT_FAILURE);
- }
+ if (!file) {
+ break;
+ }
- if (!file) {
- break;
+ if (sep) {
+ *sep = ':';
+ file = sep + 1;
+ } else {
+ file = NULL;
+ }
}
- if (sep) {
- *sep = ':';
- file = sep + 1;
- } else {
- file = NULL;
- }
- }
+ file = params.datafile;
- file = params.datafile;
-
- for (;;) {
- char *sep = strchr(file, ':');
- if (sep) {
- *sep = '\0';
- copy_file (ifd, file, 1);
- *sep++ = ':';
- file = sep;
- } else {
- copy_file (ifd, file, 0);
- break;
+ for (;;) {
+ char *sep = strchr(file, ':');
+ if (sep) {
+ *sep = '\0';
+ copy_file (ifd, file, 1);
+ *sep++ = ':';
+ file = sep;
+ } else {
+ copy_file (ifd, file, 0);
+ break;
+ }
}
+ } else {
+ copy_file (ifd, params.datafile, 0);
}
- } else {
- copy_file (ifd, params.datafile, 0);
}
/* We're a bit of paranoid */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 12/12] arm, davinci: Add support for generating AIS images to the Makefile
[not found] <1321893227-19545-1-git-send-email-christian.riesch@omicron.at>
` (11 preceding siblings ...)
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 11/12] mkimage: Fix variable length header support Christian Riesch
@ 2011-11-21 16:33 ` Christian Riesch
2011-11-21 19:09 ` Mike Frysinger
12 siblings, 1 reply; 23+ messages in thread
From: Christian Riesch @ 2011-11-21 16:33 UTC (permalink / raw)
To: u-boot
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Heiko Schocher <hs@denx.de>
---
.gitignore | 1 +
Makefile | 10 ++++++++++
board/davinci/da8xxevm/config.mk | 5 +++++
3 files changed, 16 insertions(+), 0 deletions(-)
create mode 100644 board/davinci/da8xxevm/config.mk
diff --git a/.gitignore b/.gitignore
index ff4bae0..e4e95e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,6 +35,7 @@
/u-boot.dis
/u-boot.lds
/u-boot.ubl
+/u-boot.ais
/u-boot.dtb
/u-boot.sb
diff --git a/Makefile b/Makefile
index fb658f4..94c5fbb 100644
--- a/Makefile
+++ b/Makefile
@@ -417,6 +417,15 @@ $(obj)u-boot.ubl: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
rm $(obj)u-boot-ubl.bin
rm $(obj)spl/u-boot-spl-pad.bin
+$(obj)u-boot.ais: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
+ $(obj)tools/mkimage -s -n /dev/null -T aisimage \
+ -e $(CONFIG_SPL_TEXT_BASE) -d $(obj)spl/u-boot-spl.bin \
+ $(obj)spl/u-boot-spl.ais
+ $(OBJCOPY) ${OBJCFLAGS} -I binary --pad-to=$(PAD_TO) -O binary $(obj)spl/u-boot-spl.ais $(obj)spl/u-boot-spl-pad.ais
+ cat $(obj)spl/u-boot-spl-pad.ais $(obj)u-boot.bin > $(obj)u-boot.ais
+ rm $(obj)spl/u-boot-spl.ais
+ rm $(obj)spl/u-boot-spl-pad.ais
+
$(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
elftosb -zdf imx28 -c $(TOPDIR)/board/$(BOARDDIR)/u-boot.bd \
-o $(obj)u-boot.sb
@@ -788,6 +797,7 @@ clobber: clean
@rm -f $(obj)u-boot.kwb
@rm -f $(obj)u-boot.imx
@rm -f $(obj)u-boot.ubl
+ @rm -f $(obj)u-boot.ais
@rm -f $(obj)u-boot.dtb
@rm -f $(obj)u-boot.sb
@rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes}
diff --git a/board/davinci/da8xxevm/config.mk b/board/davinci/da8xxevm/config.mk
new file mode 100644
index 0000000..05cf77f
--- /dev/null
+++ b/board/davinci/da8xxevm/config.mk
@@ -0,0 +1,5 @@
+# required for SPI flash SPL
+#
+
+PAD_TO := 32768
+
--
1.7.0.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 07/12] arm: printf() is not available in some SPL configurations
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 07/12] arm: printf() is not available in some SPL configurations Christian Riesch
@ 2011-11-21 17:52 ` Tom Rini
2011-11-22 7:01 ` Christian Riesch
0 siblings, 1 reply; 23+ messages in thread
From: Tom Rini @ 2011-11-21 17:52 UTC (permalink / raw)
To: u-boot
On Mon, Nov 21, 2011 at 9:33 AM, Christian Riesch
<christian.riesch@omicron.at> wrote:
> This patch avoids build breakage for SPLs that do not support printf.
>
> Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Tom Rini <tom.rini@gmail.com>
> ---
> ?arch/arm/lib/eabi_compat.c | ? ?3 +++
> ?1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c
> index eb3e26d..748c808 100644
> --- a/arch/arm/lib/eabi_compat.c
> +++ b/arch/arm/lib/eabi_compat.c
> @@ -13,10 +13,13 @@
>
> ?int raise (int signum)
> ?{
> +#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
> ? ? ? ?printf("raise: Signal # %d caught\n", signum);
> +#endif
> ? ? ? ?return 0;
> ?}
>
> +
> ?/* Dummy function to avoid linker complaints */
> ?void __aeabi_unwind_cpp_pr0(void)
> ?{
No extra white space adding please :) Otherwise
Acked-by: Tom Rini <trini@ti.com>
--
Tom
^ permalink raw reply [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 03/12] arm, da850: Move the definitions of pinmux configurations to the arch tree
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 03/12] arm, da850: Move the definitions of pinmux configurations to the arch tree Christian Riesch
@ 2011-11-21 19:03 ` Mike Frysinger
2011-11-22 7:26 ` Christian Riesch
0 siblings, 1 reply; 23+ messages in thread
From: Mike Frysinger @ 2011-11-21 19:03 UTC (permalink / raw)
To: u-boot
On Monday 21 November 2011 11:33:38 Christian Riesch wrote:
> --- /dev/null
> +++ b/arch/arm/include/asm/arch-davinci/da850_pinmux.h
>
> +const struct pinmux_config spi1_pins[] = {
> + { pinmux(5), 1, 1 },
> + { pinmux(5), 1, 2 },
> + { pinmux(5), 1, 4 },
> + { pinmux(5), 1, 5 }
> +};
variable storage should not be in headers. why can't this be in a C file ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111121/57537a51/attachment.pgp>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 08/12] sf: Add spi_boot() to allow booting from SPI flash in an SPL
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 08/12] sf: Add spi_boot() to allow booting from SPI flash in an SPL Christian Riesch
@ 2011-11-21 19:07 ` Mike Frysinger
2011-11-21 19:13 ` Scott Wood
2011-11-22 7:35 ` Christian Riesch
0 siblings, 2 replies; 23+ messages in thread
From: Mike Frysinger @ 2011-11-21 19:07 UTC (permalink / raw)
To: u-boot
On Monday 21 November 2011 11:33:43 Christian Riesch wrote:
> --- a/drivers/mtd/spi/Makefile
> +++ b/drivers/mtd/spi/Makefile
>
> +ifdef CONFIG_SPL_BUILD
> +ifdef CONFIG_SPL_SPI_LOAD
> +COBJS-y += spi_spl_load.o
> +endif
> +endif
if it's SPL only, then it should probably be in the spl/ tree somewhere ?
> --- /dev/null
> +++ b/drivers/mtd/spi/spi_spl_load.c
>
> + puts("Probing SPI flash...\n");
useless noise ?
> + flash = spi_flash_probe(0, 0, CONFIG_SF_DEFAULT_SPEED, SPI_MODE_3);
hardcoding bus/cs 0:0 doesn't make much sense. push them it into the
arguments to the func, or add dedicated SPL defines for them which default to
0:0.
> --- a/include/spi_flash.h
> +++ b/include/spi_flash.h
>
> +__attribute__((noreturn)) void spi_boot(void);
void spi_boot(void) __noreturn;
> --- a/lib/Makefile
> +++ b/lib/Makefile
>
> COBJS-$(CONFIG_SHA256) += sha256.o
> COBJS-y += strmhz.o
> COBJS-$(CONFIG_RBTREE) += rbtree.o
> +else
> +COBJS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += display_options.o
> endif
unrelated change ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111121/db04d994/attachment.pgp>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 12/12] arm, davinci: Add support for generating AIS images to the Makefile
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 12/12] arm, davinci: Add support for generating AIS images to the Makefile Christian Riesch
@ 2011-11-21 19:09 ` Mike Frysinger
2011-11-22 7:30 ` Christian Riesch
0 siblings, 1 reply; 23+ messages in thread
From: Mike Frysinger @ 2011-11-21 19:09 UTC (permalink / raw)
To: u-boot
On Monday 21 November 2011 11:33:47 Christian Riesch wrote:
> --- a/Makefile
> +++ b/Makefile
>
> +$(obj)u-boot.ais: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
> + $(obj)tools/mkimage -s -n /dev/null -T aisimage \
> + -e $(CONFIG_SPL_TEXT_BASE) -d $(obj)spl/u-boot-spl.bin \
> + $(obj)spl/u-boot-spl.ais
> + $(OBJCOPY) ${OBJCFLAGS} -I binary --pad-to=$(PAD_TO) -O binary
> $(obj)spl/u-boot-spl.ais $(obj)spl/u-boot-spl-pad.ais + cat
> $(obj)spl/u-boot-spl-pad.ais $(obj)u-boot.bin > $(obj)u-boot.ais + rm
> $(obj)spl/u-boot-spl.ais
> + rm $(obj)spl/u-boot-spl-pad.ais
> +
can't this live in arch/arm/.../config.mk somewhere ?
> --- /dev/null
> +++ b/board/davinci/da8xxevm/config.mk
>
> +# required for SPI flash SPL
> +#
> +
> +PAD_TO := 32768
"PAD_TO" is way too generic a name. this should also be a CONFIG_XXX define in
the board config header rather than using config.mk.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111121/c0818339/attachment.pgp>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 08/12] sf: Add spi_boot() to allow booting from SPI flash in an SPL
2011-11-21 19:07 ` Mike Frysinger
@ 2011-11-21 19:13 ` Scott Wood
2011-11-22 7:35 ` Christian Riesch
1 sibling, 0 replies; 23+ messages in thread
From: Scott Wood @ 2011-11-21 19:13 UTC (permalink / raw)
To: u-boot
On 11/21/2011 01:07 PM, Mike Frysinger wrote:
> On Monday 21 November 2011 11:33:43 Christian Riesch wrote:
>> --- a/drivers/mtd/spi/Makefile
>> +++ b/drivers/mtd/spi/Makefile
>>
>> +ifdef CONFIG_SPL_BUILD
>> +ifdef CONFIG_SPL_SPI_LOAD
>> +COBJS-y += spi_spl_load.o
>> +endif
>> +endif
>
> if it's SPL only, then it should probably be in the spl/ tree somewhere ?
That's not how the NAND stuff got done -- we should be consistent here.
I think it's nice to keep all drivers, SPL or not, for a given type of
hardware in one place.
-Scott
^ permalink raw reply [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 07/12] arm: printf() is not available in some SPL configurations
2011-11-21 17:52 ` Tom Rini
@ 2011-11-22 7:01 ` Christian Riesch
0 siblings, 0 replies; 23+ messages in thread
From: Christian Riesch @ 2011-11-22 7:01 UTC (permalink / raw)
To: u-boot
Hello Tom,
On Mon, Nov 21, 2011 at 6:52 PM, Tom Rini <tom.rini@gmail.com> wrote:
> On Mon, Nov 21, 2011 at 9:33 AM, Christian Riesch
> <christian.riesch@omicron.at> wrote:
>> This patch avoids build breakage for SPLs that do not support printf.
>>
>> Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
>> Cc: Wolfgang Denk <wd@denx.de>
>> Cc: Tom Rini <tom.rini@gmail.com>
>> ---
>> ?arch/arm/lib/eabi_compat.c | ? ?3 +++
>> ?1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c
>> index eb3e26d..748c808 100644
>> --- a/arch/arm/lib/eabi_compat.c
>> +++ b/arch/arm/lib/eabi_compat.c
>> @@ -13,10 +13,13 @@
>>
>> ?int raise (int signum)
>> ?{
>> +#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
>> ? ? ? ?printf("raise: Signal # %d caught\n", signum);
>> +#endif
>> ? ? ? ?return 0;
>> ?}
>>
>> +
>> ?/* Dummy function to avoid linker complaints */
>> ?void __aeabi_unwind_cpp_pr0(void)
>> ?{
>
> No extra white space adding please :) ?Otherwise
Ok, I'll remove that line and resubmit the patch.
> Acked-by: Tom Rini <trini@ti.com>
Thanks, Christian
^ permalink raw reply [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 03/12] arm, da850: Move the definitions of pinmux configurations to the arch tree
2011-11-21 19:03 ` Mike Frysinger
@ 2011-11-22 7:26 ` Christian Riesch
0 siblings, 0 replies; 23+ messages in thread
From: Christian Riesch @ 2011-11-22 7:26 UTC (permalink / raw)
To: u-boot
Hello Mike,
Thank you for your comments.
On Mon, Nov 21, 2011 at 8:03 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Monday 21 November 2011 11:33:38 Christian Riesch wrote:
>> --- /dev/null
>> +++ b/arch/arm/include/asm/arch-davinci/da850_pinmux.h
>>
>> +const struct pinmux_config spi1_pins[] = {
>> + ? ? { pinmux(5), 1, 1 },
>> + ? ? { pinmux(5), 1, 2 },
>> + ? ? { pinmux(5), 1, 4 },
>> + ? ? { pinmux(5), 1, 5 }
>> +};
>
> variable storage should not be in headers. ?why can't this be in a C file ?
Ok, I'll move them to a C file.
Regards, Christian
^ permalink raw reply [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 12/12] arm, davinci: Add support for generating AIS images to the Makefile
2011-11-21 19:09 ` Mike Frysinger
@ 2011-11-22 7:30 ` Christian Riesch
2011-11-22 20:57 ` Mike Frysinger
0 siblings, 1 reply; 23+ messages in thread
From: Christian Riesch @ 2011-11-22 7:30 UTC (permalink / raw)
To: u-boot
Hello Mike,
Thank you for your comments.
On Mon, Nov 21, 2011 at 8:09 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Monday 21 November 2011 11:33:47 Christian Riesch wrote:
>> --- a/Makefile
>> +++ b/Makefile
>>
>> +$(obj)u-boot.ais: ? ? ? $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
>> + ? ? ? ? ? ? $(obj)tools/mkimage -s -n /dev/null -T aisimage \
>> + ? ? ? ? ? ? -e $(CONFIG_SPL_TEXT_BASE) -d $(obj)spl/u-boot-spl.bin \
>> + ? ? ? ? ? ? $(obj)spl/u-boot-spl.ais
>> + ? ? ? ? ? ? $(OBJCOPY) ${OBJCFLAGS} -I binary --pad-to=$(PAD_TO) -O binary
>> $(obj)spl/u-boot-spl.ais $(obj)spl/u-boot-spl-pad.ais + ? ? ? ? ? ? ? cat
>> $(obj)spl/u-boot-spl-pad.ais $(obj)u-boot.bin > $(obj)u-boot.ais + ? ? ? ? ? ?rm
>> $(obj)spl/u-boot-spl.ais
>> + ? ? ? ? ? ? rm $(obj)spl/u-boot-spl-pad.ais
>> +
>
> can't this live in arch/arm/.../config.mk somewhere ?
I guess it could. I placed it in Makefile since there are already a
lot of similar targets there, like $(obj)u-boot.kwb, $(obj)u-boot.imx,
$(obj)u-boot.ubl...
>
>> --- /dev/null
>> +++ b/board/davinci/da8xxevm/config.mk
>>
>> +# required for SPI flash SPL
>> +#
>> +
>> +PAD_TO ? ? ? := 32768
>
> "PAD_TO" is way too generic a name. ?this should also be a CONFIG_XXX define in
> the board config header rather than using config.mk.
Ok. I'll find a different name. I used $(PAD_TO) since the
$(obj)u-boot.ubl target in Makefile already uses this name.
Regards, Christian
^ permalink raw reply [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 08/12] sf: Add spi_boot() to allow booting from SPI flash in an SPL
2011-11-21 19:07 ` Mike Frysinger
2011-11-21 19:13 ` Scott Wood
@ 2011-11-22 7:35 ` Christian Riesch
1 sibling, 0 replies; 23+ messages in thread
From: Christian Riesch @ 2011-11-22 7:35 UTC (permalink / raw)
To: u-boot
Hello Mike,
Thank you for your comments.
On Mon, Nov 21, 2011 at 8:07 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Monday 21 November 2011 11:33:43 Christian Riesch wrote:
>> --- a/drivers/mtd/spi/Makefile
>> +++ b/drivers/mtd/spi/Makefile
>>
>> +ifdef CONFIG_SPL_BUILD
>> +ifdef CONFIG_SPL_SPI_LOAD
>> +COBJS-y += spi_spl_load.o
>> +endif
>> +endif
>
> if it's SPL only, then it should probably be in the spl/ tree somewhere ?
As Scott already posted, something similar was introduced for nand in
commit 435199f38020c294659a44607ca0e1b6f0ed1542 and it is in
drivers/mtd/nand.
>> --- /dev/null
>> +++ b/drivers/mtd/spi/spi_spl_load.c
>>
>> + ? ? puts("Probing SPI flash...\n");
>
> useless noise ?
Yes :-) Will be removed.
>
>> + ? ? flash = spi_flash_probe(0, 0, CONFIG_SF_DEFAULT_SPEED, SPI_MODE_3);
>
> hardcoding bus/cs 0:0 doesn't make much sense. ?push them it into the
> arguments to the func, or add dedicated SPL defines for them which default to
> 0:0.
Ok, I'll change that.
>> --- a/include/spi_flash.h
>> +++ b/include/spi_flash.h
>>
>> +__attribute__((noreturn)) void spi_boot(void);
>
> void spi_boot(void) __noreturn;
>
>> --- a/lib/Makefile
>> +++ b/lib/Makefile
>>
>> ?COBJS-$(CONFIG_SHA256) += sha256.o
>> ?COBJS-y ? ? ?+= strmhz.o
>> ?COBJS-$(CONFIG_RBTREE) ? ? ? += rbtree.o
>> +else
>> +COBJS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += display_options.o
>> ?endif
>
> unrelated change ?
Not completely unrelated. It's a dependency to make
CONFIG_SPL_SPI_FLASH_SUPPORT compile. But it should probably be moved
to a separate patch.
Regards, Christian
^ permalink raw reply [flat|nested] 23+ messages in thread
* [U-Boot] [RFC PATCH v2 12/12] arm, davinci: Add support for generating AIS images to the Makefile
2011-11-22 7:30 ` Christian Riesch
@ 2011-11-22 20:57 ` Mike Frysinger
0 siblings, 0 replies; 23+ messages in thread
From: Mike Frysinger @ 2011-11-22 20:57 UTC (permalink / raw)
To: u-boot
On Tuesday 22 November 2011 02:30:59 Christian Riesch wrote:
> Hello Mike,
> Thank you for your comments.
>
> On Mon, Nov 21, 2011 at 8:09 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> > On Monday 21 November 2011 11:33:47 Christian Riesch wrote:
> >> --- a/Makefile
> >> +++ b/Makefile
> >>
> >> +$(obj)u-boot.ais: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
> >> + $(obj)tools/mkimage -s -n /dev/null -T aisimage \
> >> + -e $(CONFIG_SPL_TEXT_BASE) -d $(obj)spl/u-boot-spl.bin \
> >> + $(obj)spl/u-boot-spl.ais
> >> + $(OBJCOPY) ${OBJCFLAGS} -I binary --pad-to=$(PAD_TO) -O
> >> binary $(obj)spl/u-boot-spl.ais $(obj)spl/u-boot-spl-pad.ais +
> >> cat $(obj)spl/u-boot-spl-pad.ais $(obj)u-boot.bin >
> >> $(obj)u-boot.ais + rm $(obj)spl/u-boot-spl.ais
> >> + rm $(obj)spl/u-boot-spl-pad.ais
> >> +
> >
> > can't this live in arch/arm/.../config.mk somewhere ?
>
> I guess it could. I placed it in Makefile since there are already a
> lot of similar targets there, like $(obj)u-boot.kwb, $(obj)u-boot.imx,
> $(obj)u-boot.ubl...
we need to clean this up. if moving the target to a cpu config.mk doesn't
work, then we can leave it alone for now until we generally clean this cruft
up.
> >> --- /dev/null
> >> +++ b/board/davinci/da8xxevm/config.mk
> >>
> >> +# required for SPI flash SPL
> >> +#
> >> +
> >> +PAD_TO := 32768
> >
> > "PAD_TO" is way too generic a name. this should also be a CONFIG_XXX
> > define in the board config header rather than using config.mk.
>
> Ok. I'll find a different name. I used $(PAD_TO) since the
> $(obj)u-boot.ubl target in Makefile already uses this name.
we should fix that too ;)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111122/f4282827/attachment.pgp>
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2011-11-22 20:57 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1321893227-19545-1-git-send-email-christian.riesch@omicron.at>
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 00/12] *** SUBJECT HERE *** Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 01/12] arm, davinci: Move pinmux functions from board to arch tree Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 02/12] arm, hawkboard: Remove obsolete struct pinmux_config i2c_pins Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 03/12] arm, da850: Move the definitions of pinmux configurations to the arch tree Christian Riesch
2011-11-21 19:03 ` Mike Frysinger
2011-11-22 7:26 ` Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 04/12] arm, da830: " Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 05/12] arm, davinci: Remove duplication of pinmux configuration code Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 06/12] arm, davinci: Fix clear bss loop for zero length bss Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 07/12] arm: printf() is not available in some SPL configurations Christian Riesch
2011-11-21 17:52 ` Tom Rini
2011-11-22 7:01 ` Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 08/12] sf: Add spi_boot() to allow booting from SPI flash in an SPL Christian Riesch
2011-11-21 19:07 ` Mike Frysinger
2011-11-21 19:13 ` Scott Wood
2011-11-22 7:35 ` Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 09/12] arm, davinci: Add SPL support for DA850 SoCs Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 10/12] arm, da850evm: Add an SPL for SPI boot Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 11/12] mkimage: Fix variable length header support Christian Riesch
2011-11-21 16:33 ` [U-Boot] [RFC PATCH v2 12/12] arm, davinci: Add support for generating AIS images to the Makefile Christian Riesch
2011-11-21 19:09 ` Mike Frysinger
2011-11-22 7:30 ` Christian Riesch
2011-11-22 20:57 ` Mike Frysinger
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.