Skip to contentSkip to conversation

NetStar updates

PATCH New Ladislav Michl 2 participants 13 messages Jan 27, 2010 – Feb 18, 2010

lore
Share & tools
lore
#0 lore raw

cover NetStar updates

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

#1 lore raw

PATCH 1/5 NetStar: eeprom - undefined reference to `memset'

From: Ladislav Michl <[email protected]>

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)

---
 board/netstar/eeprom.c |   61 +++++++++++++++++++++++------------------------
 1 files changed, 30 insertions(+), 31 deletions(-)
board/netstar/eeprom.c +30 -31
index adb01b9..ef530a3 100644
@@ -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;
 }
Signature · 1 line
1.5.3.8
#2 lore raw

PATCH 2/5 NetStar: eeprom - be less verbose

In reply to Ladislav Michl

From: Ladislav Michl <[email protected]>

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

---
 board/netstar/eeprom.c |   27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)
board/netstar/eeprom.c +13 -14
index ef530a3..1670a5b 100644
@@ -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;
 	}
 
Signature · 1 line
1.5.3.8
#3 lore raw

PATCH 3/5 NetStar: eeprom - fix linker error

In reply to Ladislav Michl

From: Ladislav Michl <[email protected]>

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.

---
 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
board/netstar/Makefile +25 -29
index 11578b7..c435762 100644
@@ -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
board/netstar/eeprom.lds deleted +0 -51

51 lines not on this page · raw message

board/netstar/eeprom_start.S deleted +0 -13
deleted file mode 100644
index 3609382..0000000
@@ -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
Signature · 1 line
1.5.3.8
#4 lore raw

PATCH 4/5 NetStar: fix default environment

In reply to Ladislav Michl

From: Ladislav Michl <[email protected]>

Correct switching partitions after upgrade and make it more readable.

---
 include/configs/netstar.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
include/configs/netstar.h +6 -6
index 884dc09..d4465d6 100644
@@ -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 "	\
Signature · 1 line
1.5.3.8
#5 lore raw

PATCH 5/5 NetStar: make mtdparts default ready for recent kernels

In reply to Ladislav Michl

From: Ladislav Michl <[email protected]>

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

---
 include/configs/netstar.h |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
include/configs/netstar.h +3 -4
index d4465d6..a7834fc 100644
@@ -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.
Signature · 1 line
1.5.3.8
#6 lore raw

cover NetStar updates

In reply to Ladislav Michl
Quoted 5 lines

Dear Sandeep,

Quoted 7 lines

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

#7 lore raw

cover NetStar updates

Quoted 1 line · Sandeep

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.

Quoted 1 line

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

#8 lore raw

cover NetStar updates

Quoted 21 lines

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.

Quoted 1 line

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.

Quoted 2 lines

Thanks,
ladis

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

Thanks,
Sandeep

#9 lore raw

cover NetStar updates

Quoted 1 line · Sandeep

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

#10 lore raw

cover NetStar updates

Quoted 7 lines · Sandeep
Quoted 1 line

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

Quoted 6 lines

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.

Quoted 3 lines

Thank you,
ladis

#11 lore raw

PATCH 1/1 netstar.h: do not exceed 80 columns

In reply to Ladislav Michl

From: Ladislav Michl <[email protected]>

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

---
 netstar.h |   65 +++++++++++++++++++++++++++++---------------------------------
 1 file changed, 31 insertions(+), 34 deletions(-)
include/configs/netstar.h +31 -34
index edda3ce..c63c846 100644
@@ -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) |	\
#12 lore raw

PATCH 1/1 netstar.h: do not exceed 80 columns

Quoted 9 lines

From: Ladislav Michl <[email protected]>

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

Quoted 6 lines
---
 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