Skip to contentSkip to conversation

SMDK6400 support

PATCH Superseded Guennadi Liakhovetski 3 participants 12 messages Aug 5, 2008 – Aug 6, 2008

Subsystems (6)

v5 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v5 cover SMDK6400 support

Version 5: This time based on nand-flash/testing head. Therefore it couldn't be runtime-tested: largepage support in nand_spl is broken there ATM. Otherwise all comments have been taken care of. After nand_spl is fixed for largepage NAND devices, this will be tested, if needed, v6 will be submitted.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de

#1 lore raw

PATCH v5 1/7 Add definition for the AM29LV800BB AMD NOR-flash

---
 drivers/mtd/jedec_flash.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
drivers/mtd/jedec_flash.c +17 -0
index 9845e93..020647a 100644
@@ -234,6 +234,23 @@ static const struct amd_flash_info jedec_table[] = {
 			ERASEINFO(0x10000,7),
 		}
 	},
+	{
+		.mfr_id		= MANUFACTURER_AMD,
+		.dev_id		= AM29LV800BB,
+		.name		= "AMD AM29LV800BB",
+		.uaddr		= {
+			[1] = MTD_UADDR_0x0555_0x02AA /* x16 */
+		},
+		.DevSize	= SIZE_1MiB,
+		.CmdSet		= CFI_CMDSET_AMD_LEGACY,
+		.NumEraseRegions= 4,
+		.regions	= {
+			ERASEINFO(0x04000, 1),
+			ERASEINFO(0x02000, 2),
+			ERASEINFO(0x08000, 1),
+			ERASEINFO(0x10000, 15),
+		}
+	},
 #endif
 };
 
Signature · 1 line
1.5.4
#2 lore raw

PATCH v5 1/7 Add definition for the AM29LV800BB AMD NOR-flash

Quoted 1 line · Guennadi Liakhovetski

Applied to next brach of u-boot-cfi-flash repository.

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================

#3 lore raw

PATCH v5 2/7 Simplify reading of the bad-block marker, use chipselect

In reply to Guennadi Liakhovetski

We have to read a whole page on large-page NAND chips, at least the chip installed on SMDK6400 can only read whole pages with READ0. Also activate chipselect before using the chip, and deactivate it afterwards.

---
 nand_spl/nand_boot.c |   69 +++++++++++++++++++++++++++----------------------
 1 files changed, 38 insertions(+), 31 deletions(-)
nand_spl/nand_boot.c +38 -31
index 0f56ba5..8cd0046 100644
@@ -132,21 +132,6 @@ static int nand_command(struct mtd_info *mtd, int block, int page, int offs, u8
 }
 #endif
 
-static int nand_is_bad_block(struct mtd_info *mtd, int block)
-{
-	struct nand_chip *this = mtd->priv;
-
-	nand_command(mtd, block, 0, CFG_NAND_BAD_BLOCK_POS, NAND_CMD_READOOB);
-
-	/*
-	 * Read one byte
-	 */
-	if (in_8(this->IO_ADDR_R) != 0xff)
-		return 1;
-
-	return 0;
-}
-
 static int nand_read_page(struct mtd_info *mtd, int block, int page, uchar *dst)
 {
 	struct nand_chip *this = mtd->priv;
@@ -154,8 +139,6 @@ static int nand_read_page(struct mtd_info *mtd, int block, int page, uchar *dst)
 	u_char *ecc_code;
 	u_char *oob_data;
 	int i;
-	int eccsize = CFG_NAND_ECCSIZE;
-	int eccbytes = CFG_NAND_ECCBYTES;
 	int eccsteps = CFG_NAND_ECCSTEPS;
 	uint8_t *p = dst;
 	int stat;
@@ -167,11 +150,12 @@ static int nand_read_page(struct mtd_info *mtd, int block, int page, uchar *dst)
 	 */
 	ecc_calc = (u_char *)(CFG_SDRAM_BASE + 0x10000);
 	ecc_code = ecc_calc + 0x100;
-	oob_data = ecc_calc + 0x200;
+	oob_data = p + CFG_NAND_PAGE_SIZE; /* Append OOB to the page data */
 
-	for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
+	for (i = 0; eccsteps;
+	     eccsteps--, i += CFG_NAND_ECCBYTES, p += CFG_NAND_ECCSIZE) {
 		this->ecc.hwctl(mtd, NAND_ECC_READ);
-		this->read_buf(mtd, p, eccsize);
+		this->read_buf(mtd, p, CFG_NAND_ECCSIZE);
 		this->ecc.calculate(mtd, p, &ecc_calc[i]);
 	}
 	this->read_buf(mtd, oob_data, CFG_NAND_OOBSIZE);
@@ -183,7 +167,8 @@ static int nand_read_page(struct mtd_info *mtd, int block, int page, uchar *dst)
 	eccsteps = CFG_NAND_ECCSTEPS;
 	p = dst;
 
-	for (i = 0 ; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
+	for (i = 0; eccsteps;
+	     eccsteps--, i += CFG_NAND_ECCBYTES, p += CFG_NAND_ECCSIZE) {
 		/* No chance to do something with the possible error message
 		 * from correct_data(). We just hope that all possible errors
 		 * are corrected by this routine.
@@ -199,25 +184,41 @@ static int nand_load(struct mtd_info *mtd, int offs, int uboot_size, uchar *dst)
 	int block;
 	int blockcopy_count;
 	int page;
+	unsigned int read = 0;
 
 	/*
-	 * offs has to be aligned to a block address!
+	 * offs has to be aligned to a page address!
 	 */
 	block = offs / CFG_NAND_BLOCK_SIZE;
+	/* Recalculate offs as an offset inside a block */
+	offs -= CFG_NAND_BLOCK_SIZE * block;
 	blockcopy_count = 0;
 
-	while (blockcopy_count < (uboot_size / CFG_NAND_BLOCK_SIZE)) {
-		if (!nand_is_bad_block(mtd, block)) {
-			/*
-			 * Skip bad blocks
-			 */
-			for (page = 0; page < CFG_NAND_PAGE_COUNT; page++) {
-				nand_read_page(mtd, block, page, dst);
-				dst += CFG_NAND_PAGE_SIZE;
+	while (blockcopy_count < ((uboot_size + CFG_NAND_BLOCK_SIZE - 1) /
+				  CFG_NAND_BLOCK_SIZE)) {
+		/*
+		 * Skip bad blocks
+		 */
+		int badblock = 0;
+		for (page = 0; page < CFG_NAND_PAGE_COUNT; page++) {
+			nand_read_page(mtd, block, page, dst);
+			if ((page == 0
+#ifdef CFG_NAND_BBT_2NDPAGE
+			     || page == 1
+#endif
+				    ) && dst[CFG_NAND_PAGE_SIZE +
+					     CFG_NAND_BAD_BLOCK_POS] != 0xff) {
+				badblock = 1;
+				break;
 			}
+			/* Overwrite skipped pages */
+			if (read >= offs)
+				dst += CFG_NAND_PAGE_SIZE;
+			read += CFG_NAND_PAGE_SIZE;
+		}
 
+		if (!badblock)
 			blockcopy_count++;
-		}
 
 		block++;
 	}
@@ -245,12 +246,18 @@ void nand_boot(void)
 	nand_chip.dev_ready = NULL;	/* preset to NULL */
 	board_nand_init(&nand_chip);
 
+	if (nand_chip.select_chip)
+		nand_chip.select_chip(&nand_info, 0);
+
 	/*
 	 * Load U-Boot image from NAND into RAM
 	 */
 	ret = nand_load(&nand_info, CFG_NAND_U_BOOT_OFFS, CFG_NAND_U_BOOT_SIZE,
 			(uchar *)CFG_NAND_U_BOOT_DST);
 
+	if (nand_chip.select_chip)
+		nand_chip.select_chip(&nand_info, -1);
+
 	/*
 	 * Jump to U-Boot image
 	 */
Signature · 1 line
1.5.4
#4 lore raw

PATCH v5 2/7 Simplify reading of the bad-block marker, use chipselect

Quoted 9 lines · Guennadi Liakhovetski
nand_spl/nand_boot.c +3 -1
 	/*
-	 * offs has to be aligned to a block address!
+	 * offs has to be aligned to a page address!
 	 */
 	block = offs / CFG_NAND_BLOCK_SIZE;
+	/* Recalculate offs as an offset inside a block */
+	offs -= CFG_NAND_BLOCK_SIZE * block;
 	blockcopy_count = 0;
 

nand_spl/nand_boot.c static int nand_load(struct mtd_info *mtd, int offs, int uboot_size, uchar *dst) · line 198

Quoted 10 lines
nand_spl/nand_boot.c +2 -8
-	while (blockcopy_count < (uboot_size / CFG_NAND_BLOCK_SIZE)) {
-		if (!nand_is_bad_block(mtd, block)) {
-			/*
-			 * Skip bad blocks
-			 */
-			for (page = 0; page < CFG_NAND_PAGE_COUNT; page++) {
-				nand_read_page(mtd, block, page, dst);
-				dst += CFG_NAND_PAGE_SIZE;
+	while (blockcopy_count < ((uboot_size + CFG_NAND_BLOCK_SIZE - 1) /
+				  CFG_NAND_BLOCK_SIZE)) {

If you're going to allow offs to be block-unaligned, I think this calculation needs to change. For example: blocksize 16K, offset 14K, and length 256K would try to read 16 blocks, when it needs to read 17.

-Scott

#5 lore raw

PATCH v5 3/7 ARM: Add arm1176 core with S3C6400 SoC

In reply to Guennadi Liakhovetski

Based on the original S3C64XX port by Samsung for U-Boot 1.1.6.

---
 cpu/arm1176/Makefile                    |   50 ++
 cpu/arm1176/config.mk                   |   35 ++
 cpu/arm1176/cpu.c                       |  189 +++++++
 cpu/arm1176/s3c64xx/Makefile            |   48 ++
 cpu/arm1176/s3c64xx/config.mk           |   34 ++
 cpu/arm1176/s3c64xx/cpu_init.S          |  142 +++++
 cpu/arm1176/s3c64xx/interrupts.c        |  280 ++++++++++
 cpu/arm1176/s3c64xx/speed.c             |  140 +++++
 cpu/arm1176/start.S                     |  469 ++++++++++++++++
 include/asm-arm/arch-s3c64xx/hardware.h |   63 +++
 include/common.h                        |    3 +-
 include/s3c6400.h                       |  884 +++++++++++++++++++++++++++++++
 include/s3c64x0.h                       |   92 ++++
 13 files changed, 2428 insertions(+), 1 deletions(-)
 create mode 100644 cpu/arm1176/Makefile
 create mode 100644 cpu/arm1176/config.mk
 create mode 100644 cpu/arm1176/cpu.c
 create mode 100644 cpu/arm1176/s3c64xx/Makefile
 create mode 100644 cpu/arm1176/s3c64xx/config.mk
 create mode 100644 cpu/arm1176/s3c64xx/cpu_init.S
 create mode 100644 cpu/arm1176/s3c64xx/interrupts.c
 create mode 100644 cpu/arm1176/s3c64xx/speed.c
 create mode 100644 cpu/arm1176/start.S
 create mode 100644 include/asm-arm/arch-s3c64xx/hardware.h
 create mode 100644 include/s3c6400.h
 create mode 100644 include/s3c64x0.h
cpu/arm1176/Makefile new file +50 -0
new file mode 100644
index 0000000..1ca9199
@@ -0,0 +1,50 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# (C) Copyright 2008
+# Guennadi Liakhovetki, DENX Software Engineering, <[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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(CPU).a
+
+START	= start.o
+COBJS	= cpu.o
+
+SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS) $(SOBJS))
+START	:= $(addprefix $(obj),$(START))
+
+all:	$(obj).depend $(START) $(LIB)
+
+$(LIB):	$(OBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS)
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
cpu/arm1176/config.mk new file +35 -0
new file mode 100644
index 0000000..5083594
@@ -0,0 +1,35 @@
+#
+# (C) Copyright 2002
+# Gary Jennejohn, DENX Software Engineering, <[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
+#
+PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno-common -ffixed-r8 \
+	-msoft-float
+
+# Make ARMv5 to allow more compilers to work, even though its v6.
+PLATFORM_CPPFLAGS += -march=armv5t
+# =========================================================================
+#
+# Supply options according to compiler version
+#
+# =========================================================================
+PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
+PLATFORM_CPPFLAGS +=$(call cc-option,-mno-thumb-interwork,)
+PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
cpu/arm1176/cpu.c new file +189 -0

189 lines not on this page · raw message

cpu/arm1176/s3c64xx/Makefile new file +48 -0

48 lines not on this page · raw message

cpu/arm1176/s3c64xx/config.mk new file +34 -0
new file mode 100644
index 0000000..204e880
@@ -0,0 +1,34 @@
+#
+# (C) Copyright 2002
+# Gary Jennejohn, DENX Software Engineering, <[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
+#
+PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno-common -ffixed-r8 \
+	-msoft-float
+
+# Make ARMv5 to allow more compilers to work, even though its v6.
+PLATFORM_CPPFLAGS += -march=armv5t
+# =========================================================================
+#
+# Supply options according to compiler version
+#
+# =========================================================================
+#PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
+PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
cpu/arm1176/s3c64xx/cpu_init.S new file +142 -0

142 lines not on this page · raw message

cpu/arm1176/s3c64xx/interrupts.c new file +280 -0

280 lines not on this page · raw message

cpu/arm1176/s3c64xx/speed.c new file +140 -0

140 lines not on this page · raw message

cpu/arm1176/start.S new file +469 -0

469 lines not on this page · raw message

include/asm-arm/arch-s3c64xx/hardware.h new file +63 -0

63 lines not on this page · raw message

include/common.h +2 -1
index 06ed278..ba87322 100644
@@ -491,7 +491,8 @@ int	prt_mpc8220_clks (void);
 ulong	get_OPB_freq (void);
 ulong	get_PCI_freq (void);
 #endif
-#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || defined(CONFIG_LH7A40X)
+#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || \
+	defined(CONFIG_LH7A40X) || defined(CONFIG_S3C6400)
 void	s3c2410_irq(void);
 #define ARM920_IRQ_CALLBACK s3c2410_irq
 ulong	get_FCLK (void);
include/s3c6400.h new file +884 -0

884 lines not on this page · raw message

include/s3c64x0.h new file +92 -0

92 lines not on this page · raw message

Signature · 1 line
1.5.4
#6 lore raw

PATCH v5 4/7 USB: Add support for OHCI controller on S3C6400

In reply to Guennadi Liakhovetski

Notice: USB on S3C6400 currently works _only_ with switched off MMU. One could try to enable the MMU, but map addresses 1-to-1, and disable data cache, then it should work too and we could still profit from instruction cache.

---
 cpu/arm1176/s3c64xx/Makefile |    1 +
 cpu/arm1176/s3c64xx/usb.c    |   45 ++++++++++++++++++++++++++++++++++++++++++
 drivers/usb/usb_ohci.c       |    1 +
 3 files changed, 47 insertions(+), 0 deletions(-)
 create mode 100644 cpu/arm1176/s3c64xx/usb.c
cpu/arm1176/s3c64xx/Makefile +1 -0
index fa4ee3f..4ab1811 100644
@@ -30,6 +30,7 @@ LIB	= $(obj)lib$(SOC).a
 
 COBJS-y	= interrupts.o
 COBJS-$(CONFIG_S3C6400)	+= cpu_init.o speed.o
+COBJS-$(CONFIG_USB_OHCI_NEW) += usb.o
 
 OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS-y))
 
cpu/arm1176/s3c64xx/usb.c new file +45 -0

45 lines not on this page · raw message

drivers/usb/usb_ohci.c +1 -0
index fd60edb..0bfa4d7 100644
@@ -69,6 +69,7 @@
 #if defined(CONFIG_ARM920T) || \
     defined(CONFIG_S3C2400) || \
     defined(CONFIG_S3C2410) || \
+    defined(CONFIG_S3C6400) || \
     defined(CONFIG_440EP) || \
     defined(CONFIG_PCI_OHCI) || \
     defined(CONFIG_MPC5200) || \
Signature · 1 line
1.5.4
#7 lore raw

PATCH v5 5/7 serial: add S3C64XX serial driver

In reply to Guennadi Liakhovetski

Based on the original S3C64XX UART driver by Samsung for U-Boot 1.1.6.

---
 drivers/serial/Makefile  |    1 +
 drivers/serial/s3c64xx.c |  197 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 198 insertions(+), 0 deletions(-)
 create mode 100644 drivers/serial/s3c64xx.c
drivers/serial/Makefile +1 -0
index de6fbab..b1458f2 100644
@@ -30,6 +30,7 @@ COBJS-$(CONFIG_MCFUART) += mcfuart.o
 COBJS-y += ns9750_serial.o
 COBJS-y += ns16550.o
 COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
+COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
 COBJS-y += serial.o
 COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
 COBJS-y += serial_pl010.o
drivers/serial/s3c64xx.c new file +197 -0

197 lines not on this page · raw message

Signature · 1 line
1.5.4
#8 lore raw

PATCH v5 6/7 NAND: add NAND driver for S3C64XX

In reply to Guennadi Liakhovetski

Based on the original S3C64XX NAND driver by Samsung for U-Boot 1.1.6.

---
 drivers/mtd/nand/Makefile  |    1 +
 drivers/mtd/nand/s3c64xx.c |  305 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 306 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/nand/s3c64xx.c
drivers/mtd/nand/Makefile +1 -0
index ffb3169..268a758 100644
@@ -34,6 +34,7 @@ COBJS-y += nand_util.o
 
 COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
 COBJS-y += fsl_upm.o
+COBJS-$(CONFIG_NAND_S3C64XX) += s3c64xx.o
 
 COBJS	:= $(COBJS-y)
 SRCS	:= $(COBJS:.o=.c)
drivers/mtd/nand/s3c64xx.c new file +305 -0

305 lines not on this page · raw message

Signature · 1 line
1.5.4
#9 lore raw

PATCH v5 7/7 ARM: Add support for S3C6400 based SMDK6400 board

In reply to Guennadi Liakhovetski

SMDK6400 can only boot U-Boot from NAND-flash. This patch adds a nand_spl driver for it too. The board can also boot from the NOR flash, but due to hardware limitations it can only address 64KiB on it, which is not enough for U-Boot. Based on the original sources by Samsung for U-Boot 1.1.6.

---
 MAKEALL                                    |    1 +
 Makefile                                   |   17 ++
 board/samsung/smdk6400/Makefile            |   54 +++++
 board/samsung/smdk6400/config.mk           |   30 +++
 board/samsung/smdk6400/lowlevel_init.S     |  316 ++++++++++++++++++++++++++++
 board/samsung/smdk6400/smdk6400.c          |  130 ++++++++++++
 board/samsung/smdk6400/u-boot-nand.lds     |   62 ++++++
 include/configs/smdk6400.h                 |  304 ++++++++++++++++++++++++++
 nand_spl/board/samsung/smdk6400/Makefile   |  106 ++++++++++
 nand_spl/board/samsung/smdk6400/config.mk  |   40 ++++
 nand_spl/board/samsung/smdk6400/u-boot.lds |   61 ++++++
 11 files changed, 1121 insertions(+), 0 deletions(-)
 create mode 100644 board/samsung/smdk6400/Makefile
 create mode 100644 board/samsung/smdk6400/config.mk
 create mode 100644 board/samsung/smdk6400/lowlevel_init.S
 create mode 100644 board/samsung/smdk6400/smdk6400.c
 create mode 100644 board/samsung/smdk6400/u-boot-nand.lds
 create mode 100644 include/configs/smdk6400.h
 create mode 100644 nand_spl/board/samsung/smdk6400/Makefile
 create mode 100644 nand_spl/board/samsung/smdk6400/config.mk
 create mode 100644 nand_spl/board/samsung/smdk6400/u-boot.lds
MAKEALL +1 -0
index ee83cca..a3ed47d 100755
@@ -515,6 +515,7 @@ LIST_ARM11="		\
 	imx31_litekit	\
 	imx31_phycore	\
 	mx31ads		\
+	smdk6400	\
 "
 
 #########################################################################
Makefile +17 -0
index cb8c0f5..898b3f6 100644
@@ -2686,6 +2686,23 @@ mx31ads_config		: unconfig
 omap2420h4_config	: unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm1136 omap2420h4 NULL omap24xx
 
+#########################################################################
+## ARM1176 Systems
+#########################################################################
+smdk6400_noUSB_config	\
+smdk6400_config	:	unconfig
+	@mkdir -p $(obj)include $(obj)board/samsung/smdk6400
+	@mkdir -p $(obj)nand_spl/board/samsung/smdk6400
+	@echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h
+	@if [ -z "$(findstring smdk6400_noUSB_config,$@)" ]; then			\
+		echo "RAM_TEXT = 0x57e00000" >> $(obj)board/samsung/smdk6400/config.tmp;\
+		$(MKCONFIG) $(@:_config=) arm arm1176 smdk6400 samsung s3c64xx;		\
+	else										\
+		echo "RAM_TEXT = 0xc7e00000" >> $(obj)board/samsung/smdk6400/config.tmp;\
+		$(MKCONFIG) $(@:_noUSB_config=) arm arm1176 smdk6400 samsung s3c64xx;	\
+	fi
+	@echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
+
 #========================================================================
 # i386
 #========================================================================
board/samsung/smdk6400/Makefile new file +54 -0

54 lines not on this page · raw message

board/samsung/smdk6400/config.mk new file +30 -0
new file mode 100644
index 0000000..298d387
@@ -0,0 +1,30 @@
+#
+# (C) Copyright 2002
+# Gary Jennejohn, DENX Software Engineering, <[email protected]>
+# David Mueller, ELSOFT AG, <[email protected]>
+#
+# (C) Copyright 2008
+# Guennadi Liakhovetki, DENX Software Engineering, <[email protected]>
+#
+# SAMSUNG SMDK6400 board with mDirac3 (ARM1176) cpu
+#
+# see http://www.samsung.com/ for more information on SAMSUNG
+
+# On SMDK6400 we use the 64 MB SDRAM bank at
+#
+# 0x50000000 to 0x58000000
+#
+# Linux-Kernel is expected to be at 0x50008000, entry 0x50008000
+#
+# we load ourselves to 0x57e00000 without MMU
+# with MMU, load address is changed to 0xc7e00000
+#
+# download area is 0x5000c000
+
+sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
+
+ifndef CONFIG_NAND_SPL
+TEXT_BASE = $(RAM_TEXT)
+else
+TEXT_BASE = 0
+endif
board/samsung/smdk6400/lowlevel_init.S new file +316 -0

316 lines not on this page · raw message

board/samsung/smdk6400/smdk6400.c new file +130 -0

130 lines not on this page · raw message

board/samsung/smdk6400/u-boot-nand.lds new file +62 -0

62 lines not on this page · raw message

include/configs/smdk6400.h new file +304 -0

304 lines not on this page · raw message

nand_spl/board/samsung/smdk6400/Makefile new file +106 -0

106 lines not on this page · raw message

nand_spl/board/samsung/smdk6400/config.mk new file +40 -0
new file mode 100644
index 0000000..4b16230
@@ -0,0 +1,40 @@
+#
+# (C) Copyright 2006
+# Stefan Roese, DENX Software Engineering, sr at 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
+#
+#
+# Samsung S3C64xx Reference Platform (smdk6400) board
+
+# TEXT_BASE for SPL:
+#
+# On S3C64xx platforms the SPL is located in SRAM@0.
+#
+# TEXT_BASE = 0
+
+include $(TOPDIR)/board/$(BOARDDIR)/config.mk
+
+# PAD_TO used to generate a 4kByte binary needed for the combined image
+# -> PAD_TO = TEXT_BASE + 4096
+PAD_TO	:= $(shell expr $$[$(TEXT_BASE) + 4096])
+
+ifeq ($(debug),1)
+PLATFORM_CPPFLAGS += -DDEBUG
+endif
nand_spl/board/samsung/smdk6400/u-boot.lds new file +61 -0

61 lines not on this page · raw message

Signature · 1 line
1.5.4
#10 lore raw

v5 cover SMDK6400 support

In reply to Guennadi Liakhovetski
Quoted 3 lines · Guennadi Liakhovetski

Version 5: This time based on nand-flash/testing head. Therefore it couldn't be runtime-tested: largepage support in nand_spl is broken there ATM.

Hmm, so it is. I don't have hardware that uses the cmd_ctrl interface to test on, so can you either fix it, or test my attempt at doing so (let me know which you prefer)?

-Scott

#11 lore raw

v5 cover SMDK6400 support

Quoted 8 lines · Scott Wood
Quoted 3 lines · Guennadi Liakhovetski

Version 5: This time based on nand-flash/testing head. Therefore it couldn't be runtime-tested: largepage support in nand_spl is broken there ATM.

Hmm, so it is. I don't have hardware that uses the cmd_ctrl interface to test on, so can you either fix it, or test my attempt at doing so (let me know which you prefer)?

I can test it, sure.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de