public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/5] NetStar updates
@ 2010-01-27 23:16 Ladislav Michl
  2010-01-27 23:18 ` [U-Boot] [PATCH 1/5] NetStar: eeprom - undefined reference to `memset' Ladislav Michl
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Ladislav Michl @ 2010-01-27 23:16 UTC (permalink / raw)
  To: u-boot

Dear Sandeep,

following patches are intended to bring NetStar board to useable state.
Similar fixes for linker errors will be needed for VoiceBlue board - I'll
send them later, of course if you do not have any objections against this
solution.

Best regards,
	ladis

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 1/5] NetStar: eeprom - undefined reference to `memset'
  2010-01-27 23:16 [U-Boot] [PATCH 0/5] NetStar updates Ladislav Michl
@ 2010-01-27 23:18 ` Ladislav Michl
  2010-01-27 23:19 ` [U-Boot] [PATCH 2/5] NetStar: eeprom - be less verbose Ladislav Michl
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Ladislav Michl @ 2010-01-27 23:18 UTC (permalink / raw)
  To: u-boot

From: Ladislav Michl <ladis@linux-mips.org>

Defining partially initialized struct eth_device on stack means
gcc has to zero out it, and some gcc versions optimize this with
an implicit call to memset. Move definition to data section
to avoid that (it has also nice side effect that we need not
to pass it to helper functions anymore)

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 board/netstar/eeprom.c |   61 +++++++++++++++++++++++------------------------
 1 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/board/netstar/eeprom.c b/board/netstar/eeprom.c
index adb01b9..ef530a3 100644
--- a/board/netstar/eeprom.c
+++ b/board/netstar/eeprom.c
@@ -28,40 +28,43 @@
 #include <net.h>
 #include "../drivers/net/smc91111.h"
 
-static u16 read_eeprom_reg(struct eth_device *dev, u16 reg)
+static struct eth_device dev = {
+	.iobase = CONFIG_SMC91111_BASE
+};
+
+static u16 read_eeprom_reg(u16 reg)
 {
 	int timeout;
 
-	SMC_SELECT_BANK(dev, 2);
-	SMC_outw(dev, reg, PTR_REG);
+	SMC_SELECT_BANK(&dev, 2);
+	SMC_outw(&dev, reg, PTR_REG);
 
-	SMC_SELECT_BANK(dev, 1);
-	SMC_outw(dev, SMC_inw (dev, CTL_REG) | CTL_EEPROM_SELECT | CTL_RELOAD,
-		 CTL_REG);
+	SMC_SELECT_BANK(&dev, 1);
+	SMC_outw(&dev, SMC_inw(&dev, CTL_REG) | CTL_EEPROM_SELECT | CTL_RELOAD, CTL_REG);
 	timeout = 100;
-	while((SMC_inw (dev, CTL_REG) & CTL_RELOAD) && --timeout)
+	while ((SMC_inw(&dev, CTL_REG) & CTL_RELOAD) && --timeout)
 		udelay(100);
 	if (timeout == 0) {
 		printf("Timeout Reading EEPROM register %02x\n", reg);
 		return 0;
 	}
 
-	return SMC_inw (dev, GP_REG);
+	return SMC_inw(&dev, GP_REG);
 }
 
-static int write_eeprom_reg(struct eth_device *dev, u16 value, u16 reg)
+static int write_eeprom_reg(u16 value, u16 reg)
 {
 	int timeout;
 
-	SMC_SELECT_BANK(dev, 2);
-	SMC_outw(dev, reg, PTR_REG);
+	SMC_SELECT_BANK(&dev, 2);
+	SMC_outw(&dev, reg, PTR_REG);
 
-	SMC_SELECT_BANK(dev, 1);
-	SMC_outw(dev, value, GP_REG);
-	SMC_outw(dev, SMC_inw (dev, CTL_REG) | CTL_EEPROM_SELECT | CTL_STORE, CTL_REG);
+	SMC_SELECT_BANK(&dev, 1);
+	SMC_outw(&dev, value, GP_REG);
+	SMC_outw(&dev, SMC_inw(&dev, CTL_REG) | CTL_EEPROM_SELECT | CTL_STORE, CTL_REG);
 	timeout = 100;
-	while ((SMC_inw(dev, CTL_REG) & CTL_STORE) && --timeout)
-		udelay (100);
+	while ((SMC_inw(&dev, CTL_REG) & CTL_STORE) && --timeout)
+		udelay(100);
 	if (timeout == 0) {
 		printf("Timeout Writing EEPROM register %02x\n", reg);
 		return 0;
@@ -70,17 +73,17 @@ static int write_eeprom_reg(struct eth_device *dev, u16 value, u16 reg)
 	return 1;
 }
 
-static int write_data(struct eth_device *dev, u16 *buf, int len)
+static int write_data(u16 *buf, int len)
 {
 	u16 reg = 0x23;
 
 	while (len--)
-		write_eeprom_reg(dev, *buf++, reg++);
+		write_eeprom_reg(*buf++, reg++);
 
 	return 0;
 }
 
-static int verify_macaddr(struct eth_device *dev, char *s)
+static int verify_macaddr(char *s)
 {
 	u16 reg;
 	int i, err = 0;
@@ -88,7 +91,7 @@ static int verify_macaddr(struct eth_device *dev, char *s)
 	printf("MAC Address: ");
 	err = i = 0;
 	for (i = 0; i < 3; i++) {
-		reg = read_eeprom_reg(dev, 0x20 + i);
+		reg = read_eeprom_reg(0x20 + i);
 		printf("%02x:%02x%c", reg & 0xff, reg >> 8, i != 2 ? ':' : '\n');
 		if (s)
 			err |= reg != ((u16 *)s)[i];
@@ -97,7 +100,7 @@ static int verify_macaddr(struct eth_device *dev, char *s)
 	return err ? 0 : 1;
 }
 
-static int set_mac(struct eth_device *dev, char *s)
+static int set_mac(char *s)
 {
 	int i;
 	char *e, eaddr[6];
@@ -109,7 +112,7 @@ static int set_mac(struct eth_device *dev, char *s)
 	}
 
 	for (i = 0; i < 3; i++)
-		write_eeprom_reg(dev, *(((u16 *)eaddr) + i), 0x20 + i);
+		write_eeprom_reg(*(((u16 *)eaddr) + i), 0x20 + i);
 
 	return 0;
 }
@@ -145,10 +148,6 @@ int eeprom(int argc, char *argv[])
 	int i, len, ret;
 	unsigned char buf[58], *p;
 
-	struct eth_device dev = {
-		.iobase = CONFIG_SMC91111_BASE
-	};
-
 	app_startup(argv);
 	if (get_version() != XF_VERSION) {
 		printf("Wrong XF_VERSION.\n");
@@ -157,14 +156,14 @@ int eeprom(int argc, char *argv[])
 		return 1;
 	}
 
-	if ((SMC_inw (&dev, BANK_SELECT) & 0xFF00) != 0x3300) {
+	if ((SMC_inw(&dev, BANK_SELECT) & 0xFF00) != 0x3300) {
 		printf("SMSC91111 not found.\n");
 		return 2;
 	}
 
 	/* Called without parameters - print MAC address */
 	if (argc < 2) {
-		verify_macaddr(&dev, NULL);
+		verify_macaddr(NULL);
 		return 0;
 	}
 
@@ -198,8 +197,8 @@ int eeprom(int argc, char *argv[])
 	}
 
 	/* First argument (MAC) is mandatory */
-	set_mac(&dev, argv[1]);
-	if (verify_macaddr(&dev, argv[1])) {
+	set_mac(argv[1]);
+	if (verify_macaddr(argv[1])) {
 		printf("*** MAC address does not match! ***\n");
 		return 4;
 	}
@@ -207,7 +206,7 @@ int eeprom(int argc, char *argv[])
 	while (len--)
 		*p++ = 0;
 
-	write_data(&dev, (u16 *)buf, sizeof(buf) >> 1);
+	write_data((u16 *)buf, sizeof(buf) >> 1);
 
 	return 0;
 }
-- 
1.5.3.8

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 2/5] NetStar: eeprom - be less verbose
  2010-01-27 23:16 [U-Boot] [PATCH 0/5] NetStar updates Ladislav Michl
  2010-01-27 23:18 ` [U-Boot] [PATCH 1/5] NetStar: eeprom - undefined reference to `memset' Ladislav Michl
@ 2010-01-27 23:19 ` Ladislav Michl
  2010-01-27 23:20 ` [U-Boot] [PATCH 3/5] NetStar: eeprom - fix linker error Ladislav Michl
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Ladislav Michl @ 2010-01-27 23:19 UTC (permalink / raw)
  To: u-boot

From: Ladislav Michl <ladis@linux-mips.org>

Use shorter yet descriptive messages, replace printf() with
puts() where appropriate. This saves few bytes.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 board/netstar/eeprom.c |   27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/board/netstar/eeprom.c b/board/netstar/eeprom.c
index ef530a3..1670a5b 100644
--- a/board/netstar/eeprom.c
+++ b/board/netstar/eeprom.c
@@ -45,7 +45,7 @@ static u16 read_eeprom_reg(u16 reg)
 	while ((SMC_inw(&dev, CTL_REG) & CTL_RELOAD) && --timeout)
 		udelay(100);
 	if (timeout == 0) {
-		printf("Timeout Reading EEPROM register %02x\n", reg);
+		printf("Timeout reading register %02x\n", reg);
 		return 0;
 	}
 
@@ -66,7 +66,7 @@ static int write_eeprom_reg(u16 value, u16 reg)
 	while ((SMC_inw(&dev, CTL_REG) & CTL_STORE) && --timeout)
 		udelay(100);
 	if (timeout == 0) {
-		printf("Timeout Writing EEPROM register %02x\n", reg);
+		printf("Timeout writing register %02x\n", reg);
 		return 0;
 	}
 
@@ -88,8 +88,7 @@ static int verify_macaddr(char *s)
 	u16 reg;
 	int i, err = 0;
 
-	printf("MAC Address: ");
-	err = i = 0;
+	puts("HWaddr: ");
 	for (i = 0; i < 3; i++) {
 		reg = read_eeprom_reg(0x20 + i);
 		printf("%02x:%02x%c", reg & 0xff, reg >> 8, i != 2 ? ':' : '\n');
@@ -149,15 +148,15 @@ int eeprom(int argc, char *argv[])
 	unsigned char buf[58], *p;
 
 	app_startup(argv);
-	if (get_version() != XF_VERSION) {
-		printf("Wrong XF_VERSION.\n");
-		printf("Application expects ABI version %d\n", XF_VERSION);
-		printf("Actual U-Boot ABI version %d\n", (int)get_version());
+	i = get_version();
+	if (i != XF_VERSION) {
+		printf("Using ABI version %d, but U-Boot provides %d\n",
+			XF_VERSION, i);
 		return 1;
 	}
 
 	if ((SMC_inw(&dev, BANK_SELECT) & 0xFF00) != 0x3300) {
-		printf("SMSC91111 not found.\n");
+		puts("SMSC91111 not found\n");
 		return 2;
 	}
 
@@ -169,9 +168,9 @@ int eeprom(int argc, char *argv[])
 
 	/* Print help message */
 	if (argv[1][1] == 'h') {
-		printf("NetStar EEPROM writer\n");
-		printf("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
-		printf("Usage:\n\t<mac_address> [<element_1>] [<...>]\n");
+		puts("NetStar EEPROM writer\n"
+			"Built: " U_BOOT_DATE " at " U_BOOT_TIME "\n"
+			"Usage:\n\t<mac_address> [<element_1>] [<...>]\n");
 		return 0;
 	}
 
@@ -188,7 +187,7 @@ int eeprom(int argc, char *argv[])
 			printf("Element %d: odd character count\n", i - 1);
 			return 3;
 		case -3:
-			printf("Out of EEPROM memory\n");
+			puts("Out of EEPROM memory\n");
 			return 3;
 		default:
 			p += ret;
@@ -199,7 +198,7 @@ int eeprom(int argc, char *argv[])
 	/* First argument (MAC) is mandatory */
 	set_mac(argv[1]);
 	if (verify_macaddr(argv[1])) {
-		printf("*** MAC address does not match! ***\n");
+		puts("*** HWaddr does not match! ***\n");
 		return 4;
 	}
 
-- 
1.5.3.8

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 3/5] NetStar: eeprom - fix linker error
  2010-01-27 23:16 [U-Boot] [PATCH 0/5] NetStar updates Ladislav Michl
  2010-01-27 23:18 ` [U-Boot] [PATCH 1/5] NetStar: eeprom - undefined reference to `memset' Ladislav Michl
  2010-01-27 23:19 ` [U-Boot] [PATCH 2/5] NetStar: eeprom - be less verbose Ladislav Michl
@ 2010-01-27 23:20 ` Ladislav Michl
  2010-01-27 23:21 ` [U-Boot] [PATCH 4/5] NetStar: fix default environment Ladislav Michl
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Ladislav Michl @ 2010-01-27 23:20 UTC (permalink / raw)
  To: u-boot

From: Ladislav Michl <ladis@linux-mips.org>

linking eeprom with libgeneric.a is not really needed and causes following
error:
../../lib_generic/libgeneric.a(string.o): In function `strcmp':
lib_generic/string.c:152: multiple definition of `strcmp'
../../examples/standalone/libstubs.a(stubs.o):include/_exports.h:24: first defined here
Remove eeprom linker script as well and generate entry point object
(to start application by jumping on its beginning) on the fly.
Out-of-tree build tested as well.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 board/netstar/Makefile       |   54 +++++++++++++++++++----------------------
 board/netstar/eeprom.lds     |   51 ---------------------------------------
 board/netstar/eeprom_start.S |   13 ----------
 3 files changed, 25 insertions(+), 93 deletions(-)
 delete mode 100644 board/netstar/eeprom.lds
 delete mode 100644 board/netstar/eeprom_start.S

diff --git a/board/netstar/Makefile b/board/netstar/Makefile
index 11578b7..c435762 100644
--- a/board/netstar/Makefile
+++ b/board/netstar/Makefile
@@ -29,20 +29,15 @@ include $(TOPDIR)/config.mk
 LIB	= $(obj)lib$(BOARD).a
 
 COBJS	:= netstar.o
-SOBJS	:= setup.o crcek.o
+SOBJS	:= setup.o
 
-SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c) eeprom.c \
-		eeprom_start.S
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
-
 LOAD_ADDR = 0x10400000
-LDSCRIPT = $(TOPDIR)/board/$(BOARDDIR)/eeprom.lds
-lnk = $(if $(obj),$(obj),.)
 
-HOSTCFLAGS = -Wall -pedantic -I$(TOPDIR)/include
+#########################################################################
 
 all:	$(obj).depend $(LIB) $(obj)eeprom.srec $(obj)eeprom.bin \
 		$(obj)crcek.srec $(obj)crcek.bin $(obj)crcit
@@ -50,41 +45,42 @@ all:	$(obj).depend $(LIB) $(obj)eeprom.srec $(obj)eeprom.bin \
 $(LIB):	$(OBJS) $(SOBJS)
 	$(AR) $(ARFLAGS) $@ $^
 
-$(obj)eeprom.srec:	$(obj)eeprom.o $(obj)eeprom_start.o $(obj)u-boot.lds
-	cd $(lnk) && $(LD) -T $(obj)u-boot.lds -g -Ttext $(LOAD_ADDR) \
-		-o $(<:.o=) -e eeprom eeprom.o eeprom_start.o \
+$(obj)eeprom_start.o:
+	echo "b eeprom" | $(CC) $(AFLAGS) -c -x assembler -o $@ -
+
+$(obj)eeprom:		$(obj)eeprom_start.o $(obj)eeprom.o
+	$(LD) -Ttext $(LOAD_ADDR) -e eeprom -o $@ $^ \
 		-L$(obj)../../examples/standalone -lstubs \
-		-L$(obj)../../lib_generic -lgeneric \
-		-L$(gcclibdir) -lgcc
-	$(OBJCOPY) -O srec $(<:.o=) $@
+		$(PLATFORM_LIBS)
 
-$(obj)eeprom.bin:	$(obj)eeprom.srec
-	$(OBJCOPY) -I srec -O binary $< $@ 2>/dev/null
+$(obj)eeprom.srec:	$(obj)eeprom
+	$(OBJCOPY) -S -O srec $(<:.o=) $@
+
+$(obj)eeprom.bin:	$(obj)eeprom
+	$(OBJCOPY) -S -O binary $< $@
 
 $(obj)crcek.srec:	$(obj)crcek.o
-	$(LD) -g -Ttext 0x00000000 \
-		-o $(<:.o=) -e crcek $^
-	$(OBJCOPY) -O srec $(<:.o=) $@
+	$(LD) -g -Ttext 0x00000000 -e crcek -o $(<:.o=) $^
+	$(OBJCOPY) -S -O srec $(<:.o=) $@
 
 $(obj)crcek.bin:	$(obj)crcek.srec
-	$(OBJCOPY) -I srec -O binary $< $@ 2>/dev/null
+	$(OBJCOPY) -I srec -O binary $< $@
 
 $(obj)crcit:		$(obj)crcit.o $(obj)crc32.o
 	$(HOSTCC) $(HOSTCFLAGS) -o $@ $^
 
-$(obj)crcit.o:	crcit.c
+$(obj)crcit.o:		crcit.c
 	$(HOSTCC) $(HOSTCFLAGS) -o $@ -c $<
 
-$(obj)crc32.o:	$(SRCTREE)/lib_generic/crc32.c
-	$(HOSTCC) $(HOSTCFLAGS) -DUSE_HOSTCC -o $@ -c $<
-
-$(obj)u-boot.lds: $(LDSCRIPT)
-	$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+$(obj)crc32.o:		$(SRCTREE)/lib_generic/crc32.c
+	$(HOSTCC) $(HOSTCFLAGS) -DUSE_HOSTCC -I$(TOPDIR)/include \
+		-o $@ -c $<
 
 clean:
-	rm -f $(SOBJS) $(OBJS) $(obj)eeprom $(obj)eeprom.srec \
-		$(obj)eeprom.bin $(obj)crcek $(obj)crcek.srec \
-		$(obj)crcek.bin $(obj)u-boot.lds
+	rm -f $(SOBJS) $(OBJS) \
+		$(obj)eeprom_start.o $(obj)eeprom.o \
+		$(obj)eeprom $(obj)eeprom.srec 	$(obj)eeprom.bin \
+		$(obj)crcek.o $(obj)crcek $(obj)crcek.srec $(obj)crcek.bin
 
 distclean:	clean
 	rm -f $(LIB) core *.bak $(obj).depend
diff --git a/board/netstar/eeprom.lds b/board/netstar/eeprom.lds
deleted file mode 100644
index 1e48494..0000000
--- a/board/netstar/eeprom.lds
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
- * (C) Copyright 2005
- * Ladislav Michl, 2N Telekomunikace, <michl@2n.cz>
- *
- * 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
- */
-
-OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-SECTIONS
-{
-	. = ALIGN(4);
-	.text      :
-	{
-	  eeprom_start.o	(.text)
-	  *(.text)
-	}
-
-	. = ALIGN(4);
-	.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
-
-	. = ALIGN(4);
-	.data : { *(.data) }
-
-	. = ALIGN(4);
-	.got : { *(.got) }
-
-	. = ALIGN(4);
-	__bss_start = .;
-	.bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
-	_end = .;
-}
diff --git a/board/netstar/eeprom_start.S b/board/netstar/eeprom_start.S
deleted file mode 100644
index 3609382..0000000
--- a/board/netstar/eeprom_start.S
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 2005  2N Telekomunikace
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * version 2 as published by the Free Software Foundation.
- *
- */
-
-.globl _start
-_start:	b	eeprom
-
-.end
-- 
1.5.3.8

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 4/5] NetStar: fix default environment
  2010-01-27 23:16 [U-Boot] [PATCH 0/5] NetStar updates Ladislav Michl
                   ` (2 preceding siblings ...)
  2010-01-27 23:20 ` [U-Boot] [PATCH 3/5] NetStar: eeprom - fix linker error Ladislav Michl
@ 2010-01-27 23:21 ` Ladislav Michl
  2010-01-27 23:22 ` [U-Boot] [PATCH 5/5] NetStar: make mtdparts default ready for recent kernels Ladislav Michl
  2010-02-08 16:55 ` [U-Boot] [PATCH 0/5] NetStar updates Paulraj, Sandeep
  5 siblings, 0 replies; 13+ messages in thread
From: Ladislav Michl @ 2010-01-27 23:21 UTC (permalink / raw)
  To: u-boot

From: Ladislav Michl <ladis@linux-mips.org>

Correct switching partitions after upgrade and make it more readable.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 include/configs/netstar.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/configs/netstar.h b/include/configs/netstar.h
index 884dc09..d4465d6 100644
--- a/include/configs/netstar.h
+++ b/include/configs/netstar.h
@@ -156,7 +156,6 @@
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_RUN
 
-
 /*
  * BOOTP options
  */
@@ -176,14 +175,15 @@
 #define	CONFIG_EXTRA_ENV_SETTINGS						\
 	"autostart=yes\0"							\
 	"ospart=0\0"								\
-	"setup=setenv bootargs console=ttyS0,$baudrate "			\
-		"$mtdparts\0"							\
+	"setup=setenv bootargs console=ttyS0,$baudrate $mtdparts\0"		\
 	"setpart="								\
 	"if test -n $swapos; then "						\
 		"setenv swapos; saveenv; "					\
-	"else "									\
-		"if test $ospart -eq 0; then setenv ospart 1;"			\
-			"else setenv ospart 0;		fi; "			\
+		"if test $ospart -eq 0; then "					\
+			"setenv ospart 1; "					\
+		"else "								\
+			"setenv ospart 0; "					\
+		"fi; "								\
 	"fi\0"									\
 	"nfsargs=setenv bootargs $bootargs "					\
 		"ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname::off "	\
-- 
1.5.3.8

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 5/5] NetStar: make mtdparts default ready for recent kernels
  2010-01-27 23:16 [U-Boot] [PATCH 0/5] NetStar updates Ladislav Michl
                   ` (3 preceding siblings ...)
  2010-01-27 23:21 ` [U-Boot] [PATCH 4/5] NetStar: fix default environment Ladislav Michl
@ 2010-01-27 23:22 ` Ladislav Michl
  2010-02-08 16:55 ` [U-Boot] [PATCH 0/5] NetStar updates Paulraj, Sandeep
  5 siblings, 0 replies; 13+ messages in thread
From: Ladislav Michl @ 2010-01-27 23:22 UTC (permalink / raw)
  To: u-boot

From: Ladislav Michl <ladis@linux-mips.org>

Recent kernels are using generic NAND and NOR drivers. Change
default mtdparts to reflect it.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 include/configs/netstar.h |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/configs/netstar.h b/include/configs/netstar.h
index d4465d6..a7834fc 100644
--- a/include/configs/netstar.h
+++ b/include/configs/netstar.h
@@ -133,11 +133,10 @@
 #define CONFIG_CMD_MTDPARTS
 #define CONFIG_MTD_DEVICE		/* needed for mtdparts commands */
 #define CONFIG_FLASH_CFI_MTD
-#define MTDIDS_DEFAULT		"nor0=omapflash.0,nand0=omapnand.0"
+#define MTDIDS_DEFAULT		"nor0=physmap-flash.0,nand0=gen_nand.0"
 #define MTDPARTS_DEFAULT	"mtdparts=" \
-	"omapflash.0:8k at 16k(env),8k(r_env),448k at 576k(u-boot);" \
-	"omapnand.0:4M(kernel0),40M(rootfs0),4M(kernel1),40M(rootfs1),-(data)"
-
+	"physmap-flash.0:8k at 16k(env),8k(r_env),448k at 576k(u-boot);" \
+	"gen_nand.0:4M(kernel0),40M(rootfs0),4M(kernel1),40M(rootfs1),-(data)"
 
 /*
  * Command line configuration.
-- 
1.5.3.8

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 0/5] NetStar updates
  2010-01-27 23:16 [U-Boot] [PATCH 0/5] NetStar updates Ladislav Michl
                   ` (4 preceding siblings ...)
  2010-01-27 23:22 ` [U-Boot] [PATCH 5/5] NetStar: make mtdparts default ready for recent kernels Ladislav Michl
@ 2010-02-08 16:55 ` Paulraj, Sandeep
  2010-02-08 18:39   ` Ladislav Michl
  5 siblings, 1 reply; 13+ messages in thread
From: Paulraj, Sandeep @ 2010-02-08 16:55 UTC (permalink / raw)
  To: u-boot



> 
> Dear Sandeep,
> 
> following patches are intended to bring NetStar board to useable state.
> Similar fixes for linker errors will be needed for VoiceBlue board - I'll
> send them later, of course if you do not have any objections against this
> solution.
> 
> Best regards,
> 	ladis

Patches 1, 4 and 5 returned checkpatch errors.

Please fix them and resend the entire series to the list again.

Thanks,
Sandeep

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 0/5] NetStar updates
  2010-02-08 16:55 ` [U-Boot] [PATCH 0/5] NetStar updates Paulraj, Sandeep
@ 2010-02-08 18:39   ` Ladislav Michl
  2010-02-08 19:21     ` Paulraj, Sandeep
  0 siblings, 1 reply; 13+ messages in thread
From: Ladislav Michl @ 2010-02-08 18:39 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 08, 2010 at 10:55:04AM -0600, Paulraj, Sandeep wrote:
> Patches 1, 4 and 5 returned checkpatch errors.

I used scripts/checkpatch.pl from linux-2.6.33-rc5 and for patch 5 it reports
patch "has no obvious style problems and is ready for submission". For others
two it reports lines over 80 characters.

> Please fix them and resend the entire series to the list again.

Sorry, I'm unable to fix it and keep coding style consistent as you would
probably notice yourself looking at files in question. However I'm fine
with sending additional patches to make lines up to 80 characters long.
Or other way, first send bunch of patches making formatting changes
and rebasing functional changes on top of them. But given the fact
reaction comes more than one week after sending patches and Wolfgang's
wish to have everything pulled till 10th, I'm all for sooner way of
proceeding with patches as functionality matter a lot to me...
Anyway, it is your decision, just let me know which way do you prefer.

Thanks,
	ladis

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 0/5] NetStar updates
  2010-02-08 18:39   ` Ladislav Michl
@ 2010-02-08 19:21     ` Paulraj, Sandeep
  2010-02-08 21:41       ` Ladislav Michl
  0 siblings, 1 reply; 13+ messages in thread
From: Paulraj, Sandeep @ 2010-02-08 19:21 UTC (permalink / raw)
  To: u-boot



> 
> I used scripts/checkpatch.pl from linux-2.6.33-rc5 and for patch 5 it
> reports
> patch "has no obvious style problems and is ready for submission". For
> others
> two it reports lines over 80 characters.
> 
> > Please fix them and resend the entire series to the list again.
> 
> Sorry, I'm unable to fix it and keep coding style consistent as you would
> probably notice yourself looking at files in question. However I'm fine
> with sending additional patches to make lines up to 80 characters long.
> Or other way, first send bunch of patches making formatting changes
> and rebasing functional changes on top of them. But given the fact
> reaction comes more than one week after sending patches and Wolfgang's
> wish to have everything pulled till 10th, I'm all for sooner way of
> proceeding with patches as functionality matter a lot to me...
> Anyway, it is your decision, just let me know which way do you prefer.
> 
> Thanks,
> 	ladis

I fixed all the checkpatch errors myself and pushed the entire series.

Thanks,
Sandeep 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 0/5] NetStar updates
  2010-02-08 21:41       ` Ladislav Michl
@ 2010-02-08 20:45         ` Paulraj, Sandeep
  2010-02-09  9:12         ` [U-Boot] [PATCH] netstar.h: do not exceed 80 columns Ladislav Michl
  1 sibling, 0 replies; 13+ messages in thread
From: Paulraj, Sandeep @ 2010-02-08 20:45 UTC (permalink / raw)
  To: u-boot


> On Mon, Feb 08, 2010 at 01:21:42PM -0600, Paulraj, Sandeep wrote:
> > I fixed all the checkpatch errors myself and pushed the entire series.
> 
> Thank you for your effort, I really appreciate it. However, the dark side
> is that now it is pretty unobvious, what actually changed and that's
> why incremental patch was offered :-)


I understood that

> 
> http://git.denx.de/?p=u-boot/u-boot-
> ti.git;a=commitdiff;h=0b35314b0c89f074ebe924f611bdadfd14d24c36
> 
> There are lot of lines exceeding 80 column limit. Sending additional patch
> to fix that and will also prepare similar fixes for VoiceBlue board.

The issue was when I went to the lines checkpatch complained I realized that there were other lines in and around that needed to be fixed. So I just went ahead and fixed them.

> 
> Thank you,
> 	ladis

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 0/5] NetStar updates
  2010-02-08 19:21     ` Paulraj, Sandeep
@ 2010-02-08 21:41       ` Ladislav Michl
  2010-02-08 20:45         ` Paulraj, Sandeep
  2010-02-09  9:12         ` [U-Boot] [PATCH] netstar.h: do not exceed 80 columns Ladislav Michl
  0 siblings, 2 replies; 13+ messages in thread
From: Ladislav Michl @ 2010-02-08 21:41 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 08, 2010 at 01:21:42PM -0600, Paulraj, Sandeep wrote:
> I fixed all the checkpatch errors myself and pushed the entire series.

Thank you for your effort, I really appreciate it. However, the dark side
is that now it is pretty unobvious, what actually changed and that's
why incremental patch was offered :-)

http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commitdiff;h=0b35314b0c89f074ebe924f611bdadfd14d24c36

There are lot of lines exceeding 80 column limit. Sending additional patch
to fix that and will also prepare similar fixes for VoiceBlue board.

Thank you,
	ladis

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH] netstar.h: do not exceed 80 columns
  2010-02-08 21:41       ` Ladislav Michl
  2010-02-08 20:45         ` Paulraj, Sandeep
@ 2010-02-09  9:12         ` Ladislav Michl
  2010-02-18  2:22           ` Paulraj, Sandeep
  1 sibling, 1 reply; 13+ messages in thread
From: Ladislav Michl @ 2010-02-09  9:12 UTC (permalink / raw)
  To: u-boot

From: Ladislav Michl <ladis@linux-mips.org>

Limit line length to 80 characters mostly by removing obvious and sometimes
misleading comments. Fix indentation, too.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 netstar.h |   65 +++++++++++++++++++++++++++++---------------------------------
 1 file changed, 31 insertions(+), 34 deletions(-)

diff --git a/include/configs/netstar.h b/include/configs/netstar.h
index edda3ce..c63c846 100644
--- a/include/configs/netstar.h
+++ b/include/configs/netstar.h
@@ -27,17 +27,13 @@
 
 #include <configs/omap1510.h>
 
-/*
- * High Level Configuration Options
- * (easy to change)
- */
 #define CONFIG_ARM925T	1		/* This is an arm925t CPU */
 #define CONFIG_OMAP	1		/* in a TI OMAP core */
 #define CONFIG_OMAP1510 1		/* which is in a 5910 */
 
 /* Input clock of PLL */
-#define CONFIG_SYS_CLK_FREQ	150000000	/* 150MHz input clock */
-#define CONFIG_XTAL_FREQ	12000000
+#define CONFIG_SYS_CLK_FREQ		150000000	/* 150MHz */
+#define CONFIG_XTAL_FREQ		12000000	/*  12MHz */
 
 #undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff */
 
@@ -54,10 +50,10 @@
 /*
  * Physical Memory Map
  */
-#define CONFIG_NR_DRAM_BANKS	1		/* we have 1 bank of DRAM */
-#define PHYS_SDRAM_1		0x10000000	/* SDRAM Bank #1 */
-#define PHYS_SDRAM_1_SIZE	(64 * 1024 * 1024)
-#define PHYS_FLASH_1		0x00000000	/* Flash Bank #1 */
+#define CONFIG_NR_DRAM_BANKS		1
+#define PHYS_SDRAM_1			0x10000000
+#define PHYS_SDRAM_1_SIZE		(64 * 1024 * 1024)
+#define PHYS_FLASH_1			0x00000000
 
 #define CONFIG_SYS_MONITOR_BASE		PHYS_FLASH_1
 #define CONFIG_SYS_MONITOR_LEN		(256 * 1024)
@@ -66,23 +62,23 @@
  * Environment settings
  */
 #define CONFIG_ENV_IS_IN_FLASH
-#define CONFIG_ENV_ADDR		0x4000
-#define CONFIG_ENV_SIZE		(8 * 1024)
-#define CONFIG_ENV_SECT_SIZE	(8 * 1024)
-#define CONFIG_ENV_ADDR_REDUND	0x6000
-#define CONFIG_ENV_SIZE_REDUND	CONFIG_ENV_SIZE
+#define CONFIG_ENV_ADDR			0x4000
+#define CONFIG_ENV_SIZE			(8 * 1024)
+#define CONFIG_ENV_SECT_SIZE		(8 * 1024)
+#define CONFIG_ENV_ADDR_REDUND		0x6000
+#define CONFIG_ENV_SIZE_REDUND		CONFIG_ENV_SIZE
 #define CONFIG_ENV_OVERWRITE
 
 /*
  * Size of malloc() pool
  */
-#define CONFIG_SYS_GBL_DATA_SIZE	128	/* size in bytes reserved for initial data */
+#define CONFIG_SYS_GBL_DATA_SIZE	128
 #define CONFIG_SYS_MALLOC_LEN		(4 * 1024 * 1024)
 
 /*
  * The stack size is set up in start.S using the settings below
  */
-#define CONFIG_STACKSIZE	(1 * 1024 * 1024)	/* regular stack */
+#define CONFIG_STACKSIZE		(1 * 1024 * 1024)
 
 /*
  * Hardware drivers
@@ -90,8 +86,8 @@
 #define CONFIG_SYS_NS16550
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	(-4)
-#define CONFIG_SYS_NS16550_CLK		(CONFIG_XTAL_FREQ)	/* can be 12M/32Khz or 48Mhz  */
-#define CONFIG_SYS_NS16550_COM1		OMAP1510_UART1_BASE	/* uart1 */
+#define CONFIG_SYS_NS16550_CLK		(CONFIG_XTAL_FREQ)
+#define CONFIG_SYS_NS16550_COM1		OMAP1510_UART1_BASE
 
 #define CONFIG_NET_MULTI
 #define CONFIG_SMC91111
@@ -128,10 +124,10 @@
 /*#define CONFIG_SKIP_LOWLEVEL_INIT */
 
 /*
- * partitions (mtdparts command line support)
+ * Partitions (mtdparts command line support)
  */
 #define CONFIG_CMD_MTDPARTS
-#define CONFIG_MTD_DEVICE		/* needed for mtdparts commands */
+#define CONFIG_MTD_DEVICE
 #define CONFIG_FLASH_CFI_MTD
 #define MTDIDS_DEFAULT		"nor0=physmap-flash.0,nand0=gen_nand.0"
 #define MTDPARTS_DEFAULT	"mtdparts=" \
@@ -139,7 +135,7 @@
 	"gen_nand.0:4M(kernel0),40M(rootfs0),4M(kernel1),40M(rootfs1),-(data)"
 
 /*
- * Command line configuration.
+ * Command line configuration
  */
 #define CONFIG_CMD_BDI
 #define CONFIG_CMD_BOOTD
@@ -204,12 +200,13 @@
 /*
  * Miscellaneous configurable options
  */
