Skip to contentSkip to conversation

s5pc1xx: add support SMDKC100 board

PATCH Superseded Minkyu Kang 5 participants 8 messages Sep 4, 2009 – Sep 8, 2009

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 s5pc1xx: add support SMDKC100 board

Add new board SMDKC100 that uses s5pc100 SoC

---
 MAINTAINERS                            |    4 +
 MAKEALL                                |    1 +
 Makefile                               |    3 +
 board/samsung/smdkc100/Makefile        |   54 +++++++
 board/samsung/smdkc100/config.mk       |   16 ++
 board/samsung/smdkc100/lowlevel_init.S |  221 +++++++++++++++++++++++++++++
 board/samsung/smdkc100/mem_setup.S     |  198 ++++++++++++++++++++++++++
 board/samsung/smdkc100/onenand.c       |   98 +++++++++++++
 board/samsung/smdkc100/smdkc100.c      |   51 +++++++
 board/samsung/smdkc100/u-boot.lds      |   63 +++++++++
 include/configs/smdkc100.h             |  240 ++++++++++++++++++++++++++++++++
 11 files changed, 949 insertions(+), 0 deletions(-)
 create mode 100644 board/samsung/smdkc100/Makefile
 create mode 100644 board/samsung/smdkc100/config.mk
 create mode 100644 board/samsung/smdkc100/lowlevel_init.S
 create mode 100644 board/samsung/smdkc100/mem_setup.S
 create mode 100644 board/samsung/smdkc100/onenand.c
 create mode 100644 board/samsung/smdkc100/smdkc100.c
 create mode 100644 board/samsung/smdkc100/u-boot.lds
 create mode 100644 include/configs/smdkc100.h
MAINTAINERS +4 -0
index e4f3dee..5a93fa9 100644
@@ -721,6 +721,10 @@ Alex Z
 	lart		SA1100
 	dnp1110		SA1110
 
+Minkyu Kang <[email protected]>
+
+	SMDKC100	ARM CORTEX-A8 (S5PC100 SoC)
+
 -------------------------------------------------------------------------
 
 Unknown / orphaned boards:
MAKEALL +1 -0
index 03e8b7a..12bbbc5 100755
@@ -587,6 +587,7 @@ LIST_ARM_CORTEX_A8="		\
 	omap3_pandora		\
 	omap3_zoom1		\
 	omap3_zoom2		\
+	smdkc100		\
 "
 
 #########################################################################
Makefile +3 -0
index 9d14210..36a94ca 100644
@@ -3163,6 +3163,9 @@ omap3_zoom1_config :	unconfig
 omap3_zoom2_config :	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 omap3 omap3
 
+smdkc100_config:	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 smdkc100 samsung s5pc1xx
+
 #########################################################################
 ## XScale Systems
 #########################################################################
board/samsung/smdkc100/Makefile new file +54 -0

54 lines not on this page · raw message

board/samsung/smdkc100/config.mk new file +16 -0
new file mode 100644
index 0000000..ebab420
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2008 # Samsung Elecgtronics
+# Kyungmin Park <[email protected]>
+#
+
+# On S5PC100 we use the 128 MiB OneDRAM bank at
+#
+# 0x30000000 to 0x35000000 (80MiB)
+# 0x38000000 to 0x40000000 (128MiB)
+#
+# On S5PC110 we use the 128 MiB OneDRAM bank at
+#
+# 0x30000000 to 0x35000000 (80MiB)
+# 0x40000000 to 0x48000000 (128MiB)
+#
+TEXT_BASE = 0x34800000
board/samsung/smdkc100/lowlevel_init.S new file +221 -0

221 lines not on this page · raw message

board/samsung/smdkc100/mem_setup.S new file +198 -0

198 lines not on this page · raw message

board/samsung/smdkc100/onenand.c new file +98 -0

98 lines not on this page · raw message

board/samsung/smdkc100/smdkc100.c new file +51 -0

51 lines not on this page · raw message

board/samsung/smdkc100/u-boot.lds new file +63 -0

63 lines not on this page · raw message

include/configs/smdkc100.h new file +240 -0

240 lines not on this page · raw message

Signature · 1 line
1.5.4.3
#1 lore raw

PATCH 4/4 s5pc1xx: add support SMDKC100 board

Dear Minkyu Kang,

Quoted 1 line · In message <[email protected]> you wrote:

Add new board SMDKC100 that uses s5pc100 SoC

...

board/samsung/smdkc100/mem_setup.S

Quoted 5 lines
board/samsung/smdkc100/mem_setup.S new file +0 -0
new file mode 100644
index 0000000..a3e692f

Why is this all written in assembly code?

Cannot we use C instead?

Quoted 5 lines
board/samsung/smdkc100/onenand.c new file +0 -0
new file mode 100644
index 0000000..75bb8a9

...

board/samsung/smdkc100/onenand.c line 46

Quoted 9 lines
board/samsung/smdkc100/onenand.c new file +9 -0
+static inline int onenand_read_reg(int offset)
+{
+	return readl(CONFIG_SYS_ONENAND_BASE + offset);
+}
+
+static inline void onenand_write_reg(int value, int offset)
+{
+	writel(value, CONFIG_SYS_ONENAND_BASE + offset);
+}

See previous comments about not using base address plus offset for register accesses. Please change to use C structs.

...

Quoted 5 lines
board/samsung/smdkc100/smdkc100.c new file +0 -0
new file mode 100644
index 0000000..4539ced

...

board/samsung/smdkc100/smdkc100.c line 30

Quoted 6 lines
board/samsung/smdkc100/smdkc100.c new file +6 -0
+#include <common.h>
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+	gd->bd->bi_arch_number = MACH_TYPE;

Please don;t hide this information - use MACH_TYPE_SMDKC100 directly.

Quoted 5 lines
include/configs/smdkc100.h new file +0 -0
new file mode 100644
index 0000000..ec0fd1d

...

include/configs/smdkc100.h line 49

Quoted 4 lines
include/configs/smdkc100.h new file +4 -0
+/*
+ * Architecture magic and machine type
+ */
+#define MACH_TYPE		1826

Please do not do this. I recommend to omit this completely, and use the MACH_TYPE_SMDKC100 defintion from include/asm-arm/mach-types.h instead.

Quoted 5 lines
include/configs/smdkc100.h new file +5 -0
+/***********************************************************
+ * Command definition
+ ***********************************************************/
+#include <config_cmd_default.h>
+

include/configs/smdkc100.h line 98

Quoted 10 lines
include/configs/smdkc100.h new file +10 -0
+#undef CONFIG_CMD_LOADB
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_BOOTD
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_XIMG
+#undef CONFIG_CMD_NAND
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_FLASH
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_NET

Is there any specific reason for disabling these commands? Some of these are extremely useful to the end user?

Also, you might want to sort such lists, and remove duplicate entries.

include/configs/smdkc100.h line 126

Quoted 5 lines
include/configs/smdkc100.h new file +5 -0
+#if 1
+#define CONFIG_BOOTCOMMAND	"run ubifsboot"
+#else
+#define CONFIG_BOOTCOMMAND	"bootm 0x31008000"
+#endif

Please do not add dead code.

...

Quoted 1 line

+#define CONFIG_SYS_HZ 2085900 /* at PCLK 66.75MHz */

NAK. It is a mandatory requirement that CONFIG_SYS_HZ must be 1000.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Do not underestimate the value of print statements for debugging.
Don't have aesthetic convulsions when using them, either.
#2 lore raw

PATCH 4/4 s5pc1xx: add support SMDKC100 board

Quoted 13 lines · Wolfgang Denk

Dear Minkyu Kang,

Quoted 1 line · In message <[email protected]> you wrote:

Add new board SMDKC100 that uses s5pc100 SoC

...

board/samsung/smdkc100/mem_setup.S

Quoted 5 lines
board/samsung/smdkc100/mem_setup.S new file +0 -0
new file mode 100644
index 0000000..a3e692f

Why is this all written in assembly code?

Quoted 1 line

Cannot we use C instead?

Since it is used at OneNAND IPL. It has size limitation.

Quoted 28 lines
Quoted 7 lines
board/samsung/smdkc100/onenand.c new file +0 -0
new file mode 100644
index 0000000..75bb8a9

...

board/samsung/smdkc100/onenand.c line 46

Quoted 9 lines
board/samsung/smdkc100/onenand.c new file +9 -0
+static inline int onenand_read_reg(int offset)
+{
+ ? ? return readl(CONFIG_SYS_ONENAND_BASE + offset);
+}
+
+static inline void onenand_write_reg(int value, int offset)
+{
+ ? ? writel(value, CONFIG_SYS_ONENAND_BASE + offset);
+}

See previous comments about not using base address plus offset for register accesses. Please change to use C structs.

...

Quoted 5 lines
board/samsung/smdkc100/smdkc100.c new file +0 -0
new file mode 100644
index 0000000..4539ced

...

Quoted 8 lines

board/samsung/smdkc100/smdkc100.c

Quoted 6 lines
board/samsung/smdkc100/smdkc100.c new file +6 -0
+#include <common.h>
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+ ? ? gd->bd->bi_arch_number = MACH_TYPE;

Please don;t hide this information - use MACH_TYPE_SMDKC100 directly.

Agreed.

Quoted 26 lines
Quoted 6 lines
include/configs/smdkc100.h new file +0 -0
new file mode 100644
index 0000000..ec0fd1d

...

include/configs/smdkc100.h

Quoted 4 lines
include/configs/smdkc100.h new file +4 -0
+/*
+ * Architecture magic and machine type
+ */
+#define MACH_TYPE ? ? ? ? ? ?1826

Please do not do this. I recommend to omit this completely, and use the MACH_TYPE_SMDKC100 defintion from include/asm-arm/mach-types.h instead.

Quoted 10 lines
include/configs/smdkc100.h new file +10 -0
+/***********************************************************
+ * Command definition
+ ***********************************************************/
+#include <config_cmd_default.h>
+
+#undef CONFIG_CMD_LOADB
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_BOOTD
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_XIMG
Quoted 8 lines

include/configs/smdkc100.h line 98

Quoted 5 lines
include/configs/smdkc100.h new file +5 -0
+#undef CONFIG_CMD_NAND
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_FLASH
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_NET

Is there any specific reason for disabling these commands? Some of these are extremely useful to the end user?

Since now we only tested on OneNAND. If someone or who want to use these feature just remove it at that time.

Quoted 10 lines

Also, you might want to sort such lists, and remove duplicate entries.

include/configs/smdkc100.h line 126

Quoted 5 lines
include/configs/smdkc100.h new file +5 -0
+#if 1
+#define CONFIG_BOOTCOMMAND ? "run ubifsboot"
+#else
+#define CONFIG_BOOTCOMMAND ? "bootm 0x31008000"
+#endif

Please do not add dead code.

Okay.

Thank you,
Kyungmin Park

Quoted 22 lines

...

Quoted 1 line

+#define CONFIG_SYS_HZ ? ? ? ? ? ? ? ?2085900 ? ? ? ? /* at PCLK 66.75MHz */

NAK. It is a mandatory requirement that CONFIG_SYS_HZ must be 1000.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Do not underestimate the value of print statements for debugging. Don't have aesthetic convulsions when using them, either.
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#3 lore raw

PATCH 4/4 s5pc1xx: add support SMDKC100 board

Dear Kyungmin Park,

Quoted 8 lines · In message <[email protected]> you…
Quoted 6 lines
Quoted 2 lines

+++ b/board/samsung/smdkc100/mem_setup.S

Why is this all written in assembly code?

Cannot we use C instead?

Since it is used at OneNAND IPL. It has size limitation.

So what? Do you think that equivalent C code would be inherently bigger? I am not so sure about that.

...

Quoted 19 lines
Quoted 10 lines
Quoted 10 lines
include/configs/smdkc100.h new file +10 -0
+/***********************************************************
+ * Command definition
+ ***********************************************************/
+#include <config_cmd_default.h>
+
+#undef CONFIG_CMD_LOADB
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_BOOTD
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_XIMG
Quoted 8 lines

include/configs/smdkc100.h line 98

Quoted 5 lines
include/configs/smdkc100.h new file +5 -0
+#undef CONFIG_CMD_NAND
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_FLASH
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_NET

Is there any specific reason for disabling these commands? Some of these are extremely useful to the end user?

Quoted 2 lines

Since now we only tested on OneNAND. If someone or who want to use these feature just remove it at that time.

This makes no sense to me. Download commands like loadb and lods, information commands like imls and network commands are completrely independent of where you boot from.

It may make sense to diaable netwoirk support if you hav enot tested it yet, but disabling all the othe rdefault features makes zero sense to me. Please don't. Disable only things that really cannot be used.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The human race is a race of cowards; and I am not  only  marching  in
that procession but carrying a banner.                   - Mark Twain
#4 lore raw

PATCH 4/4 s5pc1xx: add support SMDKC100 board

In reply to Wolfgang Denk

Dear Wolfgang,

2009/9/4 Wolfgang Denk <[email protected]>

Quoted 7 lines

Dear Minkyu Kang,

Quoted 1 line · In message <[email protected]> you wrote:

Add new board SMDKC100 that uses s5pc100 SoC

...

Review

Quoted 1 line
(quoted diff) +0 -0

b/board/samsung/smdkc100/mem_setup.S

Quoted 9 lines

board/samsung/smdkc100/mem_setup.S

Quoted 4 lines

new file mode 100644
index 0000000..a3e692f

board/samsung/smdkc100/mem_setup.S new file +0 -0

Why is this all written in assembly code?

Cannot we use C instead?

Because of this function called by lowlevel_init (before jumping to C code). Any problem?
If so, we can merge to lowlevel_init.S.

Quoted 94 lines

Review

Quoted 3 lines
(quoted diff) +0 -0

b/board/samsung/smdkc100/onenand.c

Quoted 4 lines

new file mode 100644
index 0000000..75bb8a9

board/samsung/smdkc100/onenand.c new file +0 -0

...

board/samsung/smdkc100/onenand.c line 46

Quoted 9 lines
board/samsung/smdkc100/onenand.c new file +9 -0
+static inline int onenand_read_reg(int offset)
+{
+     return readl(CONFIG_SYS_ONENAND_BASE + offset);
+}
+
+static inline void onenand_write_reg(int value, int offset)
+{
+     writel(value, CONFIG_SYS_ONENAND_BASE + offset);
+}

See previous comments about not using base address plus offset for register accesses. Please change to use C structs.

...

Review

Quoted 1 line
(quoted diff) +0 -0

b/board/samsung/smdkc100/smdkc100.c

Quoted 4 lines

new file mode 100644
index 0000000..4539ced

board/samsung/smdkc100/smdkc100.c new file +0 -0

...

board/samsung/smdkc100/smdkc100.c line 30

Quoted 6 lines
board/samsung/smdkc100/smdkc100.c new file +6 -0
+#include <common.h>
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+     gd->bd->bi_arch_number = MACH_TYPE;

Please don;t hide this information - use MACH_TYPE_SMDKC100 directly.

Quoted 5 lines
include/configs/smdkc100.h new file +0 -0
new file mode 100644
index 0000000..ec0fd1d

...

include/configs/smdkc100.h line 49

Quoted 4 lines
include/configs/smdkc100.h new file +4 -0
+/*
+ * Architecture magic and machine type
+ */
+#define MACH_TYPE            1826

Please do not do this. I recommend to omit this completely, and use the MACH_TYPE_SMDKC100 defintion from include/asm-arm/mach-types.h instead.

Quoted 5 lines
include/configs/smdkc100.h new file +5 -0
+/***********************************************************
+ * Command definition
+ ***********************************************************/
+#include <config_cmd_default.h>
+

include/configs/smdkc100.h line 98

Quoted 10 lines
include/configs/smdkc100.h new file +10 -0
+#undef CONFIG_CMD_LOADB
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_BOOTD
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_XIMG
+#undef CONFIG_CMD_NAND
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_FLASH
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_NET

Is there any specific reason for disabling these commands? Some of these are extremely useful to the end user?

Also, you might want to sort such lists, and remove duplicate entries.

include/configs/smdkc100.h line 126

Quoted 5 lines
include/configs/smdkc100.h new file +5 -0
+#if 1
+#define CONFIG_BOOTCOMMAND   "run ubifsboot"
+#else
+#define CONFIG_BOOTCOMMAND   "bootm 0x31008000"
+#endif

Please do not add dead code.

...

Quoted 1 line

+#define CONFIG_SYS_HZ 2085900 /* at PCLK 66.75MHz

*/

NAK. It is a mandatory requirement that CONFIG_SYS_HZ must be 1000.

Best regards,

Wolfgang Denk

Quoted 11 lines

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Do not underestimate the value of print statements for debugging. Don't have aesthetic convulsions when using them, either.
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Thanks for review.
Minkyu Kang.

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

PATCH 4/4 s5pc1xx: add support SMDKC100 board

Dear Minkyu Kang,

Quoted 8 lines · In message <[email protected]> you…
Quoted 4 lines

Why is this all written in assembly code?

Cannot we use C instead?

Because of this function called by lowlevel_init (before jumping to C code). Any problem?
If so, we can merge to lowlevel_init.S.

No, it's not a problem. I just wanted to understand the reasons. Normally we try to avoid assembly as much as possible, so I just wanted to make sure there was a good reason for using it here.

Quoted 1 line

Thanks for review.

You are welcome.

Best regards,

Wolfgang Denk

Signature · 7 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The shortest unit of time in the multiverse is the News York  Second,
defined  as  the  period  of  time between the traffic lights turning
green and the cab behind you honking.
                                - Terry Pratchett, _Lords and Ladies_
#6 lore raw

PATCH 4/4 s5pc1xx: add support SMDKC100 board

In reply to Minkyu Kang

board/samsung/smdkc100/onenand.c

Quoted 1 line
board/samsung/smdkc100/onenand.c +0 -0

I guess this is not board specific but soc specific so please move it to drivers/mtd/onenand/

Quoted 31 lines

new file mode 100644
index 0000000..75bb8a9

board/samsung/smdkc100/onenand.c new file +26 -0
@@ -0,0 +1,98 @@
+/*
+ *  Copyright (C) 2008-2009 Samsung Electronics
+ *  Kyungmin Park <[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 <common.h>
+#include <linux/mtd/compat.h>
+#include <linux/mtd/mtd.h>

board/samsung/smdkc100/onenand.c line 36

Quoted 10 lines
board/samsung/smdkc100/onenand.c new file +10 -0
+#include <linux/mtd/onenand.h>
+
+#include <onenand_uboot.h>
+
+#include <samsung_onenand.h>
+
+#include <asm/io.h>
+#include <asm/arch/clock.h>
+
+extern void s3c_onenand_init(struct mtd_info *);

please move this to a header

board/samsung/smdkc100/u-boot.lds

Quoted 6 lines
board/samsung/smdkc100/onenand.c new file +1 -0
+
board/samsung/smdkc100/smdkc100.c new file +0 -1
new file mode 100644
index 0000000..4539ced
--- /dev/null
board/samsung/smdkc100/u-boot.lds +0 -0

no need please remove

board/samsung/smdkc100/u-boot.lds

Quoted 9 lines

new file mode 100644
index 0000000..27f8201
--- /dev/null

board/samsung/smdkc100/u-boot.lds +5 -0
+/***********************************************************
 
+
+#define CONFIG_RAMDISK_BOOT	"root=/dev/ram0 rw rootfstype=ext2" \
+		" console=ttySAC0,115200n8" \
+		" mem=80M"

why do you restrict the memsize of the kernel?

board/samsung/smdkc100/u-boot.lds

Quoted 13 lines
board/samsung/smdkc100/u-boot.lds +13 -0
+
+#define CONFIG_COMMON_BOOT	"console=ttySAC0,115200n8" \
+		" mem=128M " \
+		" " MTDPARTS_DEFAULT
+
+
+#define CONFIG_ENV_OVERWRITE
+#define CONFIG_EXTRA_ENV_SETTINGS					\
+	CONFIG_UPDATEB \
+	"updatek=onenand erase 0x60000 0x300000;" \
+	" onenand write 0x31008000 0x60000 0x300000\0" \
+	"updateu=onenand erase block 147-4095;" \
+	" onenand write 0x32000000 0x1260000 0x8C0000\0" \

something like this will be more readable

	"updatek="						\
		"onenand erase 0x60000 0x300000; "		\
		"onenand write 0x31008000 0x60000 0x300000\0"	\
	"updateu="						\
		"onenand erase block 147-4095; "		\
		"onenand write 0x32000000 0x1260000 0x8C0000\0" \
	"bootk="						\
		"onenand read 0x30007FC0 0x60000 0x300000; "	\
		"bootm 0x30007FC0\0"				\
	"flashboot="						\
		"set bootargs "					\
			"root=/dev/mtdblock${bootblock} "	\
			"rootfstype=${rootfstype} "		\
			"ubi.mtd=${ubiblock} ${opts} "		\
			CONFIG_COMMON_BOOT "; "			\
		"run bootk\0"					\
Quoted 9 lines
board/samsung/smdkc100/u-boot.lds +9 -0
+	"ubifsboot=set bootargs root=ubi0!rootfs rootfstype=ubifs" \
+	 " ubi.mtd=${ubiblock} ${opts} " CONFIG_COMMON_BOOT "; run bootk\0" \
+	"boottrace=setenv opts initcall_debug; run bootcmd\0" \
+	"android=set bootargs root=ubi0!ramdisk ubi.mtd=${ubiblock}" \
+	 " rootfstype=ubifs init=/init.sh " CONFIG_COMMON_BOOT "; run bootk\0" \
+	"nfsboot=set bootargs root=/dev/nfs ubi.mtd=${ubiblock}" \
+	 " nfsroot=${nfsroot},nolock ip=${ipaddr}:${serverip}:${gatewayip}:" \
+	 "${netmask}:nowplus:usb0:off " CONFIG_COMMON_BOOT "; run bootk\0" \
+	"ramboot=set bootargs " CONFIG_RAMDISK_BOOT \

board/samsung/smdkc100/u-boot.lds

Quoted 10 lines
board/samsung/smdkc100/u-boot.lds +10 -0
+	 " initrd=0x33000000,8M ramdisk=8192\0" \
+	"rootfstype=cramfs\0" \
+	"mtdparts=" MTDPARTS_DEFAULT "\0" \
+	"meminfo=mem=128M\0" \
+	"nfsroot=/nfsroot/arm\0" \
+	"bootblock=5\0" \
+	"ubiblock=4\0" \
+	"ubi=enabled"
+
+/*

Best Regards,
J.

#7 lore raw

PATCH 4/4 s5pc1xx: add support SMDKC100 board

Dear Jean-Christophe

2009/9/5 Jean-Christophe PLAGNIOL-VILLARD <[email protected]>:

Quoted 3 lines

board/samsung/smdkc100/onenand.c

Quoted 1 line
board/samsung/smdkc100/onenand.c +0 -0

I guess this is not board specific but soc specific so please move it to drivers/mtd/onenand/

no, this is related with onenand clock.
It is board specific.

Quoted 34 lines
Quoted 34 lines

new file mode 100644
index 0000000..75bb8a9

board/samsung/smdkc100/onenand.c new file +29 -0
@@ -0,0 +1,98 @@
+/*
+ * ?Copyright (C) 2008-2009 Samsung Electronics
+ * ?Kyungmin Park <[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 <common.h>
+#include <linux/mtd/compat.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/onenand.h>
+
+#include <onenand_uboot.h>
Quoted 8 lines

board/samsung/smdkc100/onenand.c line 36

Quoted 7 lines
board/samsung/smdkc100/onenand.c new file +7 -0
+
+#include <samsung_onenand.h>
+
+#include <asm/io.h>
+#include <asm/arch/clock.h>
+
+extern void s3c_onenand_init(struct mtd_info *);

please move this to a header

agreed

Quoted 17 lines

board/samsung/smdkc100/u-boot.lds

Quoted 6 lines
board/samsung/smdkc100/onenand.c new file +1 -0
+
board/samsung/smdkc100/smdkc100.c new file +0 -1
new file mode 100644
index 0000000..4539ced
--- /dev/null
board/samsung/smdkc100/u-boot.lds +0 -0

no need please remove

board/samsung/smdkc100/u-boot.lds

Quoted 9 lines

new file mode 100644
index 0000000..27f8201
--- /dev/null

board/samsung/smdkc100/u-boot.lds +5 -0
+/***********************************************************
 
+
+#define CONFIG_RAMDISK_BOOT ?"root=/dev/ram0 rw rootfstype=ext2" \
+ ? ? ? ? ? ? " console=ttySAC0,115200n8" \
+ ? ? ? ? ? ? " mem=80M"

why do you restrict the memsize of the kernel?

Quoted 14 lines

board/samsung/smdkc100/u-boot.lds

Quoted 13 lines
board/samsung/smdkc100/u-boot.lds +13 -0
+
+#define CONFIG_COMMON_BOOT ? "console=ttySAC0,115200n8" \
+ ? ? ? ? ? ? " mem=128M " \
+ ? ? ? ? ? ? " " MTDPARTS_DEFAULT
+
+
+#define CONFIG_ENV_OVERWRITE
+#define CONFIG_EXTRA_ENV_SETTINGS ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
+ ? ? CONFIG_UPDATEB \
+ ? ? "updatek=onenand erase 0x60000 0x300000;" \
+ ? ? " onenand write 0x31008000 0x60000 0x300000\0" \
+ ? ? "updateu=onenand erase block 147-4095;" \
+ ? ? " onenand write 0x32000000 0x1260000 0x8C0000\0" \

something like this will be more readable

ok.

Quoted 33 lines

? ? ? ?"updatek=" ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
? ? ? ? ? ? ? ?"onenand erase 0x60000 0x300000; " ? ? ? ? ? ? ?\
? ? ? ? ? ? ? ?"onenand write 0x31008000 0x60000 0x300000\0" ? \
? ? ? ?"updateu=" ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
? ? ? ? ? ? ? ?"onenand erase block 147-4095; " ? ? ? ? ? ? ? ?\
? ? ? ? ? ? ? ?"onenand write 0x32000000 0x1260000 0x8C0000\0" \
? ? ? ?"bootk=" ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
? ? ? ? ? ? ? ?"onenand read 0x30007FC0 0x60000 0x300000; " ? ?\
? ? ? ? ? ? ? ?"bootm 0x30007FC0\0" ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
? ? ? ?"flashboot=" ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
? ? ? ? ? ? ? ?"set bootargs " ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
? ? ? ? ? ? ? ? ? ? ? ?"root=/dev/mtdblock${bootblock} " ? ? ? \
? ? ? ? ? ? ? ? ? ? ? ?"rootfstype=${rootfstype} " ? ? ? ? ? ? \
? ? ? ? ? ? ? ? ? ? ? ?"ubi.mtd=${ubiblock} ${opts} " ? ? ? ? ?\
? ? ? ? ? ? ? ? ? ? ? ?CONFIG_COMMON_BOOT "; " ? ? ? ? ? ? ? ? \
? ? ? ? ? ? ? ?"run bootk\0" ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \

Quoted 17 lines

+ ? ? "ubifsboot=set bootargs root=ubi0!rootfs rootfstype=ubifs" \
+ ? ? ?" ubi.mtd=${ubiblock} ${opts} " CONFIG_COMMON_BOOT "; run bootk\0" \
+ ? ? "boottrace=setenv opts initcall_debug; run bootcmd\0" \
+ ? ? "android=set bootargs root=ubi0!ramdisk ubi.mtd=${ubiblock}" \
+ ? ? ?" rootfstype=ubifs init=/init.sh " CONFIG_COMMON_BOOT "; run bootk\0" \
+ ? ? "nfsboot=set bootargs root=/dev/nfs ubi.mtd=${ubiblock}" \
+ ? ? ?" nfsroot=${nfsroot},nolock ip=${ipaddr}:${serverip}:${gatewayip}:" \
+ ? ? ?"${netmask}:nowplus:usb0:off " CONFIG_COMMON_BOOT "; run bootk\0" \
+ ? ? "ramboot=set bootargs " CONFIG_RAMDISK_BOOT \
+ ? ? ?" initrd=0x33000000,8M ramdisk=8192\0" \
+ ? ? "rootfstype=cramfs\0" \
+ ? ? "mtdparts=" MTDPARTS_DEFAULT "\0" \
+ ? ? "meminfo=mem=128M\0" \
+ ? ? "nfsroot=/nfsroot/arm\0" \
+ ? ? "bootblock=5\0" \
+ ? ? "ubiblock=4\0" \
+ ? ? "ubi=enabled"

Quoted 9 lines

board/samsung/smdkc100/u-boot.lds

Quoted 2 lines
board/samsung/smdkc100/u-boot.lds +2 -0
+
+/*

Best Regards,
J.
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Thanks for review
Minkyu Kang

Signature · 2 lines
from. prom.
www.promsoft.net