[U-Boot] [STATUS] v2010.09-rc2 is out / "next" branch available
Dear Wolfgang, > check if all your relevant patches have been included. I rebased against the "master" and resubmitted the POST Cleanup patch (http://lists.denx.de/pipermail/u-boot/2010-September/077467.html) as was promised in http://lists.denx.de/pipermail/u-boot/2010-August/075227.html. Should I resubmit it into the "next" branch or it can go into the current release? Best regards, Michael Zaidman ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] RFC: get_ticks() + get_tbclk()
Dear Mike Frysinger, > might want to check out the thread i started over a year ago: > [u-boot] core ticks/timer code > it delves into these internals and may help you here > -mike Thanks for the hint, and sorry to have started the topic again ;) However it seems no resolution has come up since then. For me it seems useful to keep both functions and have ticks increment at a hardware-convenient rate. If the hardware timer can be prescaled to increment at 1000 Hz that is fine, but I see no immediate need for that. If the hardware cannot be prescaled, and software would need to do a 64 bit multiply/divide on each timer read, that would really be overkill. timer_reset() prevents you to have nested timeouts (if that ever comes up) Reinhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] usb: fix usb start problem with SMSC USB hub and Toshiba USB stick
Dear devz...@web.de, In message <899533205.349626.128509052.javamail.fm...@mwmweb063> you wrote: > pardon, that was not my intention, nor was it my intention to infringe list > rules. so, this is for developers/experts - not for users and bug-reporte > rs? This list is for ALL discussions about U-Boot: users, bug-reporters, developers, etc. But we expect that everybody who posts here follows some basic Netiquette. You don't. For example, Netiquette says to keep your line length below some 70 characters or so. You don't even after being told. I asked you explicitly NOT to top post / full quote, and pointed you to rules for correct quoting. You ignore that. > i`m spending more than half of this evening with this issue, trying to find > a solution and trying to provide information for a problem affecting manyr > people and which seems to exist in u-boot. I also pointed you to a document that explains how to ask smart questions, but it seems you ignored this hint as well. You completely fail to explain which exact version of U-Boot you are running - it seems to be a locally modified one, probably with out-of-tree patches to support that Dockstar board which is not known in the mainline U-Boot repository. How should we be able to comment on code we don't even know? 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 "Have you lived in this village all your life?""No, not yet." ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Config: Add "board options" column to boards.cfg
Dear Marek Vasut, please fix the mail addresses. My address is w...@denx.de In message <1285025204-8463-1-git-send-email-marek.va...@gmail.com> you wrote: > There are some boards where it's not currently possible to detect all board > information at runtime, therefore I introduced a new column called "options" > to > boards.cfg . > > This column can contain multiple options, separated by comma [,] . This column > is case sensitive. In case there's a simple options like 256M_U_BOOT, it's > plain > expanded to "#define CONFIG_256M_U_BOOT" in config.h . In case there's an > assignment, like "ram=8192", it's expanded to "#define CONFIG_RAM 8192" in > config.h . There can also be multiple such options, then each is expanded to > separate "#define CONFIG_xyz" statement. I don't understand what you mean by "is case sensitive" when in the end you seem to convert everything to upper case? I would not make any statement about case sensistivity and copy the settings unchanged. It is up to the user to provide valid (upper case) macro names, and it leaves the option to deviate and use locer case identifiers in case this should ever be needed for some special purpose. Also, it makes the code simpler. And, as Mike pointed out, please reuse the "-y" option. 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 It is easier to write an incorrect program than understand a correct one. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] NET: add ENC28J60 driver using SPI framework
Dear Mike Frysinger, > On Tuesday, September 21, 2010 01:21:46 Reinhard Meyer wrote: > well, now i cant reproduce the issue, cold or warm booting :/. > ... > although, earlier i was testing when the sun was out and shining on the board > but now it's night, so maybe it's a cold-blooded part :x. Reminds me of the good old times with UV-Eraseable EPROMs, where a lab setup intermittently and mysteriously failed until I noticed it was the sun shining into the EPROM's windows. That did not erase them, just disturbed the reading. Reinhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] RFC: get_ticks() + get_tbclk()
might want to check out the thread i started over a year ago: [u-boot] core ticks/timer code it delves into these internals and may help you here -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] NET: add ENC28J60 driver using SPI framework
On Tuesday, September 21, 2010 01:21:46 Reinhard Meyer wrote: > > On Monday, September 20, 2010 17:44:38 Mike Frysinger wrote: > >> finally got around to testing this. seems like the init needs some > >> work. if i power on the system (cold boot), boot Linux over the on-chip > >> mac, and let Linux program the enc part, it works fine under Linux. > >> then i do a software reset back into u-boot, it can use the enc fine > >> too. > >> > >> but if i cold boot u-boot and try to use the enc part, i get: > >>timeout waiting for CLKRDY > >> > >> enabling DEBUG doesnt show any additional output though. > > > > comparing the linux and u-boot drivers leads me to this fix: > > > > --- a/drivers/net/enc28j60.c > > +++ b/drivers/net/enc28j60.c > > @@ -632,6 +632,8 @@ static int enc_clock_wait(enc_dev_t *enc) > > > > { > > > > uint64_t etime; > > > > + enc_bclr(enc, CTL_REG_ECON2, ENC_ECON2_PWRSV); > > + > > > > /* one second timeout */ > > > > etime = get_ticks() + get_tbclk(); > > The Bit PWRSV is cleared (according to data sheet) on every Reset. > If that patch really helps in your case either the data sheet is wrong > (for your mask of the chip) OR there is another reason while the timeout > occurs in your case (I never had this timeout). > > I don't mind explicitly clearing this bit, but I suspect that this just > covers another problem. > > Could you read and print ECON2 in your case and see if PWRSV is really set? well, now i cant reproduce the issue, cold or warm booting :/. so i guess ignore this change until i can reproduce things and get a register dump. although, earlier i was testing when the sun was out and shining on the board but now it's night, so maybe it's a cold-blooded part :x. i looked at the linux driver again and i think i misread it. it isnt clearing ECON2 at reset, just when leaving low power mode. it clears ECON1 after doing a soft reset. > Or, does the timeout really come to be 1 second - does get_tbclk() > really return the timer increments per second? On many architectures > get_tblck() simply returns CONFIG_SYS_HZ and not the number of timer > increments per second (which can be a different and much higher value). the Blackfin timer is just fine thanks :P. it was pausing about 1 second between display of "enc0.18" and "CLKRDY timeout". it wasnt an instantaneous display of the two lines. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] RFC: get_ticks() + get_tbclk()
Hello, it is my understanding that get_ticks() shall return the count of a free running (hardware) counter that increments by a total of get_tbclk() every second. Both functions are long long. I also understand that this counter does not necessarily increment at a rate of CONFIG_SYS_HZ, but at a hardware determined, usually much higher rate. Is that understanding correct so far? Looking at the current implementations of those functions, it seems that in some cases those two functions do not work in coherence. Most get_tbclk() implementations plainly return CONFIG_SYS_HZ without assuring that the timer is programmed to run at that rate. Some do not work with long long values so there might be a small window where 0x wraps back to 0x and a programmed timeout will fail. Reinhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] NET: add ENC28J60 driver using SPI framework
Dear Mike Frysinger, > On Monday, September 20, 2010 17:44:38 Mike Frysinger wrote: >> finally got around to testing this. seems like the init needs some work. >> if i power on the system (cold boot), boot Linux over the on-chip mac, and >> let Linux program the enc part, it works fine under Linux. then i do a >> software reset back into u-boot, it can use the enc fine too. >> >> but if i cold boot u-boot and try to use the enc part, i get: >> timeout waiting for CLKRDY >> enabling DEBUG doesnt show any additional output though. > > comparing the linux and u-boot drivers leads me to this fix: > > --- a/drivers/net/enc28j60.c > +++ b/drivers/net/enc28j60.c > @@ -632,6 +632,8 @@ static int enc_clock_wait(enc_dev_t *enc) > { > uint64_t etime; > > + enc_bclr(enc, CTL_REG_ECON2, ENC_ECON2_PWRSV); > + > /* one second timeout */ > etime = get_ticks() + get_tbclk(); The Bit PWRSV is cleared (according to data sheet) on every Reset. If that patch really helps in your case either the data sheet is wrong (for your mask of the chip) OR there is another reason while the timeout occurs in your case (I never had this timeout). I don't mind explicitly clearing this bit, but I suspect that this just covers another problem. Could you read and print ECON2 in your case and see if PWRSV is really set? Or, does the timeout really come to be 1 second - does get_tbclk() really return the timer increments per second? On many architectures get_tblck() simply returns CONFIG_SYS_HZ and not the number of timer increments per second (which can be a different and much higher value). Best Regards Reinhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] cuImage and multi image?
> -Original Message- > From: Shawn Jin [mailto:shawnx...@gmail.com] > Sent: Tuesday, September 21, 2010 1:53 AM > To: Chen, Tiejun > Cc: ppcdev; uboot > Subject: Re: cuImage and multi image? > > >> I have a cuImage kernel in order to support legacy u-boot and a > >> ramdisk image. Kernel boots fine if these two images are > separate and > >> "bootm $kernel $ramdisk" is used. But I can not make it to > work using > >> a single multi image that contains the kernel and ramdisk > images. Is > >> it even technically possible to boot a multi-image with cuboot > >> wrapper? > > > > Try the following steps: > > -- > > 1. cp arch/powerpc/boot/ramdisk.image.gz > > 2. make cuImage.initrd. > > > > You can get one Image, cuImage.initrd., > including kernel and ramdisk. > > A follow up question. With this method, the total image size > (uncompressed) is limited to the 4MB (the link address of the > boot wrapper)? No. Cheers Tiejun > > Thanks, > -Shawn. > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH][v3] mpc8308_p1m: support for MPC8308 P1M board
On Mon, 20 Sep 2010 18:42:27 +0200 Wolfgang Denk wrote: > In message <20100920111852.0cc76...@udp111988uds.am.freescale.net> you wrote: > > > > ifndef TEXT_BASE > > > > TEXT_BASE = 0xFC00 > > > > endif > > > > > > Why? > > > > It might have been already set to something else by nand_spl or > > similar. > > No. There is no NAND on that board. it's consistent with other board ports, and there may be a derivative board port with NAND, or some other boot source. btw, subsequent versions of this patch have the ifndef added... Kim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] NET: add ENC28J60 driver using SPI framework
On Monday, September 20, 2010 17:44:38 Mike Frysinger wrote: > finally got around to testing this. seems like the init needs some work. > if i power on the system (cold boot), boot Linux over the on-chip mac, and > let Linux program the enc part, it works fine under Linux. then i do a > software reset back into u-boot, it can use the enc fine too. > > but if i cold boot u-boot and try to use the enc part, i get: > timeout waiting for CLKRDY > enabling DEBUG doesnt show any additional output though. comparing the linux and u-boot drivers leads me to this fix: --- a/drivers/net/enc28j60.c +++ b/drivers/net/enc28j60.c @@ -632,6 +632,8 @@ static int enc_clock_wait(enc_dev_t *enc) { uint64_t etime; + enc_bclr(enc, CTL_REG_ECON2, ENC_ECON2_PWRSV); + /* one second timeout */ etime = get_ticks() + get_tbclk(); i dont know if Ben wants to squash this change in his next tree, or do a patch on top of it ... -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Config: Add "board options" column to boards.cfg
On Monday, September 20, 2010 19:26:44 Marek Vasut wrote: > There are some boards where it's not currently possible to detect all board > information at runtime, therefore I introduced a new column called > "options" to boards.cfg . > > This column can contain multiple options, separated by comma [,] . This > column is case sensitive. In case there's a simple options like > 256M_U_BOOT, it's plain expanded to "#define CONFIG_256M_U_BOOT" in > config.h . In case there's an assignment, like "ram=8192", it's expanded > to "#define CONFIG_RAM 8192" in config.h . There can also be multiple such > options, then each is expanded to separate "#define CONFIG_xyz" statement. > > Also, I had to add fallback logic, because each of the board variants has a > distinct name. This led to the mkconfig #including incorrect board > configuration file ( aka. the > value in column one). I implemented a logic which checks if such file > exists and if it does not, it includes aka. the > value in third column. why not use the existing -t option instead of introducing your own new "options" argument t mkconfig ? -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Config: Add "board options" column to boards.cfg
There are some boards where it's not currently possible to detect all board information at runtime, therefore I introduced a new column called "options" to boards.cfg . This column can contain multiple options, separated by comma [,] . This column is case sensitive. In case there's a simple options like 256M_U_BOOT, it's plain expanded to "#define CONFIG_256M_U_BOOT" in config.h . In case there's an assignment, like "ram=8192", it's expanded to "#define CONFIG_RAM 8192" in config.h . There can also be multiple such options, then each is expanded to separate "#define CONFIG_xyz" statement. Also, I had to add fallback logic, because each of the board variants has a distinct name. This led to the mkconfig #including incorrect board configuration file ( aka. the value in column one). I implemented a logic which checks if such file exists and if it does not, it includes aka. the value in third column. Signed-off-by: Marek Vasut --- v2: Add multiple options support Makefile | 22 -- boards.cfg |9 +++-- mkconfig | 20 +++- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 4dc68a5..1e5374e 100644 --- a/Makefile +++ b/Makefile @@ -2179,28 +2179,6 @@ scpu_config: unconfig fi @$(MKCONFIG) -n $@ -a pdnb3 arm ixp pdnb3 prodrive -polaris_config \ -trizepsiv_config : unconfig - @mkdir -p $(obj)include - @if [ "$(findstring polaris,$@)" ] ; then \ - echo "#define CONFIG_POLARIS 1" >>$(obj)include/config.h ; \ - fi; - @$(MKCONFIG) -n $@ -a trizepsiv arm pxa trizepsiv - -vpac270_nor_256M_config \ -vpac270_nor_128M_config \ -vpac270_onenand_config : unconfig - @mkdir -p $(obj)include - @if [ "$(findstring onenand,$@)" ] ; then \ - echo "#define CONFIG_ONENAND_U_BOOT" \ - >>$(obj)include/config.h ; \ - fi; - @if [ "$(findstring 256M,$@)" ] ; then \ - echo "#define CONFIG_256M_U_BOOT" \ - >>$(obj)include/config.h ; \ - fi; - @$(MKCONFIG) -n $@ -a vpac270 arm pxa vpac270 - # ## ARM1136 Systems # diff --git a/boards.cfg b/boards.cfg index 7ee733c..6c47448 100644 --- a/boards.cfg +++ b/boards.cfg @@ -17,8 +17,8 @@ # # :.,$! sort -f -k2,2 -k3,3 -k6,6 -k5,5 -k1,1 # -# Target ARCHCPU Board name Vendor SoC -### +# Target ARCHCPU Board name Vendor SoC Options +### qong arm arm1136 - davedenxmx31 mx31adsarm arm1136 - freescale mx31 @@ -64,6 +64,11 @@ lubbock arm pxa palmld arm pxa palmtc arm pxa pleb2 arm pxa +polarisarm pxa trizepsiv - - POLARIS +trizepsiv arm pxa trizepsiv +vpac270_nor_128M arm pxa vpac270 +vpac270_nor_256M arm pxa vpac270 - - 256M_U_BOOT +vpac270_onenandarm pxa vpac270 - - ONENAND_U_BOOT xaeniaxarm pxa xm250 arm pxa zipitz2arm pxa diff --git a/mkconfig b/mkconfig index b661071..f877b83 100755 --- a/mkconfig +++ b/mkconfig @@ -17,6 +17,7 @@ cpu="" board="" vendor="" soc="" +options="" if [ \( $# -eq 2 \) -a \( "$1" = "-A" \) ] ; then # Automatic mode @@ -41,7 +42,7 @@ while [ $# -gt 0 ] ; do done [ $# -lt 4 ] && exit 1 -[ $# -gt 6 ] && exit 1 +[ $# -gt 7 ] && exit 1 CONFIG_NAME="${1%_config}" @@ -56,6 +57,7 @@ else fi [ $# -gt 4 ] && [ "$5" != "-" ] && vendor="$5" [ $# -gt 5 ] && [ "$6" != "-" ] && soc="$6" +[ $# -gt 6 ] && [ "$7" != "-" ] && options="$7" if [ "${ARCH}" -a "${ARCH}" != "${arch}" ]; then echo "Failed: \$ARCH=${ARCH}, should be '${arch}' for ${BOARD_NAME}" 1>&2 @@ -129,6 +131,22 @@ for i in ${TARGETS} ; do echo "#define CONFIG_MK_${i} 1" >>config.h ; done +if [ -n "${options}" ] ; then + echo "${options}" | tr "," "\n" | while read line ; do + echo "#define CONFIG_${line}" | tr "=" "\t" >>config.h ; + done ; +fi + +# If there's no config file for the configuration, try config file for the +# board instead. +if [ ! -e configs/${CONFIG_NAME}.h ] ; then + if [ -e configs/${board}.h ] ; then + CONFIG_NAME=${board} ; + else + exit 1 ; + fi; +fi + cat << EOF >> config.h #define CONFIG_BOARDDIR board/$
Re: [U-Boot] [PATCH] usb: fix usb start problem with SMSC USB hub and Toshiba USB stick
pardon, that was not my intention, nor was it my intention to infringe list rules. so, this is for developers/experts - not for users and bug-reporters? i`m spending more than half of this evening with this issue, trying to find a solution and trying to provide information for a problem affecting many people and which seems to exist in u-boot. so please forgive if i jumped onto the wrong thread as an entry point and i helter-skelter blundered into this list. will go whine elsewhere then and use obscure workarounds for this issue instead ( like that guy on this thread: http://openplug.org/plugforum/index.php?topic=131.0 ) regards roland Ursprüngliche Nachricht- Von: "Wolfgang Denk" Gesendet: 20.09.2010 23:19:15 An: "Roland Kletzing" Betreff: Re: [U-Boot] [PATCH] usb: fix usb start problem with SMSC USB hub and Toshiba USB stick >Dear "Roland Kletzing", > >In message <9714edec3798462facb91473a9628...@samsungnetbook> you wrote: >> >> i`m searching for a solution for a while, so i`m trying my luck here. I`m >> using Seagate Dockstar (ARM926EJ-S based) NAS device and installed Debian >> ARM on that as documented at http://jeff.doozan.com/debian/ > >You hijack a (pretty much unrelated) mail thread. > >You top-post. > >You full-quote. > >And it seems you did not read neither >http://www.netmeister.org/news/learn2quote.html nor >http://www.catb.org/~esr/faqs/smart-questions.html > > > >I think your problem is completely unrelated to the Subject: you refer >to. > >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 >I can't understand it. I can't even understand the people who can >understand it.- Queen Juliana of the Netherlands. ___ Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief! Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Blackfin: bfin_spi: use same gpio cs define as Linux
Linux uses an offset of 8 to switch from hardware cs to a gpio cs, so have u-boot use the same value. Also make sure it is public for boards to access. Signed-off-by: Mike Frysinger --- arch/blackfin/include/asm/config-pre.h |3 +++ drivers/spi/bfin_spi.c |2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/blackfin/include/asm/config-pre.h b/arch/blackfin/include/asm/config-pre.h index 4531519..4ce67d4 100644 --- a/arch/blackfin/include/asm/config-pre.h +++ b/arch/blackfin/include/asm/config-pre.h @@ -71,6 +71,9 @@ static inline const char *get_bfin_boot_mode(int bfin_boot) # define BFIN_BOOT_SPI_SSEL 1 #endif +/* Define to get a GPIO CS with the Blackfin SPI controller */ +#define MAX_CTRL_CS 8 + /* There is no Blackfin/NetBSD port */ #undef CONFIG_BOOTM_NETBSD diff --git a/drivers/spi/bfin_spi.c b/drivers/spi/bfin_spi.c index e0ad029..556b97a 100644 --- a/drivers/spi/bfin_spi.c +++ b/drivers/spi/bfin_spi.c @@ -35,8 +35,6 @@ MAKE_SPI_FUNC(SPI_BAUD, 0x14) #define to_bfin_spi_slave(s) container_of(s, struct bfin_spi_slave, slave) -#define MAX_CTRL_CS 7 - #define gpio_cs(cs) ((cs) - MAX_CTRL_CS) #ifdef CONFIG_BFIN_SPI_GPIO_CS # define is_gpio_cs(cs) ((cs) > MAX_CTRL_CS) -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] NET: add ENC28J60 driver using SPI framework
finally got around to testing this. seems like the init needs some work. if i power on the system (cold boot), boot Linux over the on-chip mac, and let Linux program the enc part, it works fine under Linux. then i do a software reset back into u-boot, it can use the enc fine too. but if i cold boot u-boot and try to use the enc part, i get: timeout waiting for CLKRDY enabling DEBUG doesnt show any additional output though. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-usb
Hi Remy, Remy Bohmer wrote: > The following changes since commit ff377b1c0e891569b6da13629090aad7c38175e0: >Wolfgang Denk (1): > canmb board: Fix compiler warnings > > are available in the git repository at: > >git://git.denx.de/u-boot-usb.git next > Just FYI There 2 bugfixes I would like to send soon (within 2 days). They fix some memory leaks and endpoint queue list corruption. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] usb: fix usb start problem with SMSC USB hub and Toshiba USB stick
Dear "Roland Kletzing", In message <9714edec3798462facb91473a9628...@samsungnetbook> you wrote: > > i`m searching for a solution for a while, so i`m trying my luck here. I`m > using Seagate Dockstar (ARM926EJ-S based) NAS device and installed Debian > ARM on that as documented at http://jeff.doozan.com/debian/ You hijack a (pretty much unrelated) mail thread. You top-post. You full-quote. And it seems you did not read neither http://www.netmeister.org/news/learn2quote.html nor http://www.catb.org/~esr/faqs/smart-questions.html I think your problem is completely unrelated to the Subject: you refer to. 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 I can't understand it. I can't even understand the people who can understand it.- Queen Juliana of the Netherlands. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] usb: fix usb start problem with SMSC USB hub and Toshiba USB stick
Hello, i`m searching for a solution for a while, so i`m trying my luck here. I`m using Seagate Dockstar (ARM926EJ-S based) NAS device and installed Debian ARM on that as documented at http://jeff.doozan.com/debian/ While it`s running fine with a sandisk flash usb stick and a sd-card in a usb cardreader, i`m not able to get the thingie boot with 2 different real 2.5" ide disks attached to two different kinds of ide2usb converter cables. The pogoplug linux (which runs on dockstar by default) detects the disks very fine and debian installation from there runs fine too, but booting from that always fails like this: U-Boot 2010.06-00695-gbd23130-dirty (Aug 30 2010 - 23:04:56) Marvell-Dockstar/Pogoplug by Jeff Doozan Hit any key to stop autoboot: 0 (Re)start USB... USB: Register 10011 NbrPorts 1 USB EHCI 1.00 scanning bus for devices... 3 USB Device(s) found scanning bus for storage devices... 1 Storage Device(s) found ** Bad partition 1 ** ** Bad partition 1 ** Wrong Image Format for bootm command ERROR: can't get kernel image! stopping USB.. I found a LOT of references on the net where people report similar problems for sheevaplug, pogoplug, dockstar - even with flash based media and just came across this posting on u-boot list. looks related to me!? i assume there is something which needs be fixed in u-boot and this is not storage-device specific but must be specific to the usb chipset or platform. the problem is that i don`t know how to unbrick dockstar yet, but i`d like to let you know that a lot of people will be happy if this gets fixed. i will read deeper into how to build uboot and safely replace it on my device, if there is anything more i can do to provide input or do testing please let me know. i think i can dig out tons of reports of similar issues. as my "i replace my homeserver with a dockstar"-projects depends on this, maybe i can even donate a dockstar for the person willing or be able to fix this issue. from another post: >Is this problem only valid for the EHCI code? I can imagine that the >other host controllers (like UHCI and OHCI and so on) code suffer the >same problem and need similar fixes... >(At least I know that I have here a couple of USB sticks that show >similar problems with OHCI ;-) ) If this helps - this is some info from a successful linux boot on that dockstar platform. usb runs perfectly when in linux, but it seems that there are problems only in u-boot. [1.18] ehci_marvell ehci_marvell.70059: Marvell Orion EHCI [1.19] ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1 [1.23] ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100 [1.25] ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004 [1.25] usb usb1: configuration #1 chosen from 1 choice [1.26] hub 1-0:1.0: USB hub found [1.26] hub 1-0:1.0: 1 port detected [1.38] ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver [1.38] USB Universal Host Controller Interface driver v3.0 [1.66] usb 1-1: new high speed USB device using ehci_marvell and address 2 [1.81] usb 1-1: configuration #1 chosen from 1 choice [1.81] hub 1-1:1.0: USB hub found [1.82] hub 1-1:1.0: 4 ports detected [2.17] usb 1-1.3: new high speed USB device using ehci_marvell and address 3 [2.27] usb 1-1.3: configuration #1 chosen from 1 choice regards roland ps: i found the following line in common/usb_storage.c - so maybe we cannot expect the usb code to work with real disks at all !? /* * New Note: * Support for USB Mass Storage Devices (BBB) has been added. It has * only been tested with USB memory sticks. */ quote: [U-Boot] [PATCH] usb: fix usb start problem with SMSC USB hub and Toshiba USB stick Anatolij Gustschin agust at denx.de Tue Aug 31 20:45:14 CEST 2010 Previous message: [U-Boot] [PATCH] zlib: Add further watchdog reset calls Next message: [U-Boot] [PATCH] [v2] mpc8610: refactor DIU initialization code to use existing bitmap and logo features Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Checking the status field of the qTD token in the current code do not take into acount cases where endpoint stall (halted) bit is set together with some other status bits. As a result clearing stall on an endpoint won't be done if other status bits were set. E.g. 'usb start' often fails with Toshiba USB stick 0x930/0x6545 connected to the SMSC USB 2.0 hub 0x424/0x2514. Debugging the issue showed that while bulk IN transfers with length of 13 or 18 the status field of the qTD token sometimes indicates trans- action error (XactErr) and sometimes additionally endpoint halted state. In the latter case resetting the USB device in error recovery code fails as no clear stall request on the endpoint will be done. The patch fixes status field checking code to properly handle endpoint halted state. However t
[U-Boot] Pull request: u-boot-usb
The following changes since commit ff377b1c0e891569b6da13629090aad7c38175e0: Wolfgang Denk (1): canmb board: Fix compiler warnings are available in the git repository at: git://git.denx.de/u-boot-usb.git next Mike Frysinger (1): usb: musb: stub out MUSB_TXCSR_MODE for Blackfin parts Remy Bohmer (1): Integrate USB gadget layer and USB CDC driver layer Stefano Babic (2): USB-CDC: correct wrong alignment in ether.c USB-CDC: called handle_interrupts inside usb_eth_send Vitaly Kuzmichev (9): USB-CDC: Restuct USB gadget Makefile USB-CDC: Add lost 'qmult' definition USB-CDC: Use native debug printout macros USB-CDC: Correct freeing usb requests USB-CDC: Replace 'strcpy' by 'strlcpy' USB-CDC: Correct stat_req initialization USB-CDC: ethernet error path potential oops fix USB-CDC: change simple_strtol to simple_strtoul USB-CDC: Fix coding style issues drivers/usb/gadget/Makefile |6 + drivers/usb/gadget/config.c | 119 +++ drivers/usb/gadget/epautoconf.c | 305 ++ drivers/usb/gadget/ether.c| 1976 + drivers/usb/gadget/gadget_chips.h | 220 drivers/usb/gadget/usbstring.c| 140 +++ drivers/usb/musb/musb_core.h |2 + include/linux/usb/cdc.h | 224 + include/linux/usb/ch9.h | 587 +++ include/linux/usb/gadget.h| 857 include/net.h | 17 +- 11 files changed, 4451 insertions(+), 2 deletions(-) create mode 100644 drivers/usb/gadget/config.c create mode 100644 drivers/usb/gadget/epautoconf.c create mode 100644 drivers/usb/gadget/ether.c create mode 100644 drivers/usb/gadget/gadget_chips.h create mode 100644 drivers/usb/gadget/usbstring.c create mode 100644 include/linux/usb/cdc.h create mode 100644 include/linux/usb/ch9.h create mode 100644 include/linux/usb/gadget.h ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] u-boot USB status
Dear Remy Bohmer, In message you wrote: > > There is sam9 device support in the u-boot-usb branch but first the > CDC branch need to be pushed to mainline during the next merge window Feel free to start pushing - the "next" branch is waiting :-) 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 If a packet hits a pocket on a socket on a port, And the bus is interrupted as a very last resort, And the address of the memory makes your floppy disk abort, Then the socket packet pocket has an error to report! - Ken Burchill? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] usb: musb: stub out MUSB_TXCSR_MODE for Blackfin parts
Hi, 2010/8/11 Mike Frysinger : > The MUSB_TXCSR_MODE register setting isn't supported on Blackfin musb > parts, so stub it out to 0. This matches Linux behavior. > > Signed-off-by: Mike Frysinger > --- > drivers/usb/musb/musb_core.h | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > Applied to u-boot-usb. Thanks. Remy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] USB-CDC: Fix coding style issues
Hi, 2010/9/13 Vitaly Kuzmichev : > Hello Remy, > > vkuzmic...@mvista.com wrote: > [...] >> - /* use PKTSIZE (or aligned... from u-boot) and set >> + /* >> + * use PKTSIZE (or aligned... from u-boot) and set >> * wMaxSegmentSize accordingly*/ > > Could you please fix the last line before commit? I missed this and > would not like to spam more patches to the list. Fixed and applied to u-boot-usb (cdc) Thanks. Remy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] u-boot USB status
Hi Marcel, 2010/9/17 Marcel : > Hi Damien, > > Thanks for the info. I will check it out. > > I'm also not sure if the SAM9 USB device support is available. > I actually did some work a while ago to make USB work for the SAM9 but had to > leave it in non-working condition at the time. If SAM9 USB is not supported > yet, I guess I best fix my code and contribute it. Sam9 host controller support is already in the mainline for years. (sam9 uses the OHCI host) There is sam9 device support in the u-boot-usb branch but first the CDC branch need to be pushed to mainline during the next merge window (I hope). Kind regards, Remy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] v2010.09-rc2 is out / "next" branch available
On Sunday, September 19, 2010 14:02:29 Wolfgang Denk wrote: > Please help testing Blackfin looks sane > check if all your relevant patches have been included. could you merge this change: 29.07.2010 [PATCH v2] cmd_mmc: use common usage function -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] setlocalversion: add some more fallbacks for git describe
If working out of a custom git tree that lacks annotated tags, the 'git describe' operation spews "fatal: cannot describe" errors all over the place. So add some fallback code in case the best naming was unable to locate something useful. Signed-off-by: Mike Frysinger --- tools/setlocalversion |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/tools/setlocalversion b/tools/setlocalversion index b3f5f28..e11f54f 100755 --- a/tools/setlocalversion +++ b/tools/setlocalversion @@ -13,7 +13,8 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then # Do we have an untagged version? if git name-rev --tags HEAD | \ grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then - git describe | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' + (git describe || git describe --tags || git describe --all --long) \ + 2>/dev/null | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' fi # Are there uncommitted changes? -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Blackfin: update some missed board config.mk files
Seems these two files were missed during the big lib shuffle. Signed-off-by: Mike Frysinger --- board/bf527-ad7160-eval/config.mk |4 ++-- board/ip04/config.mk |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/board/bf527-ad7160-eval/config.mk b/board/bf527-ad7160-eval/config.mk index f85bef5..3f9d41f 100644 --- a/board/bf527-ad7160-eval/config.mk +++ b/board/bf527-ad7160-eval/config.mk @@ -26,8 +26,8 @@ # This is not actually used for Blackfin boards so do not change it #TEXT_BASE = do-not-use-me -CFLAGS_lib_generic += -O2 -CFLAGS_lzma += -O2 +CFLAGS_lib += -O2 +CFLAGS_lib/lzma += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE)) diff --git a/board/ip04/config.mk b/board/ip04/config.mk index bc14257..5766829 100644 --- a/board/ip04/config.mk +++ b/board/ip04/config.mk @@ -26,8 +26,8 @@ # This is not actually used for Blackfin boards so do not change it #TEXT_BASE = do-not-use-me -CFLAGS_lib_generic += -O2 -CFLAGS_lzma += -O2 +CFLAGS_lib += -O2 +CFLAGS_lib/lzma += -O2 # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] Config: Add "board variant" column to boards.cfg
Dear Marek Vasut, In message <1284947846-12811-2-git-send-email-marek.va...@gmail.com> you wrote: > There are some boards where it's not currently possible to detect all board > information at runtime, therefore I introduced a new column called "variant" > to > boards.cfg . If this field is set, CONFIG_fieldvalue is #define-d in config.h Thanks for the start on this, but I would like to see a little more genral approach here. Passing a single option is IMO not enough. I posted a pretty complete specification of the format I have in mind before: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/81138/focus=81332 Do you think you could adapt your implementation to more in line with that? 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 After a heated argument on some trivial matter Nancy [Astor] . . . shouted, ``If I were your wife I would put poison in your coffee!'' Whereupon Winston Churchill with equal heat and sincerity answered, ``And if I were your husband I would drink it.'' ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] cuImage and multi image?
>> I have a cuImage kernel in order to support legacy u-boot and a >> ramdisk image. Kernel boots fine if these two images are separate and >> "bootm $kernel $ramdisk" is used. But I can not make it to work using >> a single multi image that contains the kernel and ramdisk images. Is >> it even technically possible to boot a multi-image with cuboot >> wrapper? > > Try the following steps: > -- > 1. cp arch/powerpc/boot/ramdisk.image.gz > 2. make cuImage.initrd. > > You can get one Image, cuImage.initrd., including kernel and > ramdisk. A follow up question. With this method, the total image size (uncompressed) is limited to the 4MB (the link address of the boot wrapper)? Thanks, -Shawn. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH][v3] mpc8308_p1m: support for MPC8308 P1M board
Dear Scott Wood, In message <20100920111852.0cc76...@udp111988uds.am.freescale.net> you wrote: > > > ifndef TEXT_BASE > > > TEXT_BASE = 0xFC00 > > > endif > > > > Why? > > It might have been already set to something else by nand_spl or > similar. No. There is no NAND on that board. > > > no assignments in if statements. > > > > Why? > > It could just as easily, and more readably, be written as: > > rv = cpu_eth_init(bis); > if (rv >= 0) > ... It depends whether you call that more readable. The UNIX code where I learned C was full of that, and I find it actually easier to read. > FWIW, Linux's checkpatch.pl looks for this and calls it an error, and > U-Boot says it follows Linux coding style. OK, that's an argument. 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 value of marriage is not that adults produce children, but that children produce adults."- Peter De Vries ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH][v3] mpc8308_p1m: support for MPC8308 P1M board
On Sat, 18 Sep 2010 22:35:54 +0200 Wolfgang Denk wrote: > > > +++ b/board/mpc8308_p1m/config.mk > > > @@ -0,0 +1 @@ > > > +TEXT_BASE = 0xFC00 > > > > ifndef TEXT_BASE > > TEXT_BASE = 0xFC00 > > endif > > Why? It might have been already set to something else by nand_spl or similar. > > > +int board_eth_init(bd_t *bis) > > > +{ > > > + int rv, num_if = 0; > > > + > > > + /* Initialize TSECs first */ > > > + if ((rv = cpu_eth_init(bis)) >= 0) > > > > no assignments in if statements. > > Why? It could just as easily, and more readably, be written as: rv = cpu_eth_init(bis); if (rv >= 0) ... FWIW, Linux's checkpatch.pl looks for this and calls it an error, and U-Boot says it follows Linux coding style. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] DU405 build-breakage in "next"
Hi Matthias, DU405 currently don't compile any more because of the size increase in "next". Could you please take a look and send a fix for it? Thanks. Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2] Adds driver for Xilinx' xps_spi SPI controller.
Hi Wolfgang, On 18/09/10 01:02 PM, Wolfgang Denk wrote: > Dear Graeme Smecher, > > In message<1280955847-2999-1-git-send-email-graeme.smec...@mail.mcgill.ca> > you wrote: > >> This code differs in only trivial ways from the altera_spi driver. It plays >> nice with Thomas Chou's mmc_spi driver, as well as with SPI flash. >> > Hm... if the core really differs in only trivial ways from the > altera_spi driver, then why do we need a duplication of that code? > > Can we plase have a single driver source that supports both instead? > Hm... It's possible to combine xilinx_spi.c and altera_spi.c. However, I suspect joining them will make maintenance more complicated rather than simpler. I can't, for example, test a combined driver on Altera hardware (and the Altera maintainer will likely have the same problem with Xilinx hardware.) My guess is that most SPI interfaces are nearly identical at a register level, especially for drivers that don't support interrupts and other complications. (See mxc_spi.c for another example.) Xilinx and Altera's SPI interfaces are just two examples that happen to both be FPGA-based -- I could probably have adapted any of the other SPI drivers instead. Are you sure combining drivers is the most logical approach? Let me know, and I'll have a crack at it. thanks, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] ppc4xx/fdt/flash: Change fdt_fixup_nor_flash_node() to not rely on cs size
This patch changes the behaviour of the fdt_fixup_nor_flash_node() function. Now it doesn't patch the size of the "reg" property with the chip-select size, but with the size returned from the new function flash_get_bank_size(). This function will return per weak default the flash size of the bank (bank = chip-select numer) detected by the flash driver. If this does not fit your needs, this function may be overridden by a board specific one. For this the parameters needed to be changed. So I intentionally squashed the PPC4xx stuff using this routine into this patch. Otherwise it would not be git-bisectable anymore. The board specific function for the AMCC/APM Ebony eval board is now included in this patch version. Signed-off-by: Stefan Roese Cc: Gerald Van Baren Cc: Wolfgang Denk ppc4xx: Add board specific function to return the detected flash size This function will be called to fixup size of the "reg" property of the NOR flash device tree nodes. Ebony can't use the weak default, since it has a special chip-select to bank-number binding. Signed-off-by: Stefan Roese --- v2: - Ebony's board specific function squashed into this patch arch/powerpc/cpu/ppc4xx/fdt.c | 10 board/amcc/ebony/flash.c | 31 + common/fdt_support.c | 51 + include/fdt_support.h |2 +- 4 files changed, 78 insertions(+), 16 deletions(-) diff --git a/arch/powerpc/cpu/ppc4xx/fdt.c b/arch/powerpc/cpu/ppc4xx/fdt.c index 15a184b..e99b2b0 100644 --- a/arch/powerpc/cpu/ppc4xx/fdt.c +++ b/arch/powerpc/cpu/ppc4xx/fdt.c @@ -59,14 +59,14 @@ void __ft_board_setup(void *blob, bd_t *bd) *p++ = 0; *p++ = bxcr & EBC_BXCR_BAS_MASK; *p++ = EBC_BXCR_BANK_SIZE(bxcr); + } + } + #ifdef CONFIG_FDT_FIXUP_NOR_FLASH_SIZE - /* Try to update reg property in nor flash node too */ - fdt_fixup_nor_flash_size(blob, i, -EBC_BXCR_BANK_SIZE(bxcr)); + /* Update reg property in all nor flash nodes too */ + fdt_fixup_nor_flash_size(blob); #endif - } - } /* Some 405 PPC's have EBC as direct PLB child in the dts */ if (fdt_path_offset(blob, ebc_path) < 0) diff --git a/board/amcc/ebony/flash.c b/board/amcc/ebony/flash.c index 8fe3ba1..79d2c4c 100644 --- a/board/amcc/ebony/flash.c +++ b/board/amcc/ebony/flash.c @@ -34,6 +34,7 @@ #include #include #include +#include #undef DEBUG #ifdef DEBUG @@ -71,6 +72,36 @@ static unsigned long flash_addr_table[8][CONFIG_SYS_MAX_FLASH_BANKS] = { */ static ulong flash_get_size(vu_long * addr, flash_info_t * info); +/* + * Override the weak default mapping function with a board specific one + */ +u32 flash_get_bank_size(int cs, int idx) +{ + u8 reg = in_8((void *)CONFIG_SYS_FPGA_BASE); + + if ((reg & BOOT_SMALL_FLASH) && !(reg & FLASH_ONBD_N)) { + /* +* cs0: small flash (512KiB) +* cs2: 2 * big flash (2 * 2MiB) +*/ + if (cs == 0) + return flash_info[2].size; + if (cs == 2) + return flash_info[0].size + flash_info[1].size; + } else { + /* +* cs0: 2 * big flash (2 * 2MiB) +* cs2: small flash (512KiB) +*/ + if (cs == 0) + return flash_info[0].size + flash_info[1].size; + if (cs == 2) + return flash_info[2].size; + } + + return 0; +} + unsigned long flash_init(void) { unsigned long total_b = 0; diff --git a/common/fdt_support.c b/common/fdt_support.c index aef4fe2..75a2267 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -38,6 +38,8 @@ */ DECLARE_GLOBAL_DATA_PTR; +extern flash_info_t flash_info[]; + /** * fdt_getprop_u32_default - Find a node and return it's property or a default * @@ -591,11 +593,28 @@ int fdt_pci_dma_ranges(void *blob, int phb_off, struct pci_controller *hose) { #ifdef CONFIG_FDT_FIXUP_NOR_FLASH_SIZE /* + * Provide a weak default function to return the flash bank size. + * There might be multiple non-identical flash chips connected to one + * chip-select, so we need to pass an index as well. + */ +u32 __flash_get_bank_size(int cs, int idx) +{ + /* +* As default, a simple 1:1 mapping is provided. Boards with +* a different mapping need to supply a board specific mapping +* routine. +*/ + return flash_info[cs].size; +} +u32 flash_get_bank_size(int cs, int idx) + __attribute__((weak, alias("__flash_get_bank_size"))); + +/* * This function can be used to update the size in the "reg" property - * of the NOR FLASH device nodes. This is necessary for boards with + * of all NOR FLASH device
[U-Boot] Please pull u-boot-cfi-flash/next (rebased against new next)
The following changes since commit ff377b1c0e891569b6da13629090aad7c38175e0: canmb board: Fix compiler warnings (2010-09-19 19:29:57 +0200) are available in the git repository at: git://www.denx.de/git/u-boot-cfi-flash.git next Stefan Roese (4): cfi_flash: Simplify flash_get_info() cfi_flash: Add weak default for cfi_flash_bank_addr() cfi_flash: Simplify dynamic flash bank number detection cfi_flash: Remove uneccessary #ifdef CONFIG_SYS_MAX_FLASH_BANKS_DETECT board/esd/apc405/apc405.c |6 ++ board/tqc/tqm834x/tqm834x.c | 12 +--- common/cmd_bootm.c |1 + common/cmd_flash.c | 10 ++ common/flash.c |1 + drivers/mtd/cfi_flash.c | 32 +++- drivers/mtd/cfi_mtd.c | 10 +- include/configs/APC405.h|6 -- include/configs/IDS8247.h |3 +-- include/configs/TQM834x.h |4 include/flash.h |2 ++ include/mtd/cfi_flash.h | 18 ++ 12 files changed, 48 insertions(+), 57 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2 V3] mmc: add boundary check for mmc operation
> -Original Message- > From: Lei Wen [mailto:adrian.w...@gmail.com] > Sent: Monday, September 20, 2010 6:29 PM > To: Ghorai, Sukumar > Cc: Wolfgang Denk; Lei Wen; u-boot@lists.denx.de; sshtyl...@mvista.com > Subject: Re: [U-Boot] [PATCH 1/2 V3] mmc: add boundary check for mmc > operation > > Hi Ghorai, > > > > > [Ghorai] I was using the latest mmc/sd core for OMAP 4 and getting the > following error. > > OMAP4430 SDP # mmc rescan 1 > > MMC: block number 0x1 exceeds max(0x0)OMAP4430 SDP # > > > > Please let me know what I am missing. [Ghorai] Thanks. I found the problem. It's a eMMC size calculation is wrong and here is the fix I am sending as a patch too in my next email. From: Sukumar Ghorai Date: Mon, 20 Sep 2010 18:29:29 +0530 Subject: [PATCH 1/3] fix for eMMC capacity calculation capacity of the eMMC device available in ext-CSD register only Signed-off-by: Sukumar Ghorai --- drivers/mmc/mmc.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 80cd9bf..c543d83 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -627,6 +627,7 @@ int mmc_startup(struct mmc *mmc) uint mult, freq; u64 cmult, csize; struct mmc_cmd cmd; + char ext_csd[512]; /* Put the Card in Identify Mode */ cmd.cmdidx = MMC_CMD_ALL_SEND_CID; @@ -742,6 +743,16 @@ int mmc_startup(struct mmc *mmc) if (err) return err; + if (!IS_SD(mmc) && (mmc->version >= MMC_VERSION_4)) { + /* check ext_csd version and capacity */ + err = mmc_send_ext_csd(mmc, ext_csd); + if (!err & (ext_csd[192] >= 2)) { + mmc->capacity = ext_csd[212] << 0 | ext_csd[213] << 8 | + ext_csd[214] << 16 | ext_csd[215] << 24; + mmc->capacity *= 512; + } + } + if (IS_SD(mmc)) err = sd_change_freq(mmc); else -- 1.7.0.4 > > > > I also test the latest code, and don't find the issue you report... > What would happen when you type "mmcinfo 1"? Seems your mmc card is > not init properly. > > Best regards, > Lei ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2 V3] mmc: add boundary check for mmc operation
Hi Ghorai, > > [Ghorai] I was using the latest mmc/sd core for OMAP 4 and getting the > following error. > OMAP4430 SDP # mmc rescan 1 > MMC: block number 0x1 exceeds max(0x0)OMAP4430 SDP # > > Please let me know what I am missing. > I also test the latest code, and don't find the issue you report... What would happen when you type "mmcinfo 1"? Seems your mmc card is not init properly. Best regards, Lei ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] Kirkwood: print_cpuinfo fixed for valid devid revid
From: Prafulla Wadaskar <[prafu...@marvell.com]> Earlier Device Identification register was used to detect the type for SoC, considering 88F6282 support to be added, It is not possible to detect the same using current algorithm. With this patch, device ID is being read using PCIE devid register, also valid chip revision ID will also be read and displayed Signed-off-by: Prafulla Wadaskar --- Change log: v2: Updated as per review comments for V1 debug replaced by printf, sprintf removed (??) kept as it is since we dont know future references for revid arch/arm/cpu/arm926ejs/kirkwood/cpu.c| 34 - arch/arm/include/asm/arch-kirkwood/cpu.h |2 + 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c index 82c978b..b4a4c04 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c +++ b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c @@ -54,10 +54,11 @@ unsigned char get_random_hex(void) u8 outbuf[BUFLEN]; /* -* in case of 88F6281/88F6192 A0, +* in case of 88F6281/88F6282/88F6192 A0, * Bit7 need to reset to generate random values in KW_REG_UNDOC_0x1470 -* Soc reg offsets KW_REG_UNDOC_0x1470 and KW_REG_UNDOC_0x1478 are reserved regs and -* Does not have names at this moment (no errata available) +* Soc reg offsets KW_REG_UNDOC_0x1470 and KW_REG_UNDOC_0x1478 are +* reserved regs and does not have names at this moment +* (no errata available) */ writel(readl(KW_REG_UNDOC_0x1478) & ~(1 << 7), KW_REG_UNDOC_0x1478); for (i = 0; i < BUFLEN; i++) { @@ -271,20 +272,31 @@ static void kw_sysrst_check(void) #if defined(CONFIG_DISPLAY_CPUINFO) int print_cpuinfo(void) { - char *name = "Unknown"; + char *rev; + u16 devid = (readl(KW_REG_PCIE_DEVID) >> 16) & 0x; + u8 revid = readl(KW_REG_PCIE_REVID) & 0xff; - switch (readl(KW_REG_DEVICE_ID) & 0x03) { - case 1: - name = "88F6192_A0"; + if ((readl(KW_REG_DEVICE_ID) & 0x03) > 2) { + printf("Error.. %s:Unsupported Kirkwood SoC 88F%04x\n", __FUNCTION__, devid); + return -1; + } + + switch (revid) { + case 0: + rev = "Z0"; break; case 2: - name = "88F6281_A0"; + rev = "A0"; + break; + case 3: + rev = "A1"; break; default: - printf("SoC: Unsupported Kirkwood\n"); - return -1; + rev = "??"; + break; } - printf("SoC: Kirkwood %s\n", name); + + printf("SoC: Kirkwood 88F%04x_%s\n", devid, rev); return 0; } #endif /* CONFIG_DISPLAY_CPUINFO */ diff --git a/arch/arm/include/asm/arch-kirkwood/cpu.h b/arch/arm/include/asm/arch-kirkwood/cpu.h index b3022a3..d28c51a 100644 --- a/arch/arm/include/asm/arch-kirkwood/cpu.h +++ b/arch/arm/include/asm/arch-kirkwood/cpu.h @@ -35,6 +35,8 @@ #define KWGBE_PORT_SERIAL_CONTROL1_REG(_x) \ ((_x ? KW_EGIGA0_BASE : KW_EGIGA1_BASE) + 0x44c) +#define KW_REG_PCIE_DEVID (KW_REG_PCIE_BASE + 0x00) +#define KW_REG_PCIE_REVID (KW_REG_PCIE_BASE + 0x08) #define KW_REG_DEVICE_ID (KW_MPP_BASE + 0x34) #define KW_REG_SYSRST_CNT (KW_MPP_BASE + 0x50) #define SYSRST_CNT_1SEC_VAL(25*100) -- 1.7.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC] Driver model
Dear Marek Vasut, In message <201009201205.41037.marek.va...@gmail.com> you wrote: > > most of the readers here probably noticed, there are various forks of U-Boot > bootloader floating around the net. The development model there is quite > closed > and certainly not community driven, on the other hand, they have neat driver > model. You are speaking about barebox, right? [I am not aware of another fork with a driver model.] > * Start with ethernet subsystem > It seems to be quite ready for conversion of this scale. Besides it'd be easy > to > prove multiple instances of ethernet device work with the driver model. Indeed ethernet seems to make sense; eventually followed by serial, as this will quickly show some of the challenges (i. e. driver support in the restricted environment before relocation). Block devices (IDE, SDCard/MMC, USB, eventually also NAND etc.) could need some unification as well. > * Create an universal driver model: > The driver will have usual .probe function, which will have some argument of > type "void *" to it's driver data. This way we can pass it's base address for > example instead of #defining it. Very similar to linux kernel. Instead of picking out a single function, we should rather discuss the whole interface. I guess the stating point would be the current BB implementation? > * We need some "device tree" > To know, what driver is where and where are it's driver data etc. Using the DT for run-time configuration of U-Boot would be especially interesting. Assume: a single U-Boot image for all - say - OMAP3 boards... > * Get rid of static data in drivers, switch to dynamic allocation > So these wont interfere with multiple instances of the same driver. This might be a challange. Keep in mind that some drivers (console, eventually I2C / SPI, MMC/SDcard, NAND, ...) might be needed before relocation to RAM. 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 At the source of every error which is blamed on the computer you will find at least two human errors, including the error of blaming it on the computer. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V7] POST cleanup.
- Revives POST for blackfin arch; - Removes redundant code: arch/blackfin/lib/post.c arch/powerpc/cpu/ppc4xx/commproc.c arch/powerpc/cpu/mpc512x/common.c - fixes up the post_word_{load|store} usage. Signed-off-by: Michael Zaidman Acked-by: Detlev Zundel Tested-by: Anatolij Gustschin List of the maintainers of the affected by patch boards: Cc: Stephan Linz Cc: Denis Peter Cc: Matthias Fuchs Cc: Peter Tyser Cc: Stefan Roese Cc: Mike Frysinger Cc: Niklaus Giger Cc: Larry Johnson Cc: Feng Kan --- arch/blackfin/lib/Makefile |2 +- arch/blackfin/lib/board.c |1 - arch/blackfin/lib/post.c| 421 --- arch/powerpc/cpu/mpc512x/common.c | 25 -- arch/powerpc/cpu/mpc8260/commproc.c | 20 -- arch/powerpc/cpu/mpc85xx/commproc.c | 20 -- arch/powerpc/cpu/mpc8xx/commproc.c | 20 -- arch/powerpc/cpu/ppc4xx/Makefile|1 - arch/powerpc/cpu/ppc4xx/commproc.c | 53 - board/barco/barco.c |9 - board/bc3450/bc3450.c | 20 -- board/bf537-stamp/Makefile |2 +- board/bf537-stamp/post.c| 14 -- board/cm5200/cm5200.c | 16 -- board/tqc/tqm5200/tqm5200.c | 19 -- board/xes/xpedite1000/xpedite1000.c | 16 -- include/common.h|5 +- include/configs/KAREF.h |3 +- include/configs/METROBOX.h |3 +- include/configs/MIP405.h|4 - include/configs/PMC440.h|3 +- include/configs/TB5200.h|2 +- include/configs/XPEDITE1000.h |3 +- include/configs/alpr.h |3 +- include/configs/barco.h |2 + include/configs/bf537-stamp.h |1 + include/configs/bfin_adi_common.h |1 + include/configs/hcu4.h |3 +- include/configs/hcu5.h |5 +- include/configs/hmi1001.h |6 +- include/configs/icon.h |3 +- include/configs/inka4x0.h |6 +- include/configs/katmai.h|3 +- include/configs/kilauea.h |3 +- include/configs/korat.h |3 +- include/configs/lwmon5.h|2 +- include/configs/makalu.h|3 +- include/configs/mcu25.h |3 +- include/configs/mpc5121-common.h|3 +- include/configs/ocotea.h|3 +- include/configs/redwood.h |3 +- include/configs/sequoia.h |3 +- include/configs/taishan.h |3 +- include/configs/yucca.h |3 +- include/configs/zeus.h |7 +- include/post.h | 57 +- post/Makefile |3 +- 47 files changed, 101 insertions(+), 713 deletions(-) delete mode 100644 arch/blackfin/lib/post.c delete mode 100644 arch/powerpc/cpu/mpc512x/common.c delete mode 100644 arch/powerpc/cpu/ppc4xx/commproc.c diff --git a/arch/blackfin/lib/Makefile b/arch/blackfin/lib/Makefile index 3bdba75..a18bbd6 100644 --- a/arch/blackfin/lib/Makefile +++ b/arch/blackfin/lib/Makefile @@ -46,7 +46,7 @@ COBJS-y += clocks.o COBJS-$(CONFIG_CMD_CACHE_DUMP) += cmd_cache_dump.o COBJS-$(CONFIG_CMD_KGDB) += kgdb.o COBJS-y+= muldi3.o -COBJS-$(CONFIG_POST) += post.o tests.o +COBJS-$(CONFIG_POST_ALT_LIST) += tests.o COBJS-y+= string.o SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c index 46e36c8..7643250 100644 --- a/arch/blackfin/lib/board.c +++ b/arch/blackfin/lib/board.c @@ -322,7 +322,6 @@ void board_init_r(gd_t * id, ulong dest_addr) #if defined(CONFIG_POST) post_output_backlog(); - post_reloc(); #endif /* initialize malloc() area */ diff --git a/arch/blackfin/lib/post.c b/arch/blackfin/lib/post.c deleted file mode 100644 index bd6aaf5..000 --- a/arch/blackfin/lib/post.c +++ /dev/null @@ -1,421 +0,0 @@ -/* - * (C) Copyright 2002 - * Wolfgang Denk, DENX Software Engineering, w...@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -#include -#include -#include -#include - -#ifdef CONFIG_LOGBUFFER -#include -#endif - -DECLA
Re: [U-Boot] [PATCH 1/2 V3] mmc: add boundary check for mmc operation
> -Original Message- > From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de] > On Behalf Of Wolfgang Denk > Sent: Sunday, September 19, 2010 3:17 AM > To: Lei Wen > Cc: u-boot@lists.denx.de; sshtyl...@mvista.com > Subject: Re: [U-Boot] [PATCH 1/2 V3] mmc: add boundary check for mmc > operation > > Dear Lei Wen, > > In message <1284386848-4670-1-git-send-email-lei...@marvell.com> you > wrote: > > > > Signed-off-by: Lei Wen > > --- > > V2: > > Change log: > > change the puts to printf to better formating. > > > > drivers/mmc/mmc.c | 10 ++ > > 1 files changed, 10 insertions(+), 0 deletions(-) > > Applied, thanks. [Ghorai] I was using the latest mmc/sd core for OMAP 4 and getting the following error. OMAP4430 SDP # mmc rescan 1 MMC: block number 0x1 exceeds max(0x0)OMAP4430 SDP # Please let me know what I am missing. > > 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 > Intel's new motto: United we stand. Divided we fall! > ___ > 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
[U-Boot] [RFC] Driver model
Hi, most of the readers here probably noticed, there are various forks of U-Boot bootloader floating around the net. The development model there is quite closed and certainly not community driven, on the other hand, they have neat driver model. As for U-Boot, there currently is no driver model. Therefore I'd like to start a discussing on this topic so we can converge towards a reasonable result. My few points: * Start with ethernet subsystem It seems to be quite ready for conversion of this scale. Besides it'd be easy to prove multiple instances of ethernet device work with the driver model. * Create an universal driver model: The driver will have usual .probe function, which will have some argument of type "void *" to it's driver data. This way we can pass it's base address for example instead of #defining it. Very similar to linux kernel. * We need some "device tree" To know, what driver is where and where are it's driver data etc. * Get rid of static data in drivers, switch to dynamic allocation So these wont interfere with multiple instances of the same driver. Cheers ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot