Re: [U-Boot] [PATCH 1/2 v2] cramfs: make cramfs usable on non NOR flash
Hello Wolfgang, Wolfgang Denk wrote: > In message <4b5feb9e.3040...@denx.de> you wrote: >> [PATCH 1/2] cramfs: make cramfs usable without a NOR flash > > I'm afraid I still don't understand how this is supposed to work. > > Where would you store the cramfs on a system "without a NOR flash"? > Are we talking about - say - a NAND storage device then? The cramfs image is located in RAM (where it first was copied from whenever), and then files are read from it with the "cramfsload" command ... >> @@ -119,7 +121,11 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int >> argc, char *argv[]) >> dev.id = &id; >> part.dev = &dev; >> /* fake the address offset */ >> +#if !defined(CONFIG_SYS_NO_FLASH) >> part.offset = addr - flash_info[id.num].start[0]; >> +#else >> +part.offset = addr; >> +#endif > > I understand that we now can have the cramfs image either in NOR flash > _or_ in NAND. No, we can have it in ROM or in RAM. > What about systems that have both NOR _and_ NAND? Are there such systems, with cramfs support? Actual cramfs support in mainline is only for NOR devices ... But, I think, it should work to extract a file from a cramfs stored on a NAND on such systems with the "cramfsload" command ... if not, the cramfs image could be copied from NAND to RAM, and then it works ... bye Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] How to use multiple env variables.
Hi, Is there any option for multiple env variables so that when i upgrade the kernel and rootfile system if not working properly so that i can fall back to the previous kernel and ramdisk considering i have a sufficiently big nand with required number of partition. thanks and regard Shashi ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] 85xx/p1_p2_rdb: p1020: add muxed usb2handling
This patch adds the 2nd USB (muxed with eLBC) node depending upon enabling the 'usb2' environment variable via hwconfig i.e. "setenv hwconfig usb2", so that linux has the 2nd USB controller enabled, which will lead to the disabling of the eLBC (NAND, NOR etc). Also the 2nd USB controller has been left disabled in the u-boot, otherwise any changes in the environment won't be saved. Enabled agent mode support in USB2 depending upon "setenv hwconfig usb2:dr_mode=peripheral" Updated copyright year too. Signed-off-by: Vivek Mahajan Signed-off-by: Harninder Rai --- - Incorporated Kumar's comments - Applies to git://git.denx.de/u-boot-mpc85xx.git board/freescale/p1_p2_rdb/p1_p2_rdb.c | 126 - cpu/mpc85xx/fdt.c |2 +- include/asm-ppc/immap_85xx.h |4 +- 3 files changed, 129 insertions(+), 3 deletions(-) diff --git a/board/freescale/p1_p2_rdb/p1_p2_rdb.c b/board/freescale/p1_p2_rdb/p1_p2_rdb.c index 3af660e..0b370ad 100644 --- a/board/freescale/p1_p2_rdb/p1_p2_rdb.c +++ b/board/freescale/p1_p2_rdb/p1_p2_rdb.c @@ -1,5 +1,5 @@ /* - * Copyright 2009 Freescale Semiconductor, Inc. + * Copyright 2009-10 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -21,6 +21,7 @@ */ #include +#include #include #include #include @@ -41,6 +42,7 @@ DECLARE_GLOBAL_DATA_PTR; #define SGMII_PHY_RST_SET 0x0002 #define PCIE_RST_SET 0x0001 #define RGMII_PHY_RST_SET 0x0200 +#define USB2_PORT_OUT_EN 0x0100 #define USB_RST_CLR0x0400 @@ -198,10 +200,116 @@ int board_eth_init(bd_t *bis) #endif #if defined(CONFIG_OF_BOARD_SETUP) +void fdt_fixup_add_2nd_usb(void *blob, int agent) +{ + const char *soc_compat = "fsl,p1020-immr"; + const char *lbc_compat = "fsl,p1020-elbc"; + const u32 *addrcell, *sizecell, *ph; + int off, lbcoff, len, err; + u32 *regbuf = NULL; + u32 *irqbuf = NULL; + + off = fdt_node_offset_by_compatible(blob, -1, soc_compat); + if (off < 0) { + printf("WARNING: could not find compatible node %s: %s.\n", + soc_compat, fdt_strerror(off)); + return; + } + + lbcoff = fdt_node_offset_by_compatible(blob, -1, lbc_compat); + if (lbcoff < 0) { + printf("WARNING: could not find compatible node %s: %s.\n", + lbc_compat, fdt_strerror(lbcoff)); + return; + } + + addrcell = fdt_getprop(blob, off, "#address-cells", NULL); + sizecell = fdt_getprop(blob, off, "#size-cells", NULL); + + off = fdt_add_subnode(blob, off, "u...@23000"); + if (off < 0) { + printf("WARNING: could not add 2nd usb node %s.\n", + fdt_strerror(off)); + return; + } + + err = fdt_setprop_cell(blob, off, "#address-cells", 1); + if (err < 0) + printf("WARNING: could not set #address-cell property: %s\n", + fdt_strerror(err)); + + err = fdt_setprop_cell(blob, off, "#size-cells", 0); + if (err < 0) + printf("WARNING: could not set #size-cells property: %s\n", + fdt_strerror(err)); + + err = fdt_setprop_string(blob, off, "compatible", "fsl-usb2-dr"); + if (err < 0) + printf("WARNING: could not set compatible property: %s\n", + fdt_strerror(err)); + + err = fdt_setprop_string(blob, off, "phy_type", "ulpi"); + if (err < 0) + printf("WARNING: could not set phy_type property: %s\n", + fdt_strerror(err)); + + if (agent) { + err = fdt_setprop_string(blob, off, "dr_mode", "peripheral"); + if (err < 0) + printf("WARNING: could not set dr_mode property: %s\n", + fdt_strerror(err)); + } + + if (addrcell && *addrcell == 2) { + regbuf[0] = 0; + regbuf[1] = CONFIG_SYS_MPC85xx_USB2_OFFSET; + len = 2; + } else { + regbuf[0] = CONFIG_SYS_MPC85xx_USB2_OFFSET; + len = 1; + } + + if (sizecell && *sizecell == 2) { + regbuf[len] = 0; + regbuf[len + 1] = 0x1000; + len += 2; + } else { + regbuf[len] = 0x1000; + len++; + } + + err = fdt_setprop(blob, off, "reg", regbuf, len * sizeof(u32)); + if (err < 0) + printf("WARNING: could not set <%s> %s\n", + "reg", fdt_strerror(err)); + + irqbuf[0] = 0x2e; + irqbuf[1] = 0x2; + + err = fdt_setprop(blob, off, "interrupts", irqbuf, 2 * sizeof(u32)); + if (err < 0) + printf("WARNING: could not set %s %s\n", + "interru
Re: [U-Boot] ARM pull request
> -Original Message- > From: u-boot-boun...@lists.denx.de > [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Wolfgang Denk > Sent: Saturday, January 23, 2010 10:18 PM > To: Tom > Cc: u-boot@lists.denx.de > Subject: Re: [U-Boot] ARM pull request > > Dear Tom, > > In message <4b5b134b.5060...@windriver.com> you wrote: > > > > Please pull from ARM master-sync > > Can you please try and use the "master" branch for such pull requests? > Thanks. > > > Daniel Gorsulowski (1): > >at91: Enable slow master clock on meesc board > > > > Minkyu Kang (1): > >s5pc1xx: update cache routines > > > > Prafulla Wadaskar (2): > >Kirkwood: Upgated licencing for files imported from > linux source to GPLv2 > > or later > > I cannot find any patch with this subject anywhere. Can you please try > and avoid to change the patch subjects? Hi Wolfgang Yes, the subject is changed, this is my mistake while sending pull request. Can you pls pull in http://lists.denx.de/pipermail/u-boot/2009-December/065799.html instead? Or Shall I generate new pull request for the same? > > BTW: what's "Upgated"? ;-) Oh, this is spelling mistake :-( I am very sorry for this Regards.. Prafulla . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/5] NetStar: make mtdparts default ready for recent kernels
From: Ladislav Michl Recent kernels are using generic NAND and NOR drivers. Change default mtdparts to reflect it. Signed-off-by: Ladislav Michl --- 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:8...@16k(env),8k(r_env),4...@576k(u-boot);" \ - "omapnand.0:4M(kernel0),40M(rootfs0),4M(kernel1),40M(rootfs1),-(data)" - + "physmap-flash.0:8...@16k(env),8k(r_env),4...@576k(u-boot);" \ + "gen_nand.0:4M(kernel0),40M(rootfs0),4M(kernel1),40M(rootfs1),-(data)" /* * Command line configuration. -- 1.5.3.8 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/5] NetStar: fix default environment
From: Ladislav Michl Correct switching partitions after upgrade and make it more readable. Signed-off-by: Ladislav Michl --- 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 @@ #defineCONFIG_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 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/5] NetStar: eeprom - fix linker error
From: Ladislav Michl 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 --- 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 = 0x1040 -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 0x \ - -o $(<:.o=) -e crcek $^ - $(OBJCOPY) -O srec $(<:.o=) $@ + $(LD) -g -Ttext 0x -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..000 --- a/board/netstar/eeprom.lds +++ /dev/null @@ -1,51 +0,0 @@ -/* - * (C) Copyright 2002 - * Gary Jennejohn, DENX Software Engineering, - * (C) Copyright 2005 - * Ladislav Michl, 2N Telekomunikace, - * - * 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 th
[U-Boot] [PATCH 2/5] NetStar: eeprom - be less verbose
From: Ladislav Michl Use shorter yet descriptive messages, replace printf() with puts() where appropriate. This saves few bytes. Signed-off-by: Ladislav Michl --- 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("SMSC9 not found.\n"); + puts("SMSC9 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 [] [<...>]\n"); + puts("NetStar EEPROM writer\n" + "Built: " U_BOOT_DATE " at " U_BOOT_TIME "\n" + "Usage:\n\t [] [<...>]\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 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/5] NetStar: eeprom - undefined reference to `memset'
From: Ladislav Michl 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 --- 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 #include "../drivers/net/smc9.h" -static u16 read_eeprom_reg(struct eth_device *dev, u16 reg) +static struct eth_device dev = { + .iobase = CONFIG_SMC9_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_SMC9_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("SMSC9 not found.\n"); return 2; } /* Called without parameters - print MAC address */ if (argc < 2) { - verify_macaddr(&dev, NULL); + verify_macaddr(NULL); return 0; } @@
[U-Boot] [PATCH 0/5] 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 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] CFI numblocks incorrect?
it seems CFI flash support is somehow broken. mtd->eraseregions is filled as bellow: erase size blocks correct blocks 400001 01 200001 02 800000 01 00010f 0f 'blocks' is actual numblocks field value while 'correct blocks' is expected value. flinfo gives correct results (it is AM29LV800BB). It seems to be related to cfi_mtd_set_erasesize function, but I'm too tired to debug it further. Just reporting in case anyone has time to look at it. Otherwise I'll do so at Friday. Best regards, ladis ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] musb: Add host support for DM365 EVM
Dear Remy Bohmer, In message <3efb10971001271218s3c2d4049l44895af4f8c97...@mail.gmail.com> you wrote: > Hi Prathap, > > Please post patch updates to an existing list in the future. That > would increase response times... ;-) increase or reduce? ;-) 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: w...@denx.de How does a project get to be a year late? ... One day at a time. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] lcd: remove CONFIG_ATMEL_LCD ifdefs from lcd_setfgcolor
> Applied to u-boot-video/master Thanks. Then my "[PATCH V3 6/9] lcd: make 16bpp work" can use : ? lcd_color_fg : lcd_color_bg; instead of this worse choice that I sent in: ? 0x : 0; I don't feel like I should resend, but if asked to I'll resend. /alessandro ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Pull request: nand flash
The following changes since commit 9b208ece0a4e040774e24990b7cb6f0ad0ca4cc7: Wolfgang Denk (1): Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx are available in the git repository at: git://git.denx.de/u-boot-nand-flash.git master John Rigby (3): arm926ejs: add nand_spl boot support Add MX25 support to nand_spl fsl nfc driver Nand mxc_nand add v1.1 controller support Liu Yu (1): Nand boot: Add nand boot support for MPC8569mds board Wolfgang Denk (1): env_nand.c: print error message and fail gracefully MAKEALL |1 + Makefile|1 + board/freescale/mpc8569mds/config.mk|9 + board/freescale/mpc8569mds/tlb.c| 11 + common/env_nand.c |7 + cpu/arm926ejs/start.S | 42 ++- drivers/mtd/nand/mxc_nand.c | 617 --- include/configs/MPC8569MDS.h| 64 +++- include/fsl_nfc.h | 86 +++- nand_spl/board/freescale/mpc8569mds/Makefile| 133 + nand_spl/board/freescale/mpc8569mds/nand_boot.c | 75 +++ nand_spl/nand_boot_fsl_nfc.c| 72 +++- 12 files changed, 1016 insertions(+), 102 deletions(-) create mode 100644 nand_spl/board/freescale/mpc8569mds/Makefile create mode 100644 nand_spl/board/freescale/mpc8569mds/nand_boot.c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Nand boot: Add nand boot support for MPC8569mds board
On Mon, Jan 18, 2010 at 07:03:28PM +0800, Liu Yu wrote: > This patch add nand boot support for MPC8569mds board. > > Signed-off-by: Liu Yu > --- > v2: > change subject and commit message. > > MAKEALL |1 + > Makefile|3 +- > board/freescale/mpc8569mds/config.mk|9 ++ > board/freescale/mpc8569mds/tlb.c| 11 ++ > include/configs/MPC8569MDS.h| 64 +++- > nand_spl/board/freescale/mpc8569mds/Makefile| 133 > +++ > nand_spl/board/freescale/mpc8569mds/nand_boot.c | 75 + > 7 files changed, 292 insertions(+), 4 deletions(-) > create mode 100644 nand_spl/board/freescale/mpc8569mds/Makefile > create mode 100644 nand_spl/board/freescale/mpc8569mds/nand_boot.c > > diff --git a/MAKEALL b/MAKEALL > index a6d0f20..2b303f8 100755 > --- a/MAKEALL > +++ b/MAKEALL > @@ -403,6 +403,7 @@ LIST_85xx=" \ > MPC8560ADS \ > MPC8568MDS \ > MPC8569MDS \ > + MPC8569MDS_NAND \ > MPC8572DS \ > MPC8572DS_36BIT \ > P2020DS \ > diff --git a/Makefile b/Makefile > index 1abe64a..3e3d11b 100644 > --- a/Makefile > +++ b/Makefile > @@ -2477,8 +2477,9 @@ MPC8555CDS_config: unconfig > MPC8568MDS_config: unconfig > @$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8568mds freescale > > +MPC8569MDS_NAND_config \ > MPC8569MDS_config: unconfig > - @$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8569mds freescale > + @$(MKCONFIG) -t $(@:_config=) MPC8569MDS ppc mpc85xx mpc8569mds > freescale An MPC8569MDS_ATM target has been merged upstream. I'll merge this as is, but I recommend adding (and testing) a config that supports both NAND and ATM, unless that is an impossible config for whatever reason. You may want to consider doing something like this: # Options: NAND ATM MPC8569MDS%config: unconfig @$(MKCONFIG) -t $(@:_config=) MPC8569MDS ppc mpc85xx mpc8569mds freescale BTW, I get this when building MPC8569 (either base or ATM, but not NAND, and not new with this patch) with gcc 4.2.1 and binutils 2.18 (but not gcc 4.0.2 and binutils 2.16.1): powerpc-linux-ld: u-boot: section `.text' can't be allocated in segment 0 powerpc-linux-ld: final link failed: Bad value If I compile with the bad toolchain but link with the good one, it works, so it seems to be a binutils/linker script issue, not a code size issue. It seems to be related to not overriding RESET_VECTOR_ADDRESS, and thus having the BSS at zero (or rather, 0x10). mpc8544ds mpc8548cds also don't do this, and I see the same problem there, but I don't see it on e.g. mpc8572ds or p2020ds which do. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Pull request: u-boot-video
Dear Wolfgang, The following changes since commit 9b208ece0a4e040774e24990b7cb6f0ad0ca4cc7: Wolfgang Denk (1): Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx are available in the git repository at: git://git.denx.de/u-boot-video.git master Alessandro Rubini (2): video: add amba-clcd prime-cell include/nomadik.h: add physical address for cldc Anatolij Gustschin (1): lcd: remove CONFIG_ATMEL_LCD ifdefs from lcd_setfgcolor common/lcd.c |8 - drivers/video/Makefile |1 + drivers/video/amba.c | 79 include/amba_clcd.h| 77 ++ include/nomadik.h |1 + 5 files changed, 158 insertions(+), 8 deletions(-) create mode 100644 drivers/video/amba.c create mode 100644 include/amba_clcd.h Best regards, Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] lcd: remove CONFIG_ATMEL_LCD ifdefs from lcd_setfgcolor
On Sat, 12 Dec 2009 21:52:23 +0100 Anatolij Gustschin wrote: > Not all boards defining LCD_COLOR16 are able to set > lcd_color_fg/lcd_color_bg correctly. The issue seems to > be caused by CONFIG_ATMEL_LCD ifdefs in lcd_setfgcolor() > and lcd_setbgcolor(). Actually, the color values passed > to these functions are already correct, we don't need > to fix them. So remove ifdefs here. > > Reported-by: Alessandro Rubini > Signed-off-by: Anatolij Gustschin Applied to u-boot-video/master Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] musb: Add host support for DM365 EVM
Hi Prathap, Please post patch updates to an existing list in the future. That would increase response times... ;-) But nevertheless: Applied to u-boot-usb Thanks. Remy 2010/1/11 Prathap Srinivas : > Add support for musb host on DM365 EVM. > > Signed-off-by: Prathap Srinivas > --- > Changes from v1: > - fixed review comments from Remy. > drivers/usb/musb/davinci.c | 21 ++- > drivers/usb/musb/davinci.h | 1 + > include/configs/davinci_dm365evm.h | 38 > > 3 files changed, 58 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c > index a7648fc..8fbadc9 100644 > --- a/drivers/usb/musb/davinci.c > +++ b/drivers/usb/musb/davinci.c > @@ -24,6 +24,7 @@ > #include > #include > #include "davinci.h" > +#include > > /* MUSB platform configuration */ > struct musb_config musb_cfg = { > @@ -41,10 +42,25 @@ struct davinci_usb_regs *dregs; > static u8 phy_on(void) > { > u32 timeout; > - > +#ifdef DAVINCI_DM365EVM > + u32 val; > +#endif > /* Wait until the USB phy is turned on */ > +#ifdef DAVINCI_DM365EVM > + writel(USBPHY_PHY24MHZ | USBPHY_SESNDEN | > + USBPHY_VBDTCTEN, USBPHY_CTL_PADDR); > +#else > writel(USBPHY_SESNDEN | USBPHY_VBDTCTEN, USBPHY_CTL_PADDR); > +#endif > timeout = musb_cfg.timeout; > + > +#ifdef DAVINCI_DM365EVM > + /* Set the ownership of GIO33 to USB */ > + val = readl(PINMUX4); > + val &= ~(PINMUX4_USBDRVBUS_BITCLEAR); > + val |= PINMUX4_USBDRVBUS_BITSET; > + writel(val, PINMUX4); > +#endif > while (timeout--) > if (readl(USBPHY_CTL_PADDR) & USBPHY_PHYCLKGD) > return 1; > @@ -70,8 +86,9 @@ int musb_platform_init(void) > u32 revision; > > /* enable USB VBUS */ > +#ifndef DAVINCI_DM365EVM > enable_vbus(); > - > +#endif > /* start the on-chip USB phy and its pll */ > if (!phy_on()) > return -1; > diff --git a/drivers/usb/musb/davinci.h b/drivers/usb/musb/davinci.h > index f6751bf..e0829d6 100644 > --- a/drivers/usb/musb/davinci.h > +++ b/drivers/usb/musb/davinci.h > @@ -63,6 +63,7 @@ struct davinci_usb_regs { > > /* Integrated highspeed/otg PHY */ > #define USBPHY_CTL_PADDR (DAVINCI_SYSTEM_MODULE_BASE + 0x34) > +#define USBPHY_PHY24MHZ (1 << 13) > #define USBPHY_PHYCLKGD (1 << 8) > #define USBPHY_SESNDEN (1 << 7) /* v(sess_end) comparator */ > #define USBPHY_VBDTCTEN (1 << 6) /* v(bus) comparator */ > diff --git a/include/configs/davinci_dm365evm.h > b/include/configs/davinci_dm365evm.h > index c01426b..0828676 100644 > --- a/include/configs/davinci_dm365evm.h > +++ b/include/configs/davinci_dm365evm.h > @@ -86,6 +86,44 @@ > #define CONFIG_SYS_MAX_NAND_DEVICE 1 > #define CONFIG_SYS_NAND_MAX_CHIPS 2 > > +#define PINMUX4_USBDRVBUS_BITCLEAR 0x3000 > +#define PINMUX4_USBDRVBUS_BITSET 0x2000 > + > +/* USB Configuration */ > +#define CONFIG_USB_DAVINCI > +#define CONFIG_MUSB_HCD > + > +#ifdef CONFIG_USB_DAVINCI > +#define CONFIG_CMD_USB /* include support for usb */ > +#define CONFIG_CMD_STORAGE /* include support for usb */ > +#define CONFIG_CMD_FAT /* include support for FAT/storage*/ > +#define CONFIG_DOS_PARTITION /* include support for FAT/storage*/ > +#endif > + > +#ifdef CONFIG_MUSB_HCD /* include support for usb host */ > +#define CONFIG_CMD_USB /* include support for usb cmd */ > +#define CONFIG_USB_STORAGE /* MSC class support */ > +#define CONFIG_CMD_STORAGE /* inclue support for usb-storage cmd */ > +#define CONFIG_CMD_FAT /* inclue support for FAT/storage */ > +#define CONFIG_DOS_PARTITION /* inclue support for FAT/storage */ > + > +#ifdef CONFIG_USB_KEYBOARD /* HID class support */ > +#define CONFIG_SYS_USB_EVENT_POLL > + > +#define CONFIG_PREBOOT "usb start" > +#endif /* CONFIG_USB_KEYBOARD */ > +#endif /* CONFIG_MUSB_HCD */ > + > +#ifdef CONFIG_MUSB_UDC > +#define CONFIG_USB_DEVICE 1 > +#define CONFIG_USB_TTY 1 > +#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1 > +#define CONFIG_USBD_VENDORID 0x0451 > +#define CONFIG_USBD_PRODUCTID 0x5678 > +#define CONFIG_USBD_MANUFACTURER "Texas Instruments" > +#define CONFIG_USBD_PRODUCT_NAME "DM365VM" > +#endif /* CONFIG_MUSB_UDC */ > + > /* U-Boot command configuration */ > #include > > -- > 1.6.2.4 > > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2 v2] arm: suen3, suen3_v1, mgcoge2_arm_p1a support
Dear Heiko Schocher, In message <4b5febbb.9000...@denx.de> you wrote: > This patch adds support for the Keymile SUEN3 board variants which > are based on the Marvell Kirkwood (88F6281) SoC. All variants > uses common code stored in board/keymile/km_arm/km_arm.c > > mgcoge2_arm_p1a board: > This adds support for the ARM part of the mgcoge2. The suen3 > target was moved to the correct suen3 p1b version. There is a > difference between the GPIO configuration between suen3 and mgcoge2. ... > +#if defined(CONFIG_CMD_SF) > +int do_spi_toggle(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) > +{ > + u32 tmp; > + if (argc < 2) { > + cmd_usage(cmdtp); > + return 1; > + } > + > + if ((strcmp(argv[1], "on") != 0) && > + (strcmp(argv[1], "off") != 0)) { > + cmd_usage(cmdtp); > + return 1; > + } You can omit this code here... > + if ((strcmp(argv[1], "off") == 0)) { > + printf("SPI FLASH disabled, NAND enabled\n"); > + /* Multi-Purpose Pins Functionality configuration */ > + kwmpp_config[0] = MPP0_NF_IO2; > + kwmpp_config[1] = MPP1_NF_IO3; > + kwmpp_config[2] = MPP2_NF_IO4; > + kwmpp_config[3] = MPP3_NF_IO5; > + > + kirkwood_mpp_conf(kwmpp_config); > + tmp = readl(KW_GPIO0_BASE); > + writel(tmp | FLASH_GPIO_PIN , KW_GPIO0_BASE); > + > + nand_init(); > + } else { ... by replacing this with a } else if (strcmp(argv[1], "off") != 0) { > + printf("SPI FLASH enabled, NAND disabled\n"); > + /* Multi-Purpose Pins Functionality configuration */ > + kwmpp_config[0] = MPP0_SPI_SCn; > + kwmpp_config[1] = MPP1_SPI_MOSI; > + kwmpp_config[2] = MPP2_SPI_SCK; > + kwmpp_config[3] = MPP3_SPI_MISO; > + > + kirkwood_mpp_conf(kwmpp_config); > + tmp = readl(KW_GPIO0_BASE); > + writel(tmp & (~FLASH_GPIO_PIN) , KW_GPIO0_BASE); > + > + nand_init(); > + } and adding the "else" here. ... > +#if defined(CONFIG_BOOTCOUNT_LIMIT) > +void bootcount_store (ulong a) > +{ > + volatile ulong *save_addr; > + volatile ulong size = 0; > + int i; > + for (i=0; i + size += gd->bd->bi_dram[i].size; > + } > + save_addr = (ulong*)(size - BOOTCOUNT_ADDR); > + save_addr[0] = a; > + save_addr[1] = BOOTCOUNT_MAGIC; Please use proper I/O accessors instead of volatile pointers. > + > +ulong bootcount_load (void) > +{ > + volatile ulong *save_addr; > + volatile ulong size = 0; > + int i; > + for (i=0; i + size += gd->bd->bi_dram[i].size; > + } > + save_addr = (ulong*)(size - BOOTCOUNT_ADDR); > + if (save_addr[1] != BOOTCOUNT_MAGIC) > + return 0; > + else > + return save_addr[0]; > +} > +#endif Ditto. 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: w...@denx.de 'What shall we do?' said Twoflower. 'Panic?' said Rincewind hope- fully. He always held that panic was the best means of survival; back in the olden days, his theory went, people faced with hungry sabre- toothed tigers could be divided very simply in those who panicked and those who stood there saying 'What a magnificent brute!' or 'Here, pussy.' - Terry Pratchett, _The Light Fantastic_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2 v2] cramfs: make cramfs usable on non NOR flash
Dear Heiko Schocher, In message <4b5feb9e.3040...@denx.de> you wrote: > [PATCH 1/2] cramfs: make cramfs usable without a NOR flash I'm afraid I still don't understand how this is supposed to work. Where would you store the cramfs on a system "without a NOR flash"? Are we talking about - say - a NAND storage device then? > @@ -119,7 +121,11 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, > char *argv[]) > dev.id = &id; > part.dev = &dev; > /* fake the address offset */ > +#if !defined(CONFIG_SYS_NO_FLASH) > part.offset = addr - flash_info[id.num].start[0]; > +#else > + part.offset = addr; > +#endif I understand that we now can have the cramfs image either in NOR flash _or_ in NAND. What about systems that have both NOR _and_ NAND? 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: w...@denx.de The first 90% of a project takes 90% of the time, the last 10% takes the other 90% of the time. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request - mpc85xx
Dear Kumar Gala, In message you wrote: > [forgot the cpu disable patches in a branch] > > The following changes since commit 797312a15edc9dfb433e6903a75189030e7a: > Wolfgang Denk (1): > Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx > > are available in the git repository at: > > git://git.denx.de/u-boot-mpc85xx.git master > > Kumar Gala (3): > Add support to disable cpu's in multicore processors > 86xx: Add support for 'cpu disable' command > 85xx: Add support for 'cpu disable' command > > common/cmd_mp.c |3 +++ > cpu/mpc85xx/mp.c | 32 +++- > cpu/mpc86xx/mp.c | 42 > ++ > include/asm-ppc/immap_86xx.h | 33 ++--- > include/common.h |1 + > 5 files changed, 95 insertions(+), 16 deletions(-) Applied, thanks. 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: w...@denx.de There is is no reason for any individual to have a computer in their home. -- Ken Olsen (President of Digital Equipment Corporation), Convention of the World Future Society, in Boston, 1977 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] Patch status update
Dear Mike, In message <201001261857.59536.vap...@gentoo.org> you wrote: > > > > > 6974 01/21 Mike Frysinger [U-Boot] [PATCH 3/3] > > > > asm-arm/unaligned.h: switch to asm-generic/unaligned.h > > > > http://article.gmane.org/gmane.comp.boot-loaders.u-boot/74116 > > > > > > > > 6975 01/21 Mike Frysinger [U-Boot] [PATCH 2/3] > > > > asm-blackfin/unaligned.h: add for zlib code > > > > http://article.gmane.org/gmane.comp.boot-loaders.u-boot/74117 > > > > > > > > 6976 01/21 Mike Frysinger [U-Boot] [PATCH 1/3] > > > > asm-generic/unaligned.h: dynamic default unaligned accesses > > > > http://article.gmane.org/gmane.comp.boot-loaders.u-boot/74118 > > > > > > patch 1/3 and 2/3 need merging (fix build errors for all Blackfin > > > boards). patch 3/3 is up to Tom i guess ... doesnt matter much to me as= > i > > > dont do arm, but i thought i'd help him out with a general solution for > > > all rather than continuing the copy & paste duplication tradition. > >=20 > > I see. I guess I have your ACK for BF? > > if you want to pick it up directly instead of through my tree, that's fine.> > > all three have my s-o-b already. We need at least Tom's ACK for #3. 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: w...@denx.de A student of probability soon realizes that by its nature the billion-to-one chance crops up nine times out of ten, and that the greatest odds boil down to a double-sided statement: it will happen, or it will not. - Terry Pratchett, _The Dark Side of the Sun_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Fix compiler warning in imximage.c due to getline prototype
Dear Kumar Gala, In message <1264609016-21475-1-git-send-email-ga...@kernel.crashing.org> you wrote: > imximage.c: In function 'imximage_parse_cfg_file': > imximage.c:142: warning: implicit declaration of function 'getline' > > Signed-off-by: Kumar Gala > --- > * Moved _GNU_SOURCE define into imximage.c per Mike F. suggestion > > tools/imximage.c |3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) Applied, thanks. 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: w...@denx.de The universe contains any amount of horrible ways to be woken up, such as the noise of the mob breaking down the front door, the scream of fire engines, or the realization that today is the Monday which on Friday night was a comfortably long way off. - Terry Pratchett, _Moving Pictures_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] imx51 u-boot
Hi Stefano, Not sure if this will help, but here is my startup with #define DEBUG in drivers/net/fec_mxc.c http://www.efn.org/~rick/pub/minicom.cap Rick ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] bad block table stored in nand flash
On Wed, Jan 27, 2010 at 02:06:22PM +0100, Ing. Jozef Goril wrote: > Later, in function write_bbt, there is a code that converts RAM-based BBT to > flash-based one at lines 720-730. > For line > buf[offs + (i >> sft)] &= ~(msk[dat & 0x03] << sftcnt); > > I cannot understand the case, if (dat&0x03) == 10b (reserved block). > In that case, msk[2] value should be used. > The value of msk[2] is set few lines above (line 649): msk[2] = ~rcode; > The value of rcode is set at time of declaration: > rcode = td->reserved_block_code; > > Now, in case of reserved_block_code == 01b: > rcode = 0x02; > msk[2] = ~rcode = ~0x02 = FD; > > Regarding to line > buf[offs + (i >> sft)] &= ~(msk[dat & 0x03] << sftcnt); > > it should be shifted left by sftcnt bits (sftcnt can be [0,2,4,6]). > I.e. that the value in the parenthesis on the left side can be of > [FD,F4,D0,40]. After negation: [02,0B,2F,BF]. > These are values, that original byte in buffer can be ANDed with. Since there > are zeros on higher bits position (over mask 11b), this ANDing will destroy > the > block status information of some blocks using the same byte. 00b in flash > means > invalid block... > > Am I missing something important or is there a bug? This code came from Linux; I'd try asking on linux-...@lists.infradead.org. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] imx51 u-boot
> You must take a look at the reason. However, I see a recent commit for > this file that changed SYSCTL_CLOCK_MASK, as I did, too. Because I > changed (in the same way) this mask, the patch cannot directly applied. > However, you can easy fix it adding the defines I needed. > There are still comments about using IO accessors function, so I will > rebase it before sending again). Got it fixed, thanks, Built it and ran it but the FEC seems unhealthy: MX51EVK U-Boot > dhcp FEC_MXC: Autonegotiation timeout BOOTP broadcast 1 Maybe I can help you fix it? Any ideas? Rick ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] imx51 u-boot
Rick Bronson wrote: >> You cannot expect that patch works if you runs the previous ones with >> dry-run and the current patch modifies files already patched in the >> previous ones. > > Very true ;-) > > Number 10 still fails :( > > /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.10.patch | patch -p1 > patching file cpu/arm_cortexa8/mx51/Makefile > patching file cpu/arm_cortexa8/mx51/speed.c > patching file drivers/mmc/fsl_esdhc.c > patching file include/asm-arm/global_data.h > patching file include/fsl_esdhc.h > Hunk #1 FAILED at 32. > 1 out of 2 hunks FAILED -- saving rejects to file include/fsl_esdhc.h.rej You must take a look at the reason. However, I see a recent commit for this file that changed SYSCTL_CLOCK_MASK, as I did, too. Because I changed (in the same way) this mask, the patch cannot directly applied. However, you can easy fix it adding the defines I needed. There are still comments about using IO accessors function, so I will rebase it before sending again). Regards, Stefano Babic -- = 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: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] imx51 u-boot
> You cannot expect that patch works if you runs the previous ones with > dry-run and the current patch modifies files already patched in the > previous ones. Very true ;-) Number 10 still fails :( /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.10.patch | patch -p1 patching file cpu/arm_cortexa8/mx51/Makefile patching file cpu/arm_cortexa8/mx51/speed.c patching file drivers/mmc/fsl_esdhc.c patching file include/asm-arm/global_data.h patching file include/fsl_esdhc.h Hunk #1 FAILED at 32. 1 out of 2 hunks FAILED -- saving rejects to file include/fsl_esdhc.h.rej patching file lib_arm/board.c Rick ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] imx51 u-boot
Rick Bronson wrote: > Hi Stefano, > /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.1.patch | patch -p1 --dry-run ERROR > patching file Makefile > Reversed (or previously applied) patch detected! Assume -R? [n] ^C The first patch was already accepted and it is now part of the u-boot main tree. You do not need to apply it. > /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.10.patch | patch -p1 --dry-run ERROR You cannot expect that patch works if you runs the previous ones with dry-run and the current patch modifies files already patched in the previous ones. Regards, Stefano babic -- = 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: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] imx51 u-boot
Hi Stefano, With git clone git://git.denx.de/u-boot I get: /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.1.patch | patch -p1 --dry-run ERROR patching file Makefile Reversed (or previously applied) patch detected! Assume -R? [n] ^C /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.2.patch | patch -p1 --dry-run CLEAN /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.3.patch | patch -p1 --dry-run CLEAN /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.4.patch | patch -p1 --dry-run CLEAN /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.5.patch | patch -p1 --dry-run CLEAN /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.6.patch | patch -p1 --dry-run CLEAN /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.7.patch | patch -p1 --dry-run CLEAN /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.8.patch | patch -p1 --dry-run CLEAN /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.9.patch | patch -p1 --dry-run CLEAN /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.10.patch | patch -p1 --dry-run ERROR can't find file to patch at input line 5 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |diff --git a/cpu/arm_cortexa8/mx51/Makefile b/cpu/arm_cortexa8/mx51/Makefile |index 4d82293..7cfaa2c 100644 |--- a/cpu/arm_cortexa8/mx51/Makefile |+++ b/cpu/arm_cortexa8/mx51/Makefile -- /u-boot> cat ~/tlc/dqp1130/u-boot.imx51.11.patch | patch -p1 --dry-run ERROR patching file MAINTAINERS Hunk #1 FAILED at 151. 1 out of 1 hunk FAILED -- saving rejects to file MAINTAINERS.rej ... Then with git clone git://git.denx.de/u-boot-imx I get: /u-boot-imx> cat ~/tlc/dqp1130/u-boot.imx51.1.patch | patch -p1 --dry-run ERROR /u-boot-imx> cat ~/tlc/dqp1130/u-boot.imx51.2.patch | patch -p1 --dry-run CLEAN /u-boot-imx> cat ~/tlc/dqp1130/u-boot.imx51.3.patch | patch -p1 --dry-run CLEAN /u-boot-imx> cat ~/tlc/dqp1130/u-boot.imx51.4.patch | patch -p1 --dry-run CLEAN /u-boot-imx> cat ~/tlc/dqp1130/u-boot.imx51.5.patch | patch -p1 --dry-run CLEAN /u-boot-imx> cat ~/tlc/dqp1130/u-boot.imx51.6.patch | patch -p1 --dry-run CLEAN /u-boot-imx> cat ~/tlc/dqp1130/u-boot.imx51.7.patch | patch -p1 --dry-run FUZZ /u-boot-imx> cat ~/tlc/dqp1130/u-boot.imx51.8.patch | patch -p1 --dry-run CLEAN /u-boot-imx> cat ~/tlc/dqp1130/u-boot.imx51.9.patch | patch -p1 --dry-run CLEAN /u-boot-imx> cat ~/tlc/dqp1130/u-boot.imx51.10.patch | patch -p1 --dry-run ERROR /u-boot-imx> cat ~/tlc/dqp1130/u-boot.imx51.11.patch | patch -p1 --dry-run ERROR Rick ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] Patch status update
On Tue, Jan 26, 2010 at 11:52:23PM +0100, Wolfgang Denk wrote: > Dear Sandeep, > > In message <0554bef07d437848af01b9c9b5f0bc5d985ee...@dlee01.ent.ti.com> you > wrote: > > > > > Sandeep, could you please comment? > > > > I have pushed these updates. Thank you. > Thanks. Please send a pull request to Tom when you think you are > ready. FYI, there are more patches pending, I just didn't have time to look closely where a problem is. Will send them after more testing, probably later today. Also sorry for pushing on you both as I do not have too good experince with merging board patches - trying to fully sync since 2005... Best regards, ladis ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] OMAP3: Avoid re-write to PRM_CLKSRC_CTRL
> -Original Message- > From: Tom [mailto:tom@windriver.com] > Sent: Wednesday, January 27, 2010 7:15 PM > To: Premi, Sanjeev > Cc: u-boot@lists.denx.de > Subject: Re: [U-Boot] [PATCH] OMAP3: Avoid re-write to PRM_CLKSRC_CTRL > > Sanjeev Premi wrote: > > In function get_osc_clk_speed(), do not change/ update > > the divider for SYS_CLK as it can has cascading effect > > on the other derived clocks. > > > > Sudden change in divider value can lead to inconsistent > > behavior in the system - often leading to crashes. > > > > The problem was found when working with OMAP3EVM using > > DM3730 processor card. > > > > The patch has been tested with OMAP3530 on OMAP3EVM as > > well > > I believe the intent of this function is only to be > called once early in the clock setup when the > other clocks have not been setup to determine emperically > the master system clock. Can you provide were else it is being > called ? Tom, Yes, the intent of function is to determine the master clock. But, by the time this function is executed, the divider has a value. (Usually set by the x-loader for OMAP boards). Before we hit this code, the some clocks are already derived (either by default OR by x-loader). The function as it exists Today, does not follow any sequence to contain the effect of changing the divider. In case of 3730 (similar to 3630) we are possibly overshooting the tolerance zone. Using Lauterbach we can see that contents of each window starts to 'auto-refresh' as soon as the divider Changes - sometimes after restoring the divider. A clear indication of system becoming unstable. Of course, once in 4-5 times this issue was noticed in x-loader as well which has almost same code for the purpose. The intent of function is to determine the OSC frequency; which can be determined without having to change the divider... by multiplying by the same factor. Overall, the empirical formula is same; but this patch ensures that HW need not change for the calculations. Best regards, Sanjeev > > > > > Signed-off-by: Sanjeev Premi > > Signed-off-by: Hiremath Vaibhav > > --- > > cpu/arm_cortexa8/omap3/clock.c | 20 > > 1 files changed, 16 insertions(+), 4 deletions(-) > > > > diff --git a/cpu/arm_cortexa8/omap3/clock.c > b/cpu/arm_cortexa8/omap3/clock.c > > index 174c453..6330c9e 100644 > > --- a/cpu/arm_cortexa8/omap3/clock.c > > +++ b/cpu/arm_cortexa8/omap3/clock.c > > @@ -40,7 +40,7 @@ > > > ** > ***/ > > u32 get_osc_clk_speed(void) > > { > > - u32 start, cstart, cend, cdiff, val; > > + u32 start, cstart, cend, cdiff, cdiv, val; > > struct prcm *prcm_base = (struct prcm *)PRCM_BASE; > > struct prm *prm_base = (struct prm *)PRM_BASE; > > struct gptimer *gpt1_base = (struct gptimer *)OMAP34XX_GPT1; > > @@ -48,9 +48,15 @@ u32 get_osc_clk_speed(void) > > > > val = readl(&prm_base->clksrc_ctrl); > > > > - /* If SYS_CLK is being divided by 2, remove for now */ > > - val = (val & (~SYSCLKDIV_2)) | SYSCLKDIV_1; > > - writel(val, &prm_base->clksrc_ctrl); > > + if (val & SYSCLKDIV_2) > > + cdiv = 2; > > + else if (val & SYSCLKDIV_1) > > + cdiv = 1; > > + else > > + /* > > +* Should never reach here! (Assume divider as 1) > > +*/ > Could reduce this to a single line, > Good comment. > > > + cdiv = 1; > > > > /* enable timer2 */ > > val = readl(&prcm_base->clksel_wkup) | CLKSEL_GPT1; > > @@ -61,6 +67,7 @@ u32 get_osc_clk_speed(void) > > /* Enable I and F Clocks for GPT1 */ > > val = readl(&prcm_base->iclken_wkup) | EN_GPT1 | EN_32KSYNC; > > writel(val, &prcm_base->iclken_wkup); > > + > > Extra space. > Remove. > > > val = readl(&prcm_base->fclken_wkup) | EN_GPT1; > > writel(val, &prcm_base->fclken_wkup); > > > > @@ -83,6 +90,11 @@ u32 get_osc_clk_speed(void) > > cend = readl(&gpt1_base->tcrr); /* get end > sys_clk count */ > > cdiff = cend - cstart; /* get elapsed ticks */ > > > > + if (cdiv == 2) > > + { > > + cdiff *= 2; > > + } > > + > Braces not needed > > > /* based on number of ticks assign speed */ > > if (cdiff > 19000) > > return S38_4M; > > Tom > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] imx51 u-boot
Rick Bronson wrote: > Hi Stefano, > Hi Rick, > Okay, thanks. I'll give it a try. > > Are your patches the set of 9 that are on the ML? At the moment, I have sent the third patchset to the ML. There are 11 patches for imx51. Please give me some feedback. As Eric checks in the previous post, you have a really new board with TO3 processor and I could test my patches only on a TO2. Regards, Stefano Babic -- = 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: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] Fix compiler warning in imximage.c due to getline prototype
imximage.c: In function 'imximage_parse_cfg_file': imximage.c:142: warning: implicit declaration of function 'getline' Signed-off-by: Kumar Gala --- * Moved _GNU_SOURCE define into imximage.c per Mike F. suggestion tools/imximage.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/tools/imximage.c b/tools/imximage.c index c1fdafb..59923ff 100644 --- a/tools/imximage.c +++ b/tools/imximage.c @@ -25,6 +25,9 @@ * MA 02111-1307 USA */ +/* Required to obtain the getline prototype from stdio.h */ +#define _GNU_SOURCE + #include "mkimage.h" #include #include "imximage.h" -- 1.6.0.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 7/8] fec_mxc: add MX25 support
Terry, I don't see a mxc_fec driver in the u-boot repository, so I don't know what you are referring too. There is a fec_mxc driver which this patch modifies to add mx25: $ git ls-files | grep fec cpu/mpc8220/fec.c cpu/mpc8220/fec.h cpu/mpc8220/fec_dma_tasks.S cpu/mpc8xx/fec.c cpu/mpc8xx/fec.h drivers/net/fec_mxc.c drivers/net/fec_mxc.h drivers/net/fsl_mcdmafec.c drivers/net/mcffec.c drivers/net/mpc512x_fec.c drivers/net/mpc512x_fec.h drivers/net/mpc5xxx_fec.c drivers/net/mpc5xxx_fec.h include/asm-m68k/fec.h include/asm-m68k/fsl_mcdmafec.h Perhaps you are looking at a private Freescale repo? John 2010/1/27 Lv Terry-R65388 : > Hi John, > >Why don't you use mxc_fec? > >Actually, we use mxc_fec in mx25 u-boot. > >Thanks~~ > > Yours > Terry > > -Original Message- > From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de] On > Behalf Of John Rigby > Sent: 2010年1月26日 14:13 > To: u-boot@lists.denx.de > Cc: John Rigby; Ben Warren > Subject: [U-Boot] [PATCH V3 7/8] fec_mxc: add MX25 support > > Use RMII for MX25 > Add code to init gasket that enables RMII > > Signed-off-by: John Rigby > CC: Ben Warren > --- > drivers/net/fec_mxc.c | 31 ++- > drivers/net/fec_mxc.h | 32 ++-- > include/asm-arm/arch-mx25/clock.h |1 + > 3 files changed, 61 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index > b5619eb..f109485 100644 > --- a/drivers/net/fec_mxc.c > +++ b/drivers/net/fec_mxc.c > @@ -347,6 +347,34 @@ static int fec_open(struct eth_device *edev) > */ >writel(readl(&fec->eth->ecntrl) | FEC_ECNTRL_ETHER_EN, >&fec->eth->ecntrl); > +#ifdef CONFIG_MX25 > + udelay(100); > + /* > +* setup the MII gasket for RMII mode > +*/ > + > + /* disable the gasket */ > + writew(0, &fec->eth->miigsk_enr); > + > + /* wait for the gasket to be disabled */ > + while (readw(&fec->eth->miigsk_enr) & MIIGSK_ENR_READY) > + udelay(2); > + > + /* configure gasket for RMII, 50 MHz, no loopback, and no echo */ > + writew(MIIGSK_CFGR_IF_MODE_RMII, &fec->eth->miigsk_cfgr); > + > + /* re-enable the gasket */ > + writew(MIIGSK_ENR_EN, &fec->eth->miigsk_enr); > + > + /* wait until MII gasket is ready */ > + int max_loops = 10; > + while ((readw(&fec->eth->miigsk_enr) & MIIGSK_ENR_READY) == 0) { > + if (--max_loops <= 0) { > + printf("WAIT for MII Gasket ready timed out\n"); > + break; > + } > + } > +#endif > >miiphy_wait_aneg(edev); >miiphy_speed(edev->name, CONFIG_FEC_MXC_PHYADDR); @@ -498,7 +526,8 @@ > static void fec_halt(struct eth_device *dev) > * Disable the Ethernet Controller > * Note: this will also reset the BD index counter! > */ > - writel(readl(&fec->eth->ecntrl) & ~FEC_ECNTRL_ETHER_EN, > &fec->eth->ecntrl); > + writel(readl(&fec->eth->ecntrl) & ~FEC_ECNTRL_ETHER_EN, > + &fec->eth->ecntrl); >fec->rbd_index = 0; >fec->tbd_index = 0; >debug("eth_halt: done\n"); > diff --git a/drivers/net/fec_mxc.h b/drivers/net/fec_mxc.h index > 6cb1bfc..5d0d69d 100644 > --- a/drivers/net/fec_mxc.h > +++ b/drivers/net/fec_mxc.h > @@ -145,9 +145,17 @@ struct ethernet_regs { >uint32_t r_fdxfc; /* MBAR_ETH + 0x2DC */ >uint32_t ieee_r_octets_ok; /* MBAR_ETH + 0x2E0 */ > > - uint32_t res14[6]; /* MBAR_ETH + 0x2E4-2FC */ > - > + uint32_t res14[7]; /* MBAR_ETH + 0x2E4-2FC */ > + > +#ifdef CONFIG_MX25 > + uint16_t miigsk_cfgr; /* MBAR_ETH + 0x300 */ > + uint16_t res15[3]; /* MBAR_ETH + 0x302-306 */ > + uint16_t miigsk_enr;/* MBAR_ETH + 0x308 */ > + uint16_t res16[3]; /* MBAR_ETH + 0x30a-30e */ > + uint32_t res17[60]; /* MBAR_ETH + 0x300-3FF */ > +#else >uint32_t res15[64]; /* MBAR_ETH + 0x300-3FF */ > +#endif > }; > > #define FEC_IEVENT_HBERR 0x8000 > @@ -196,6 +204,26 @@ struct ethernet_regs { > #define FEC_ECNTRL_RESET 0x0001 /* reset the FEC */ > #define FEC_ECNTRL_ETHER_EN0x0002 /* enable the FEC */ > > +#ifdef CONFIG_MX25 > +/* defines for MIIGSK */ > +/* RMII frequency control: 0=50MHz, 1=5MHz */ > +#define MIIGSK_CFGR_FRCONT (1 << 6) > +/* loopback mode */ > +#define MIIGSK_CFGR_LBMODE (1 << 4) > +/* echo mode */ > +#define MIIGSK_CFGR_EMODE (1 << 3) > +/* MII gasket mode field */ > +#define MIIGSK_CFGR_IF_MODE_MASK (3 << 0) > +/* MMI/7-Wire mode */ > +#define MIIGSK_CFGR_IF_MODE_MII(0 << 0) > +/* RMII mode */ > +#define MIIGSK_CFGR_IF_MODE_RMII (1 <
Re: [U-Boot] [PATCH 2/2 v2] arm: suen3, suen3_v1, mgcoge2_arm_p1a support
Hello Tom, Tom wrote: > Heiko Schocher wrote: >> This patch adds support for the Keymile SUEN3 board variants which >> are based on the Marvell Kirkwood (88F6281) SoC. All variants >> uses common code stored in board/keymile/km_arm/km_arm.c >> >> mgcoge2_arm_p1a board: >> This adds support for the ARM part of the mgcoge2. The suen3 >> target was moved to the correct suen3 p1b version. There is a >> difference between the GPIO configuration between suen3 and mgcoge2. >> > It seems like these are 2 different board. > If they are, please split this patch. No, the mgcoge2_arm_p1a was just the first version of this Hardware, and the second and subsequent versions are renamed in suen3_x ... bye Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] imx51 u-boot
Hi Stefano, > You do not find at the moment mx51 support on the u-boot mainline. I > sent my patches to u-boot ML with the goal to integrate the processor in > u-boot and the patches are currently under review. If you want to give > theses patches a try, you have to apply them to the current u-boot tree. Okay, thanks. I'll give it a try. Are your patches the set of 9 that are on the ML? Rick ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2 v2] arm: suen3, suen3_v1, mgcoge2_arm_p1a support
Heiko Schocher wrote: > This patch adds support for the Keymile SUEN3 board variants which > are based on the Marvell Kirkwood (88F6281) SoC. All variants > uses common code stored in board/keymile/km_arm/km_arm.c > > mgcoge2_arm_p1a board: > This adds support for the ARM part of the mgcoge2. The suen3 > target was moved to the correct suen3 p1b version. There is a > difference between the GPIO configuration between suen3 and mgcoge2. > It seems like these are 2 different board. If they are, please split this patch. Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot-Users] some flow about uboot
>in config_cmd_default.h >#ifndef CONFIG_SYS_NO_FLASH >#define CONFIG_CMD_FLASH /* flinfo, erase, protect */ >#define CONFIG_CMD_IMLS/* List all found images*/ >#else > >so in cmd_bootm.c below funciton will not be compiled >#if defined(CONFIG_CMD_IMLS) Please come again after studying C language. >if I remember correctly, #ifdef XYZ and #if defined(XYZ) mean the same >thing, right? right. and, #ifndef XYZ and #if !defined(XYZ) mean the same thing. Hiroshi Ito Media Lab. Inc., URL http://www.mlb.co.jp ( Sorry, Japanese only. ) TEL +81-3-5294-7255 FAX +81-3-5294-7256 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] OMAP3: Avoid re-write to PRM_CLKSRC_CTRL
Sanjeev Premi wrote: > In function get_osc_clk_speed(), do not change/ update > the divider for SYS_CLK as it can has cascading effect > on the other derived clocks. > > Sudden change in divider value can lead to inconsistent > behavior in the system - often leading to crashes. > > The problem was found when working with OMAP3EVM using > DM3730 processor card. > > The patch has been tested with OMAP3530 on OMAP3EVM as > well I believe the intent of this function is only to be called once early in the clock setup when the other clocks have not been setup to determine emperically the master system clock. Can you provide were else it is being called ? > > Signed-off-by: Sanjeev Premi > Signed-off-by: Hiremath Vaibhav > --- > cpu/arm_cortexa8/omap3/clock.c | 20 > 1 files changed, 16 insertions(+), 4 deletions(-) > > diff --git a/cpu/arm_cortexa8/omap3/clock.c b/cpu/arm_cortexa8/omap3/clock.c > index 174c453..6330c9e 100644 > --- a/cpu/arm_cortexa8/omap3/clock.c > +++ b/cpu/arm_cortexa8/omap3/clock.c > @@ -40,7 +40,7 @@ > > */ > u32 get_osc_clk_speed(void) > { > - u32 start, cstart, cend, cdiff, val; > + u32 start, cstart, cend, cdiff, cdiv, val; > struct prcm *prcm_base = (struct prcm *)PRCM_BASE; > struct prm *prm_base = (struct prm *)PRM_BASE; > struct gptimer *gpt1_base = (struct gptimer *)OMAP34XX_GPT1; > @@ -48,9 +48,15 @@ u32 get_osc_clk_speed(void) > > val = readl(&prm_base->clksrc_ctrl); > > - /* If SYS_CLK is being divided by 2, remove for now */ > - val = (val & (~SYSCLKDIV_2)) | SYSCLKDIV_1; > - writel(val, &prm_base->clksrc_ctrl); > + if (val & SYSCLKDIV_2) > + cdiv = 2; > + else if (val & SYSCLKDIV_1) > + cdiv = 1; > + else > + /* > + * Should never reach here! (Assume divider as 1) > + */ Could reduce this to a single line, Good comment. > + cdiv = 1; > > /* enable timer2 */ > val = readl(&prcm_base->clksel_wkup) | CLKSEL_GPT1; > @@ -61,6 +67,7 @@ u32 get_osc_clk_speed(void) > /* Enable I and F Clocks for GPT1 */ > val = readl(&prcm_base->iclken_wkup) | EN_GPT1 | EN_32KSYNC; > writel(val, &prcm_base->iclken_wkup); > + Extra space. Remove. > val = readl(&prcm_base->fclken_wkup) | EN_GPT1; > writel(val, &prcm_base->fclken_wkup); > > @@ -83,6 +90,11 @@ u32 get_osc_clk_speed(void) > cend = readl(&gpt1_base->tcrr); /* get end sys_clk count */ > cdiff = cend - cstart; /* get elapsed ticks */ > > + if (cdiv == 2) > + { > + cdiff *= 2; > + } > + Braces not needed > /* based on number of ticks assign speed */ > if (cdiff > 19000) > return S38_4M; Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] bad block table stored in nand flash
...sorry for confusing... certainly, if reserved_block_code == 01b, then rcode = 0x01; msk[2] = ~rcode = ~0x01 = FE; and I'm speaking about right side in parenthesis: right side before negation: [FE,F8,E0,80] right side after negation: [01,07,1F,7F] But this doesn't change the fact that some blocks are irregularly set to invalid. Thanks and best regards Jozef Original Message Subject: [U-Boot] bad block table stored in nand flash From: Ing. Jozef Goril To: u-boot@lists.denx.de Date: 27. 1. 2010 14:06 > Hi. > > I'm new in U-Boot and need some help to understand how does BBT in nand flash > work. > I don't understand, how reserved blocks (those used for BBT storage) are > marked > in BBT in flash. The file in concern is drivers/mtd/nand_bbt.c, of actual > release version (2009.11.1). > > At file beginning, there is some note: > > * The table uses 2 bits per block > * 11b:block is good > * 00b:block is factory marked bad > * 01b, 10b: block is marked bad due to wear > * > * The memory bad block table uses the following scheme: > * 00b:block is good > * 01b:block is marked bad due to wear > * 10b:block is reserved (to protect the bbt area) > * 11b:block is factory marked bad > > Later, in function write_bbt, there is a code that converts RAM-based BBT to > flash-based one at lines 720-730. > For line > buf[offs + (i >> sft)] &= ~(msk[dat & 0x03] << sftcnt); > > I cannot understand the case, if (dat&0x03) == 10b (reserved block). > In that case, msk[2] value should be used. > The value of msk[2] is set few lines above (line 649): msk[2] = ~rcode; > The value of rcode is set at time of declaration: > rcode = td->reserved_block_code; > > Now, in case of reserved_block_code == 01b: > rcode = 0x02; > msk[2] = ~rcode = ~0x02 = FD; > > Regarding to line > buf[offs + (i >> sft)] &= ~(msk[dat & 0x03] << sftcnt); > > it should be shifted left by sftcnt bits (sftcnt can be [0,2,4,6]). > I.e. that the value in the parenthesis on the left side can be of > [FD,F4,D0,40]. After negation: [02,0B,2F,BF]. > These are values, that original byte in buffer can be ANDed with. Since there > are zeros on higher bits position (over mask 11b), this ANDing will destroy > the > block status information of some blocks using the same byte. 00b in flash > means > invalid block... > > Am I missing something important or is there a bug? > > I understand the reserved_block_code can be: > - zero : reserved blocks are not marked in flash-based BBT, the mechanism > rewrites rcode from 0x00 to 0xFF, later msk[2] = 0x00 and all works fine. > - non zero : reserved blocks are marked in flash-based BBT. But the only > avoilable value is 01b (00b stands for invalid block, 11b for good block and > 10b > will come from RAM-based 01b due to a procedure mentioned above). > > But I cannot find how does reserved_block_code of 01b work... > > Can you, please, make me clear? > > Thanks a lot. > Jozef Goril > > > > ___ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] What linux kernel binary do I use????
> I am really REALLY stuck - I don't know what kernel image to use with > bootm (and where to load it and quite a few other things but getting the > right image would be a good start) I think bootm wants uImage. i.e., the "u-boot image". There is no rule for "make uImage" for x86, but you can run "mkimage" by yourself. The image format (thus uImage) is just a 64 byte header in front of a binary file, with magic number, lenght, checksum and other information. Actually, common/cmd_bootm.c::bootm_start() calls boot_get_kernel, which uses img_addr to look for the format. genimg_get_format then is in common/image.c, where image_header_t is used as defined in include/image.h. I admin "uImage" doesn't appear in the functions, though. Then there is the new FIT format, but I think your want to start with the legacy format. Hope this helps /alessandro ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] bad block table stored in nand flash
Hi. I'm new in U-Boot and need some help to understand how does BBT in nand flash work. I don't understand, how reserved blocks (those used for BBT storage) are marked in BBT in flash. The file in concern is drivers/mtd/nand_bbt.c, of actual release version (2009.11.1). At file beginning, there is some note: * The table uses 2 bits per block * 11b: block is good * 00b: block is factory marked bad * 01b, 10b: block is marked bad due to wear * * The memory bad block table uses the following scheme: * 00b: block is good * 01b: block is marked bad due to wear * 10b: block is reserved (to protect the bbt area) * 11b: block is factory marked bad Later, in function write_bbt, there is a code that converts RAM-based BBT to flash-based one at lines 720-730. For line buf[offs + (i >> sft)] &= ~(msk[dat & 0x03] << sftcnt); I cannot understand the case, if (dat&0x03) == 10b (reserved block). In that case, msk[2] value should be used. The value of msk[2] is set few lines above (line 649): msk[2] = ~rcode; The value of rcode is set at time of declaration: rcode = td->reserved_block_code; Now, in case of reserved_block_code == 01b: rcode = 0x02; msk[2] = ~rcode = ~0x02 = FD; Regarding to line buf[offs + (i >> sft)] &= ~(msk[dat & 0x03] << sftcnt); it should be shifted left by sftcnt bits (sftcnt can be [0,2,4,6]). I.e. that the value in the parenthesis on the left side can be of [FD,F4,D0,40]. After negation: [02,0B,2F,BF]. These are values, that original byte in buffer can be ANDed with. Since there are zeros on higher bits position (over mask 11b), this ANDing will destroy the block status information of some blocks using the same byte. 00b in flash means invalid block... Am I missing something important or is there a bug? I understand the reserved_block_code can be: - zero : reserved blocks are not marked in flash-based BBT, the mechanism rewrites rcode from 0x00 to 0xFF, later msk[2] = 0x00 and all works fine. - non zero : reserved blocks are marked in flash-based BBT. But the only avoilable value is 01b (00b stands for invalid block, 11b for good block and 10b will come from RAM-based 01b due to a procedure mentioned above). But I cannot find how does reserved_block_code of 01b work... Can you, please, make me clear? Thanks a lot. Jozef Goril ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] How to get GPL free standalone programs with u-boot
Dear "Neugebauer, Manfred", In message <1b9c02db7c62fe44b8fac992aac75e8e16472...@defthw99e85msx.ww902.siemens.net> you wrote: > > I have a question concerning standalone programs based on u-boot and > GPL, since I'm not really sure whether the way how the u-boot source > files are set up allows GPL free standalone programs. This is the intention; if the current code or documentation should conflict with this intention, it should be fixed. > However, when looking at the GPL details, I'm not sure whether this > really works with the current u-boot sources (from a legal point of > view): > > (a) the source code of the hello_world example for a standalone > application has a GPL header. If you are legally strict, this can > mean every standalone application is a derived work from this example > and therefore restricted to GPL. I disagree. You should be able to write standalone aplications without ever looking at the hello_world.c file. > (b) When you want to write a standalone application you need - as a > minimum - to include "exports.h" (for the interface definitions), > which requires "common.h" as additional header file. Both files are > not included in the COPYING information which allows the use outside > of GPL. The header file "common.h" (and other header files, which are > included within common.h) even have a GPL header. "exports.h" should be added to the "allowed" file list; there should be no need to include "common.h". Eventually this needs fixing. Patches are welcome. > (c) you need to link your standalone application against stub.o (or > the corresponding library). I did not find any statement (e.g., > within stub.c), that this part is GPL-free (e.g., similar to LGPL). "examples/standalone/stubs.c" should be added to the "allowed" file list (the ppc_*jmp.S files are LGPLed). > So, from my point of view (although I'm not a lawyer), there are some > doubts about a GPL free standalone application based on the actual There should be no doubts - the intention is clear, the current state may need improvement. Help (read: patches) welcome. > u-boot sources. I believe there should be some enhancements to > clarify this subject: > > (1) GPL free standalone examples > (2) a really GPL free exports.h (similar to include/image.h) > (3) some explanations that the use of the source file > "examples/standalone/stub.c" is not GPL restricted. Agreed. > I know that this is a very strict view to this subject (but that is > the way legal people look at it). I'm interested in a feedback from > others who already were involved with this issue. There is two ways to deal with licenses: either ignore them completely, or be really strict about them. I think we all agree that we cannot ignore them, so we have little choice but trying to improve what we have. 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: w...@denx.de Build a system that even a fool can use and only a fool will want to use it. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] What linux kernel binary do I use????
Hi All, I am really REALLY stuck - I don't know what kernel image to use with bootm (and where to load it and quite a few other things but getting the right image would be a good start) Now I _do_ have the go command working (needed a bit of a source tweak). so I can: boot > setenv loadaddr 4 boot > loadb boot > Ctrl-\ c C-Kermit>send hello-world.bin C-Kermit>Ctrl-\ c boot > go 4 ## Starting application at 0x0004 ... Example expects ABI version 6 Actual U-Boot ABI version 6 Hello World argc = 1 argv[0] = "4" argv[1] = "" Hit any key to exit ... ## Application terminated, rc = 0x0 boot > So, I cloned the linux kernel git repository and built 2.6.33rc5, ran make xconfig, setup some options and compiled. I have tried: linux-2.6/arch/x86/boot/bzImage linux-2.6/arch/x86/boot/vmlinux.bin linux-2.6/arch/x86/boot/compressed/vmlinux I've tried to load these at 0x0, 0x1, 0x10 bootm always results in: Wrong Image Format for bootm command ERROR: can't get kernel image! go always results in a General Protection fault README-i386 details loading at 0x0 and running a straight bootm but this always gives me 'Wrong Image Format for bootm command' I just simply do not understand what I need to do and it is really frustrating that something so simple is so hard to do. Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] JFFS2 fsload and nand
Hello all. I found that fsload command (use it by defaine CONFIG_CMD_JFFS2) only working with nor flash. Is it really so? Is there another way to load kernel from JFFS2 NAND device? I am sorry if it is dump question, but I found only a little of information about it in google. Thank you. -- 73! Mike RA9FTM ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] problems with tftp
>> Jan 27 09:24:33 lab7 atftpd[5910]: Requested file to big, increase >> BLKSIZE > In this case it is a server parameter. I actually think in _this_ case it is a client one. By reading atftpd manual page it says blksize is supported by default, but it's the client that must specify it, or the default 512 applies. Current u-boot supports it through CONFIG_TFTP_BLOCKSIZE as well as IP fragments. I use 4k blocksize like this (include/configs/nhk8815.h): #define CONFIG_IP_DEFRAG/* Allows faster download, TFTP and NFS */ #define CONFIG_TFTP_BLOCKSIZE 4096 #define CONFIG_NFS_READ_SIZE4096 /alessandro ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] problems with tftp
Dear Massimiliano Cialdi, In message <1264582292.6870.15.ca...@lab7.powersoft.it> you wrote: > > I use U-Boot 1.1.4 that was preinstalled on OMAP3EVM board. PC side is a > linux box (ubuntu 9.04) where is installed atftpd 0.7 that runs with the > following command line (not using inetd): > > /usr/sbin/atftpd --daemon --tftpd-timeout 300 --retry-timeout 5 > --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 > --maxthread 100 --verbose=5 /opt/OMAP35x_SDK_0.9.7 ... > I tried with 2 files: rootfs.jffs2 (about 17MB) and myroot.jffs2 (about > 53MB) > > trying rootfs.jffs2 all works, it is correctly transfered. This is normal. TFTP uses a block size of 512 bytes by default, and a 16 bit counter for the packet numbers, and IIRC the respective RFC does not define a wrap-around of the packet numbers. Some TFTP servers even use a _signed_ 16 bit counter, which limits you to 32767 packets of 512 bytes = ~ 16 MB file size. Seems your server uses an unsigned counter, resulting in 65536 x 512 = ~ 32 MB maximum file size. > instead myroot.jffs2 doesn't work. atftd log report the following line: > Jan 27 09:24:33 lab7 atftpd[5910]: Serving bin/myroot.jffs2 to > 192.168.1.203:2082 > Jan 27 09:24:33 lab7 atftpd[5910]: Requested file to big, increase > BLKSIZE > > How can I increase BLKSIZE, and where? Is a client or server parameter? In this case it is a server parameter. Read the manual - some TFTP servers support a "--blocksize" option, but eventually you may have to rebuild the TFTP server from the sources with adapted configuration. Alternatively you can consider switching to NFS download, which usually is much faster, too. 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: w...@denx.de 2000 pounds of chinese soup = 1 Won Ton ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] (no subject)
Attn... This is to inform you that we the management of ROYAL LANCASTER HOTEL LONDON is currently running an employment forum (Recruiting experience and professional workers) for all Asians for this coming season .However we Kindly wish to inform you that your resume has being forwarded to us from India's No 1 Job Site. Hence all candidates wishing to apply for employment are entitling with all ease to apply via email. At the completion of the application all candidates are required to submit their resent genuine resumes attach with a current colored passport photograph. Be inform that all application submitted are subject to scrutiny therefore all application must be firm and genuine. We open Monday to Friday from 8:30 a.m. to 4:00 p.m GMT. Processing time of applications can take maximum of 3 weeks, depending on the position that you have applied for. Only those who are selected by the personnel department manager to receive an interview / job application form will be contacted, selected candidates will be interview on line through mail, or telephone. All applicants who are not contacted after submission of resume may re-apply after 2 weeks. All inquiries should be made directly to the employment center via the emails or telephone numbers listed below - no attempts should be made to contact a member of management or human resources or otherwise. At the confirmation of employment, ROYAL LANCASTER HOTEL will be responsible for the flight ticket of all the qualified candidates from the concern country to heatrow airport London. Accommodation and feeding , medical care as well, for the period of your contract will be given to all the qualified candidates. If you are Doctor,Nurse,Engineer,Cooking,Stewards, Technicians, Fashion, models, Actors, Dancers, Comedians, Entertainers. Artisans like, Mechanics, Cleaners, Washers, Security, Messengers,Carpentry,Sales etc. If you are interested you are free to apply to get further information on how to get start with the UK working visa procedure.For further information send us your resumes / CV with scan copy of your international passport and a copy of your passport photograph on how to get your entry documents to UK. Write to our pro officer for more guidelines on further processed: ROYAL LANCASTER HOTEL , Lancaster Terrace, W2 2TY London, Email:customercareunit2...@gmail.com Yours Sincerely, Micheal Grey ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] OMAP3: Avoid re-write to PRM_CLKSRC_CTRL
In function get_osc_clk_speed(), do not change/ update the divider for SYS_CLK as it can has cascading effect on the other derived clocks. Sudden change in divider value can lead to inconsistent behavior in the system - often leading to crashes. The problem was found when working with OMAP3EVM using DM3730 processor card. The patch has been tested with OMAP3530 on OMAP3EVM as well Signed-off-by: Sanjeev Premi Signed-off-by: Hiremath Vaibhav --- cpu/arm_cortexa8/omap3/clock.c | 20 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/cpu/arm_cortexa8/omap3/clock.c b/cpu/arm_cortexa8/omap3/clock.c index 174c453..6330c9e 100644 --- a/cpu/arm_cortexa8/omap3/clock.c +++ b/cpu/arm_cortexa8/omap3/clock.c @@ -40,7 +40,7 @@ */ u32 get_osc_clk_speed(void) { - u32 start, cstart, cend, cdiff, val; + u32 start, cstart, cend, cdiff, cdiv, val; struct prcm *prcm_base = (struct prcm *)PRCM_BASE; struct prm *prm_base = (struct prm *)PRM_BASE; struct gptimer *gpt1_base = (struct gptimer *)OMAP34XX_GPT1; @@ -48,9 +48,15 @@ u32 get_osc_clk_speed(void) val = readl(&prm_base->clksrc_ctrl); - /* If SYS_CLK is being divided by 2, remove for now */ - val = (val & (~SYSCLKDIV_2)) | SYSCLKDIV_1; - writel(val, &prm_base->clksrc_ctrl); + if (val & SYSCLKDIV_2) + cdiv = 2; + else if (val & SYSCLKDIV_1) + cdiv = 1; + else + /* +* Should never reach here! (Assume divider as 1) +*/ + cdiv = 1; /* enable timer2 */ val = readl(&prcm_base->clksel_wkup) | CLKSEL_GPT1; @@ -61,6 +67,7 @@ u32 get_osc_clk_speed(void) /* Enable I and F Clocks for GPT1 */ val = readl(&prcm_base->iclken_wkup) | EN_GPT1 | EN_32KSYNC; writel(val, &prcm_base->iclken_wkup); + val = readl(&prcm_base->fclken_wkup) | EN_GPT1; writel(val, &prcm_base->fclken_wkup); @@ -83,6 +90,11 @@ u32 get_osc_clk_speed(void) cend = readl(&gpt1_base->tcrr); /* get end sys_clk count */ cdiff = cend - cstart; /* get elapsed ticks */ + if (cdiv == 2) + { + cdiff *= 2; + } + /* based on number of ticks assign speed */ if (cdiff > 19000) return S38_4M; -- 1.6.2.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot-Users] some flow about uboot
Hi all: Hi Hiroshi : > Thanks Detlev, > > > I join a u-boot mailing-list for japanese. > I miss-understood original mail was send to it. > > loody, We shood move to u-boot@lists.denx.de > > anyway, >>Why uboot need reload code? > for example, > When you want update uboot itself. > SDRAM is faster then flush. > >>if I get a block of static memory to save r/w data, does that mean I >>don't need reload uboot? > Yes, but I do not recommend it, > check > CONFIG_SKIP_LOWLEVEL_INIT > you will get a hints. I will check the config you mention :) BTW, I have some question while I compile my uboot without flash support with CONFIG_SYS_NO_FLASH, even there is already a patch for this problem. in config_cmd_default.h #ifndef CONFIG_SYS_NO_FLASH #define CONFIG_CMD_FLASH/* flinfo, erase, protect */ #define CONFIG_CMD_IMLS /* List all found images*/ #else so in cmd_bootm.c below funciton will not be compiled #if defined(CONFIG_CMD_IMLS) but the error seems compiler still compile the code for us. it's weired. if I remember correctly, #ifdef XYZ and #if defined(XYZ) mean the same thing, right? so the error should not come out. appreciate your help, miloody ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] problems with tftp
I'm tring to get a 53MB file using tftp protocol. I use U-Boot 1.1.4 that was preinstalled on OMAP3EVM board. PC side is a linux box (ubuntu 9.04) where is installed atftpd 0.7 that runs with the following command line (not using inetd): /usr/sbin/atftpd --daemon --tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /opt/OMAP35x_SDK_0.9.7 where /opt/OMAP35x_SDK_0.9.7 is the directory where are placed all files (obviously all permission are correctly set) On U-Boot I run the following command: tftpboot 0x8160 bin/.jffs2 (network is correctly set) I tried with 2 files: rootfs.jffs2 (about 17MB) and myroot.jffs2 (about 53MB) trying rootfs.jffs2 all works, it is correctly transfered. instead myroot.jffs2 doesn't work. atftd log report the following line: Jan 27 09:24:33 lab7 atftpd[5910]: Serving bin/myroot.jffs2 to 192.168.1.203:2082 Jan 27 09:24:33 lab7 atftpd[5910]: Requested file to big, increase BLKSIZE How can I increase BLKSIZE, and where? Is a client or server parameter? thanks ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] imx51 u-boot
Rick Bronson wrote: > Not sure what patches these are or where to find them. Also not > sure what source to apply these patches to. Is it the latest on > denx.de or the ltib sources? Not sure what rev of the processor I > have, my bootup log is here http://www.efn.org/~rick/pub/imx51.log > although I don't see any T01, T02, etc printing. You do not find at the moment mx51 support on the u-boot mainline. I sent my patches to u-boot ML with the goal to integrate the processor in u-boot and the patches are currently under review. If you want to give theses patches a try, you have to apply them to the current u-boot tree. > > I gues it would be nice if there were some instructions for getting > up to date on the latest u-boot for the iMX51 eval board. I'd be > happy to help put together a set. Your starting point could be looking at http://www.denx.de/wiki/U-Boot/SourceCode. However, as I said, patches for the imx51 eval kit are not yet integrated. Best regards, Stefano Babic -- = 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: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 7/8] fec_mxc: add MX25 support
Hi John, Why don't you use mxc_fec? Actually, we use mxc_fec in mx25 u-boot. Thanks~~ Yours Terry -Original Message- From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de] On Behalf Of John Rigby Sent: 2010年1月26日 14:13 To: u-boot@lists.denx.de Cc: John Rigby; Ben Warren Subject: [U-Boot] [PATCH V3 7/8] fec_mxc: add MX25 support Use RMII for MX25 Add code to init gasket that enables RMII Signed-off-by: John Rigby CC: Ben Warren --- drivers/net/fec_mxc.c | 31 ++- drivers/net/fec_mxc.h | 32 ++-- include/asm-arm/arch-mx25/clock.h |1 + 3 files changed, 61 insertions(+), 3 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index b5619eb..f109485 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -347,6 +347,34 @@ static int fec_open(struct eth_device *edev) */ writel(readl(&fec->eth->ecntrl) | FEC_ECNTRL_ETHER_EN, &fec->eth->ecntrl); +#ifdef CONFIG_MX25 + udelay(100); + /* +* setup the MII gasket for RMII mode +*/ + + /* disable the gasket */ + writew(0, &fec->eth->miigsk_enr); + + /* wait for the gasket to be disabled */ + while (readw(&fec->eth->miigsk_enr) & MIIGSK_ENR_READY) + udelay(2); + + /* configure gasket for RMII, 50 MHz, no loopback, and no echo */ + writew(MIIGSK_CFGR_IF_MODE_RMII, &fec->eth->miigsk_cfgr); + + /* re-enable the gasket */ + writew(MIIGSK_ENR_EN, &fec->eth->miigsk_enr); + + /* wait until MII gasket is ready */ + int max_loops = 10; + while ((readw(&fec->eth->miigsk_enr) & MIIGSK_ENR_READY) == 0) { + if (--max_loops <= 0) { + printf("WAIT for MII Gasket ready timed out\n"); + break; + } + } +#endif miiphy_wait_aneg(edev); miiphy_speed(edev->name, CONFIG_FEC_MXC_PHYADDR); @@ -498,7 +526,8 @@ static void fec_halt(struct eth_device *dev) * Disable the Ethernet Controller * Note: this will also reset the BD index counter! */ - writel(readl(&fec->eth->ecntrl) & ~FEC_ECNTRL_ETHER_EN, &fec->eth->ecntrl); + writel(readl(&fec->eth->ecntrl) & ~FEC_ECNTRL_ETHER_EN, + &fec->eth->ecntrl); fec->rbd_index = 0; fec->tbd_index = 0; debug("eth_halt: done\n"); diff --git a/drivers/net/fec_mxc.h b/drivers/net/fec_mxc.h index 6cb1bfc..5d0d69d 100644 --- a/drivers/net/fec_mxc.h +++ b/drivers/net/fec_mxc.h @@ -145,9 +145,17 @@ struct ethernet_regs { uint32_t r_fdxfc; /* MBAR_ETH + 0x2DC */ uint32_t ieee_r_octets_ok; /* MBAR_ETH + 0x2E0 */ - uint32_t res14[6]; /* MBAR_ETH + 0x2E4-2FC */ - + uint32_t res14[7]; /* MBAR_ETH + 0x2E4-2FC */ + +#ifdef CONFIG_MX25 + uint16_t miigsk_cfgr; /* MBAR_ETH + 0x300 */ + uint16_t res15[3]; /* MBAR_ETH + 0x302-306 */ + uint16_t miigsk_enr;/* MBAR_ETH + 0x308 */ + uint16_t res16[3]; /* MBAR_ETH + 0x30a-30e */ + uint32_t res17[60]; /* MBAR_ETH + 0x300-3FF */ +#else uint32_t res15[64]; /* MBAR_ETH + 0x300-3FF */ +#endif }; #define FEC_IEVENT_HBERR 0x8000 @@ -196,6 +204,26 @@ struct ethernet_regs { #define FEC_ECNTRL_RESET 0x0001 /* reset the FEC */ #define FEC_ECNTRL_ETHER_EN0x0002 /* enable the FEC */ +#ifdef CONFIG_MX25 +/* defines for MIIGSK */ +/* RMII frequency control: 0=50MHz, 1=5MHz */ +#define MIIGSK_CFGR_FRCONT (1 << 6) +/* loopback mode */ +#define MIIGSK_CFGR_LBMODE (1 << 4) +/* echo mode */ +#define MIIGSK_CFGR_EMODE (1 << 3) +/* MII gasket mode field */ +#define MIIGSK_CFGR_IF_MODE_MASK (3 << 0) +/* MMI/7-Wire mode */ +#define MIIGSK_CFGR_IF_MODE_MII(0 << 0) +/* RMII mode */ +#define MIIGSK_CFGR_IF_MODE_RMII (1 << 0) +/* reflects MIIGSK Enable bit (RO) */ +#define MIIGSK_ENR_READY (1 << 2) +/* enable MIGSK (set by default) */ +#define MIIGSK_ENR_EN (1 << 1) +#endif + /** * @brief Descriptor buffer alignment * diff --git a/include/asm-arm/arch-mx25/clock.h b/include/asm-arm/arch-mx25/clock.h index b0752e7..c59f588 100644 --- a/include/asm-arm/arch-mx25/clock.h +++ b/include/asm-arm/arch-mx25/clock.h @@ -30,6 +30,7 @@ ulong imx_get_perclk(int clk); ulong imx_get_ahbclk(void); #define imx_get_uartclk() imx_get_perclk(15) +#define imx_get_fecclk() (imx_get_ahbclk()/2) #endif /* __ASM_ARCH_CLOCK_H */ -- 1.6.4.2.236.gf324c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-B
Re: [U-Boot] [PATCH 1/5] tsec: Clean up Broadcom PHY status parsing
Hi Peter, Peter Tyser wrote: > - Remove unnecessary printing "Enet starting in /" > This same information is already printed during normal ethernet > operation in the form "Speed: 1000, full duplex". > > - Add a check for link before determining link speed and duplex > If there is no link, speed/duplex don't matter. This also removes > the annoying and unneeded "Auto-neg error, defaulting to 10BT/HD" > message that occurs when no link is detected. > > - Whitespace and line > 80 characters cleanup > > Signed-off-by: Peter Tyser > --- Patches 1-5 applied to net repo. thanks, Ben ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tsec: Force TBI PHY to 1000Mbps full duplex in SGMII mode
Hi Peter, Peter Tyser wrote: > In SGMII mode the link between a processor's internal TBI PHY and an > external PHY should always be 1000Mbps, full duplex. Also, the SGMII > interface between an internal TBI PHY and external PHY does not > support in-band auto-negotation. > > Previously, when configured for SGMII mode a TBI PHY would attempt to > restart auto-negotation during initializtion. This auto-negotation > between a TBI PHY and external PHY would fail and result in unusable > ethernet operation. > > Forcing the TBI PHY and and external PHY to link at 1000Mbps full duplex > in SGMII mode resolves this issue of auto-negotation failing. > > Note that 10Mbps and 100Mbps operation is still possible on the external > side of the external PHY even when SGMII is operating at 1000Mbps. > The SGMII interface still operates at 1000Mbps, but each byte of data > is repeated 100 or 10 times for 10/100Mbps and the external PHY handles > converting this data stream into proper 10/100Mbps signalling. > > Signed-off-by: Peter Tyser > --- Applied to net repo. thanks, Ben ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot