Skip to contentSkip to conversation

ORIGEN Board Support

PATCH Superseded Chander Kashyap 3 participants 5 messages Jul 18, 2011 – Jul 26, 2011 Arm/actions semi architecture

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v3 cover ORIGEN Board Support

Adds support for ORIGEN board with MMC Booting.

Chander Kashyap (2):
ARMV7: Add support for Samsung ORIGEN board
ORIGEN: Add MMC SPL support

 MAINTAINERS                                       |    1 +
 board/samsung/origen/Makefile                     |   46 ++
 board/samsung/origen/lowlevel_init.S              |  464 +++++++++++++++++++++
 board/samsung/origen/mem_setup.S                  |  359 ++++++++++++++++
 board/samsung/origen/origen.c                     |  106 +++++
 boards.cfg                                        |    1 +
 include/configs/origen.h                          |  164 ++++++++
 mmc_spl/board/samsung/origen/Makefile             |  105 +++++
 mmc_spl/board/samsung/origen/mmc_boot.c           |   71 ++++
 mmc_spl/board/samsung/origen/tools/mkv310_image.c |  140 +++++++
 mmc_spl/board/samsung/origen/u-boot.lds           |   86 ++++
 11 files changed, 1543 insertions(+), 0 deletions(-)
 create mode 100644 board/samsung/origen/Makefile
 create mode 100644 board/samsung/origen/lowlevel_init.S
 create mode 100644 board/samsung/origen/mem_setup.S
 create mode 100644 board/samsung/origen/origen.c
 create mode 100644 include/configs/origen.h
 create mode 100644 mmc_spl/board/samsung/origen/Makefile
 create mode 100644 mmc_spl/board/samsung/origen/mmc_boot.c
 create mode 100644 mmc_spl/board/samsung/origen/tools/mkv310_image.c
 create mode 100644 mmc_spl/board/samsung/origen/u-boot.lds
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH v3 1/2 ARMV7: Add support for Samsung ORIGEN board

Origen board is based upon S5PV310 SoC which is similiar to S5PC210 SoC.

---
Changes for v2:
- None
Changes for v3:
- Board entry added Alphabetically in boards.cfg
- Used get_Ram_size function to calculate ram size

 MAINTAINERS                          |    1 +
 board/samsung/origen/Makefile        |   46 ++++
 board/samsung/origen/lowlevel_init.S |  464 ++++++++++++++++++++++++++++++++++
 board/samsung/origen/mem_setup.S     |  359 ++++++++++++++++++++++++++
 board/samsung/origen/origen.c        |  106 ++++++++
 boards.cfg                           |    1 +
 include/configs/origen.h             |  164 ++++++++++++
 7 files changed, 1141 insertions(+), 0 deletions(-)
 create mode 100644 board/samsung/origen/Makefile
 create mode 100644 board/samsung/origen/lowlevel_init.S
 create mode 100644 board/samsung/origen/mem_setup.S
 create mode 100644 board/samsung/origen/origen.c
 create mode 100644 include/configs/origen.h
MAINTAINERS +1 -0
index 2bba7b4..e5fd6ea 100644
@@ -703,6 +703,7 @@ Minkyu Kang <[email protected]>
 
 Chander Kashyap <[email protected]>
 
+	origen			ARM ARMV7 (S5PC210 SoC)
 	SMDKV310		ARM ARMV7 (S5PC210 SoC)
 
 Frederik Kriewitz <[email protected]>
board/samsung/origen/Makefile new file +46 -0

46 lines not on this page · raw message

board/samsung/origen/lowlevel_init.S new file +464 -0

464 lines not on this page · raw message

board/samsung/origen/mem_setup.S new file +359 -0

359 lines not on this page · raw message

board/samsung/origen/origen.c new file +106 -0

106 lines not on this page · raw message

boards.cfg +1 -0
index dfefc3f..d7ef8ef 100644
@@ -159,6 +159,7 @@ omap4_panda                  arm         armv7       panda               ti
 omap4_sdp4430                arm         armv7       sdp4430             ti             omap4
 s5p_goni                     arm         armv7       goni                samsung        s5pc1xx
 smdkc100                     arm         armv7       smdkc100            samsung        s5pc1xx
+origen			     arm	 armv7	     origen		 samsung	s5pc2xx
 s5pc210_universal            arm         armv7       universal_c210      samsung        s5pc2xx
 smdkv310		     arm	 armv7	     smdkv310		 samsung	s5pc2xx
 harmony                      arm         armv7       harmony             nvidia         tegra2
include/configs/origen.h new file +164 -0

164 lines not on this page · raw message

Signature · 1 line
1.7.4.1
#2 lore raw

PATCH v3 1/2 ARMV7: Add support for Samsung ORIGEN board

Dear Chander Kashyap,

Quoted 18 lines · Chander Kashyap

Origen board is based upon S5PV310 SoC which is similiar to S5PC210 SoC.

---
?Changes for v2:
? ? ? ?- None
?Changes for v3:
? ? ? ?- Board entry added Alphabetically in boards.cfg ? ? ? ?- Used get_Ram_size function to calculate ram size

?MAINTAINERS ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?1 +
?board/samsung/origen/Makefile ? ? ? ?| ? 46 ++++
?board/samsung/origen/lowlevel_init.S | ?464 ++++++++++++++++++++++++++++++++++
?board/samsung/origen/mem_setup.S ? ? | ?359 ++++++++++++++++++++++++++
?board/samsung/origen/origen.c ? ? ? ?| ?106 ++++++++
?boards.cfg ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ?1 +
?include/configs/origen.h ? ? ? ? ? ? | ?164 ++++++++++++
Quoted 7 lines

?7 files changed, 1141 insertions(+), 0 deletions(-) ?create mode 100644 board/samsung/origen/Makefile ?create mode 100644 board/samsung/origen/lowlevel_init.S ?create mode 100644 board/samsung/origen/mem_setup.S ?create mode 100644 board/samsung/origen/origen.c ?create mode 100644 include/configs/origen.h

Looks OK.
But, your patch failed to apply.

error: patch failed: MAINTAINERS:703
error: MAINTAINERS: patch does not apply
Patch failed at 0001 ARMV7: Add support for Samsung ORIGEN board

please rebase your patch.

and need one change.
Please see below link and apply it.
http://git.denx.de/?p=u-boot/u-boot-samsung.git;a=commitdiff;h=095ae309787f242067d122d98a7025b4136aadc0

Thanks
Minkyu Kang.

Signature · 2 lines
from. prom.
www.promsoft.net
#3 lore raw

PATCH v3 1/2 ARMV7: Add support for Samsung ORIGEN board

In reply to Chander Kashyap
Quoted 10 lines · Chander Kashyap

Origen board is based upon S5PV310 SoC which is similiar to S5PC210 SoC.

---
Changes for v2:

(quoted diff) +0 -0
 	- None
 Changes for v3:
 	- Board entry added Alphabetically in boards.cfg

- Used get_Ram_size function to calculate ram size

[...]

Quoted 5 lines
board/samsung/origen/origen.c new file +0 -0
new file mode 100644
index 0000000..6dd1709

[...]

board/samsung/origen/origen.c line 38

Quoted 7 lines
board/samsung/origen/origen.c new file +7 -0
+
+int board_init(void)
+{
+	gpio1 = (struct s5pc210_gpio_part1 *) S5PC210_GPIO_PART1_BASE;
+	gpio2 = (struct s5pc210_gpio_part2 *) S5PC210_GPIO_PART2_BASE;
+
+	gd->bd->bi_arch_number = MACH_TYPE_ORIGEN;

This should be done in the board config file.
Please, see the CONFIG_MACH_TYPE in the U-Boot documentation (README file).

[...]

Quoted 5 lines
include/configs/origen.h new file +0 -0
new file mode 100644
index 0000000..441b311

[...]

include/configs/origen.h line 57

Quoted 2 lines
include/configs/origen.h new file +2 -0
+/* MACH_TYPE_ORIGEN macro will be removed once added to mach-types */
+#define MACH_TYPE_ORIGEN		3455

#define CONFIG_MACH_TYPE MACH_TYPE_ORIGEN

Signature · 2 lines
Regards,
Igor.
#4 lore raw

PATCH v3 2/2 ORIGEN: Add MMC SPL support

In reply to Chander Kashyap

Adds mmc boot support.

---
Changes for v2:
- Added Dirk Behme's patch
- SMDKV310: Fix host compilation of mkv310_image
Changes for v3:
- None

 mmc_spl/board/samsung/origen/Makefile             |  105 +++++++++++++++
 mmc_spl/board/samsung/origen/mmc_boot.c           |   71 +++++++++++
 mmc_spl/board/samsung/origen/tools/mkv310_image.c |  140 +++++++++++++++++++++
 mmc_spl/board/samsung/origen/u-boot.lds           |   86 +++++++++++++
 4 files changed, 402 insertions(+), 0 deletions(-)
 create mode 100644 mmc_spl/board/samsung/origen/Makefile
 create mode 100644 mmc_spl/board/samsung/origen/mmc_boot.c
 create mode 100644 mmc_spl/board/samsung/origen/tools/mkv310_image.c
 create mode 100644 mmc_spl/board/samsung/origen/u-boot.lds
mmc_spl/board/samsung/origen/Makefile new file +105 -0
new file mode 100644
index 0000000..7b62684
@@ -0,0 +1,105 @@
+#
+# (C) Copyright 2006-2007
+# Stefan Roese, DENX Software Engineering, sr at denx.de.
+#
+# (C) Copyright 2008
+# Guennadi Liakhovetki, DENX Software Engineering, <[email protected]>
+#
+# (C) Copyright 2011
+# Chander Kashyap, Samsung Electronics, <[email protected]>
+#
+# 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
+#
+
+CONFIG_MMC_SPL	= y
+
+include $(TOPDIR)/config.mk
+
+LDSCRIPT= $(TOPDIR)/mmc_spl/board/$(BOARDDIR)/u-boot.lds
+LDFLAGS	= -Bstatic -T $(mmcobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(PLATFORM_LDFLAGS)
+AFLAGS	+= -DCONFIG_MMC_SPL
+CFLAGS	+= -DCONFIG_MMC_SPL
+CFLAGS	+= -DCONFIG_PRELOADER
+
+SOBJS	= start.o mem_setup.o lowlevel_init.o
+COBJS	= mmc_boot.o
+
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
+__OBJS	:= $(SOBJS) $(COBJS)
+LNDIR	:= $(OBJTREE)/mmc_spl/board/$(BOARDDIR)
+
+mmcobj	:= $(OBJTREE)/mmc_spl/
+
+
+MKV310_MMC_SPL_EXEC = mkv310_mmc_spl_exec
+MMC_SPL_BIN = u-boot-mmc-spl.bin
+
+ALL = $(mmcobj)u-boot-spl $(mmcobj)u-boot-spl.bin $(mmcobj)$(MMC_SPL_BIN)
+
+all:    $(obj).depend $(ALL)
+
+$(mmcobj)$(MMC_SPL_BIN):  $(mmcobj)u-boot-spl.bin tools/$(MKV310_MMC_SPL_EXEC)
+	./tools/$(MKV310_MMC_SPL_EXEC) $(mmcobj)u-boot-spl.bin $(mmcobj)$(MMC_SPL_BIN)
+	rm -f tools/$(MKV310_MMC_SPL_EXEC)
+
+tools/$(MKV310_MMC_SPL_EXEC): tools/mkv310_image.c
+	$(HOSTCC) tools/mkv310_image.c -o tools/$(MKV310_MMC_SPL_EXEC)
+
+$(mmcobj)u-boot-spl.bin:	$(mmcobj)u-boot-spl
+	$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
+
+$(mmcobj)u-boot-spl:	$(OBJS) $(mmcobj)u-boot.lds
+	cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) \
+		-Map $(mmcobj)u-boot-spl.map \
+		-o $(mmcobj)u-boot-spl
+
+$(mmcobj)u-boot.lds: $(LDSCRIPT)
+	$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+
+# create symbolic links for common files
+
+# from cpu directory
+start.S:
+	@rm -f $@
+	@ln -s $(TOPDIR)/arch/arm/cpu/armv7/start.S $@
+
+# from board directory
+mem_setup.S:
+	@rm -f $@
+	@ln -s $(TOPDIR)/board/samsung/origen/mem_setup.S $@
+
+lowlevel_init.S:
+	@rm -f $@
+	@ln -s $(TOPDIR)/board/samsung/origen/lowlevel_init.S $@
+
+#########################################################################
+
+$(obj)%.o:	%.S
+	$(CC) $(AFLAGS) -c -o $@ $<
+
+$(obj)%.o:	%.c
+	$(CC) $(CFLAGS) -c -o $@ $<
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
mmc_spl/board/samsung/origen/mmc_boot.c new file +71 -0

71 lines not on this page · raw message

mmc_spl/board/samsung/origen/tools/mkv310_image.c new file +140 -0

140 lines not on this page · raw message

mmc_spl/board/samsung/origen/u-boot.lds new file +86 -0

86 lines not on this page · raw message

Signature · 1 line
1.7.4.1