-#define CONFIG_SYS_LONGHELP				/* undef to save memory		*/
-#define CONFIG_SYS_PROMPT		"# "		/* Monitor Command Prompt	*/
-#define CONFIG_SYS_CBSIZE		256		/* Console I/O Buffer Size	*/
-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS		16		/* max number of command args	*/
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE	/* Boot Argument Buffer Size	*/
+#define CONFIG_SYS_LONGHELP
+#define CONFIG_SYS_PROMPT		"# "
+#define CONFIG_SYS_CBSIZE		256
+#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
+	 sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_MAXARGS		16
+#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
 #define CONFIG_SYS_HUSH_PARSER
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
@@ -217,9 +214,9 @@
 
 #define CONFIG_SYS_MEMTEST_START	PHYS_SDRAM_1
 #define CONFIG_SYS_MEMTEST_END		PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE - \
-				(CONFIG_SYS_MONITOR_LEN + CONFIG_SYS_MALLOC_LEN + CONFIG_STACKSIZE)
+	(CONFIG_SYS_MONITOR_LEN + CONFIG_SYS_MALLOC_LEN + CONFIG_STACKSIZE)
 
-#define CONFIG_SYS_LOAD_ADDR		PHYS_SDRAM_1 + 0x400000	/* default load address */
+#define CONFIG_SYS_LOAD_ADDR		(PHYS_SDRAM_1 + 0x400000)
 
 /* The 1510 has 3 timers, they can be driven by the RefClk (12MHz) or by DPLL1.
  * This time is further subdivided by a local divisor.
@@ -228,9 +225,9 @@
 #define CONFIG_SYS_PTV			7
 #define CONFIG_SYS_HZ			1000
 
-#define OMAP5910_DPLL_DIV	1
-#define OMAP5910_DPLL_MUL	((CONFIG_SYS_CLK_FREQ * \
-				 (1 << OMAP5910_DPLL_DIV)) / CONFIG_XTAL_FREQ)
+#define OMAP5910_DPLL_DIV		1
+#define OMAP5910_DPLL_MUL		\
+	((CONFIG_SYS_CLK_FREQ * (1 << OMAP5910_DPLL_DIV)) / CONFIG_XTAL_FREQ)
 
 #define OMAP5910_ARM_PER_DIV	2	/* CKL/4 */
 #define OMAP5910_LCD_DIV	2	/* CKL/4 */
@@ -240,7 +237,7 @@
 #define OMAP5910_DSP_MMU_DIV	1	/* CKL/2 */
 #define OMAP5910_ARM_TIM_SEL	1	/* CKL used for MPU timers */
 
-#define OMAP5910_ARM_EN_CLK	0x03d6	/* 0000 0011 1101 0110b  Clock Enable */
+#define OMAP5910_ARM_EN_CLK	0x03d6	/* 0000 0011 1101 0110b */
 #define OMAP5910_ARM_CKCTL	((OMAP5910_ARM_PER_DIV)  |	\
 				 (OMAP5910_LCD_DIV << 2) |	\
 				 (OMAP5910_ARM_DIV << 4) |	\

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH] netstar.h: do not exceed 80 columns
  2010-02-09  9:12         ` [U-Boot] [PATCH] netstar.h: do not exceed 80 columns Ladislav Michl
@ 2010-02-18  2:22           ` Paulraj, Sandeep
  0 siblings, 0 replies; 13+ messages in thread
From: Paulraj, Sandeep @ 2010-02-18  2:22 UTC (permalink / raw)
  To: u-boot



> 
> From: Ladislav Michl <ladis@linux-mips.org>
> 
> Limit line length to 80 characters mostly by removing obvious and
> sometimes
> misleading comments. Fix indentation, too.
> 
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
>  netstar.h |   65 +++++++++++++++++++++++++++++---------------------------
> ------
>  1 file changed, 31 insertions(+), 34 deletions(-)
> 

Pushed to u-boot-ti

It built fine. Maybe you can test it as well. I have rebased with Wolfgang.

Thanks,
Sandeep

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-02-18  2:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-27 23:16 [U-Boot] [PATCH 0/5] NetStar updates Ladislav Michl
2010-01-27 23:18 ` [U-Boot] [PATCH 1/5] NetStar: eeprom - undefined reference to `memset' Ladislav Michl
2010-01-27 23:19 ` [U-Boot] [PATCH 2/5] NetStar: eeprom - be less verbose Ladislav Michl
2010-01-27 23:20 ` [U-Boot] [PATCH 3/5] NetStar: eeprom - fix linker error Ladislav Michl
2010-01-27 23:21 ` [U-Boot] [PATCH 4/5] NetStar: fix default environment Ladislav Michl
2010-01-27 23:22 ` [U-Boot] [PATCH 5/5] NetStar: make mtdparts default ready for recent kernels Ladislav Michl
2010-02-08 16:55 ` [U-Boot] [PATCH 0/5] NetStar updates Paulraj, Sandeep
2010-02-08 18:39   ` Ladislav Michl
2010-02-08 19:21     ` Paulraj, Sandeep
2010-02-08 21:41       ` Ladislav Michl
2010-02-08 20:45         ` Paulraj, Sandeep
2010-02-09  9:12         ` [U-Boot] [PATCH] netstar.h: do not exceed 80 columns Ladislav Michl
2010-02-18  2:22           ` Paulraj, Sandeep

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox