Re: [U-Boot] ARM Pull Request
-Original Message- From: Wolfgang Denk [mailto:w...@denx.de] Sent: Thursday, July 30, 2009 4:02 AM To: Prafulla Wadaskar Cc: Jean-Christophe PLAGNIOL-VILLARD; U-Boot; Ben Warren; Ashish Karkare; Prabhanjan Sarnaik Subject: Re: [U-Boot] ARM Pull Request Dear Prafulla Wadaskar, In message 73173d32e9439e4abb5151606c3e19e202de13c...@sc-vexch1.marvell. com you wrote: Hopefully you might have received my new patch series (posted 30 hours back) I know it's very busy time for you. I received it, but did not have time for a thorough review yet. Sorry. But that's my wish to see this stuff in. Please let me know your valued feedback so that I can help to get this stuff IN this release. That should work out well. We still have sufficient time. Dear Wolfgang Ping :-) I do have some more updates for these patches, I was waiting for your feedback so that I can reduce number of spins :-) Regards.. Prafulla . . FYI: I tried to fulfill all points raised by you in earlier feedback. Also some code reused from image.c/h for kwbimage in clean way Though the entire resulting code will look different since there are lot changes, I tired to maintain smaller patches for easy understanding and acceptance 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 ...and the fully armed nuclear warheads, are, of course, merely a courtesy detail. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx27lite: add support for imx27lite board from LogicPD
2009/8/6 Wolfgang Denk w...@denx.de: I have just posted a patch: [PATCH] ARM EABI: add new helper functions resp. function names (see http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/65473 Combined with commit 52b1bf2c: Make linking against libgcc configurable I can run a USE_PRIVATE_LIBGCC=yes ./MAKEALL arm with an EABI conformant tool chain (ELDK 4.2) without any related issues. It would be great if you all could test this, so we can get this in as quickly as possible. This also works for me using Freescale's toolchain included in LTIB for i.mx27 ads board. One thing that confuses me a little about this imx27litekit patch is that TEXT_ADDRESS is a RAM address but, according to the FAQ u-boot cannot be run from RAM by another bootloader. Why is TEXT_ADDRESS in RAM then? Thanks. -- Javier Martin Vista Silicon S.L. Universidad de Cantabria CDTUC - FASE C - Oficina S-345 Avda de los Castros s/n 39005- Santander. Cantabria. Spain +34 942 25 32 60 www.vista-silicon.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix
Dear Wolfgang, I'd like to clarify what is the problem with the timeout and the Intel flash (even if the following comments can be obvious or already well known) and to ask you an opinion on a small code change. The flash has an internal busy flag that is polled in function flash_status_check() and that function is the only one in cfi_flash.c that uses the get_timer() func. and the CONFIG_SYS_HZ definition. In many Altera/Nios boards the CONFIG_SYS_HZ constant evaluate to 999 due to rounding errors. With the current implementation 999 != 1000 evaluate to 1 so the CONFIG_SYS_HZ/1000 division is done and returns 0. This lead to a (forced) 0 timeout in the flash_status_check() that corresponds to erroneous flash clear, program, etc.. I've proposed to change the code from #if CONFIG_SYS_HZ != 1000 tout *= CONFIG_SYS_HZ/1000; #endif to #if CONFIG_SYS_HZ != 1000 unsigned long long ull; ull = tout*CONFIG_SYS_HZ + CONFIG_SYS_HZ/2; tout = ull/1000; /* Compute: tout *= CONFIG_SYS_HZ/1000; */ #endif but this, as you told me and I agree, is too much architecture dependent (it uses a 64bit unsigned long). The alternative I've proposed, suggested by A.Rubini, is as follow: if (CONFIG_SYS_HZ 1) tout *= CONFIG_SYS_HZ/1000; /* for a big HZ, avoid overflow */ else tout = (tout * CONFIG_SYS_HZ) / 1000 + 1; that leads to an evaluation of the timeout in excess of 1 timer tick. I think that an expression like this #if CONFIG_SYS_HZ != 1000 if ((ulong)CONFIG_SYS_HZ 1) tout *= ((ulong)CONFIG_SYS_HZ)/1000; /* for a big HZ, avoid overflow */ else tout = (tout * (ulong)CONFIG_SYS_HZ + 500) / 1000; #endif could be better because - it forces the data type of the system dependent CONFIG_SYS_HZ value to ulong (no float!) - it rounds tout to 0.5 timer tick and leaves tout unchanged if CONFIG_SYS_HZ == 1000 What do you think about? Best regards, Renato Andreola The polling time is I've seen that the Wolfgang Denk wrote: Dear Jean-Christophe PLAGNIOL-VILLARD, In message 20090806202615.gh13...@game.jcrosoft.org you wrote: as we are all supposed to have CONFIG_SYS_HZ at 1000 (mandtory) to have cfi, tftp co working perfectly I do not thing this is a good idea Yes, this is the rule, and we would like to enforce it. as you will need to fix each part of u-boot that use CONFIG_SYS_HZ which make no sense the best will be to simply fix your timer However, the current situation is this: more than 60 boards (all of them ARM, it seems) use very different settings: include/configs/EB+MCF-EV123.h: 1000 include/configs/EP1C20.h: (CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1)) include/configs/EP1S10.h: (CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1)) include/configs/EP1S40.h: (CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1)) include/configs/KAREF.h: 100 include/configs/M5271EVB.h: 100 include/configs/METROBOX.h: 100 include/configs/MVBLUE.h: 1 include/configs/PCI5441.h: (CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1)) include/configs/PK1C20.h: (CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1)) include/configs/SMN42.h: 2048 include/configs/VCMA9.h: 1562500 include/configs/actux1.h: 333 include/configs/actux2.h: 333 include/configs/actux3.h: 333 include/configs/actux4.h: 333 include/configs/apollon.h:((CONFIG_SYS_CLK_FREQ)/(2 CONFIG_SYS_PTV)) include/configs/armadillo.h: 2000 include/configs/assabet.h:3686400 include/configs/at91rm9200dk.h: AT91C_MASTER_CLOCK/2 include/configs/at91rm9200ek.h: (AT91C_MASTER_CLOCK / 2) include/configs/cmc_pu2.h:(AT91C_MASTER_CLOCK/2) include/configs/csb637.h: AT91C_MASTER_CLOCK/2 include/configs/davinci_dm355evm.h: 2400 include/configs/davinci_dvevm.h: 2700 include/configs/davinci_schmoogie.h: 2700 include/configs/davinci_sffsdr.h: 2700 include/configs/davinci_sonata.h: 2700 include/configs/dnp1110.h:3686400 include/configs/eNET.h: 1024 include/configs/ep7312.h: 2000 include/configs/gcplus.h: 3686400 include/configs/idmr.h: (5000 / 64) include/configs/impa7.h: 2000 include/configs/integratorap.h: 2400 include/configs/integratorcp.h: 100 include/configs/ixdp425.h:333 include/configs/kb9202.h: AT91C_MASTER_CLOCK/2 include/configs/lart.h: 3686400 include/configs/lpc2292sodimm.h: 2048 include/configs/lpd7a400-10.h:(508469) include/configs/lpd7a404-10.h:(508469) include/configs/m501sk.h:
[U-Boot] U-boot Version 2009.06
Hello Friends, I have a custom board with MPC8548E. I am trying to port u-boot 2009.06 By modifying the MPC8548CDS Files. The main difference between CDS and our custom board is in Flash Configuration. Our custom board has 128MB Flash? Which locations/file i have to change? i configured the MPC8548CDS.h file (Flash location) but when i program and run, the u-boot is getting struck at 0xfff80e00 location? (this is checked using ti command in BDI). What could be the problem? How can this be debugged? -- View this message in context: http://www.nabble.com/U-boot-Version-2009.06-tp24860826p24860826.html Sent from the Uboot - Users mailing list archive at Nabble.com. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Handling of environment settings
Dear Alex Dubov, In message 605712.94797...@web37607.mail.mud.yahoo.com you wrote: Until now, custom environment settings were just defined in the board config file. All that had to be done is to edit the file, recompile the u-boot and flash it to the target. Sounds a bit cumbersome... Now, however, this approach is not longer acceptable. This means, that environment must be either set manually on the target or maintained and flashed as a separate blob, which is considerably less convenient. either ... or ...? There are many alternative approaches. So, two question here: 1. Is there a tool already which takes an environment description in some form and produces a flashable blob? Yes, several, actually. If you insist on a binary blob, tools/envcrc has a --binary option to export the embedded environment as a binary blob. However, I'd recommend to put your environment settings into a text file and create a script file from it, which you can then load and run on the target. 2. If not, is there some extra include file which is considered volatile and can hold user-defined environment settings? No. 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 Minds are like parachutes - they only function when open. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx27lite: add support for imx27lite board from LogicPD
Dear javier Martin, In message eedb5540908070018o157def3fleb4b1d04da853...@mail.gmail.com you wrote: It would be great if you all could test this, so we can get this in as quickly as possible. This also works for me using Freescale's toolchain included in LTIB for i.mx27 ads board. thanks a lot for the confirmation. One thing that confuses me a little about this imx27litekit patch is that TEXT_ADDRESS is a RAM address but, according to the FAQ u-boot cannot be run from RAM by another bootloader. Why is TEXT_ADDRESS in RAM then? This is normal on ARM systems - there TEXT_BASE holds the address of the image after copying (I hesitate to call it relocating) it 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 But it's real. And if it's real it can be affected ... we may not be able to break it, but, I'll bet you credits to Navy Beans we can put a dent in it. -- deSalle, Catspaw, stardate 3018.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] ppc-mpc8548-u-boot
Hello All, I have downloaded new u-boot (u-boot -2009.06) I am using PQ3 - 8548 processor. Our custom board is with 128Mbyte Flash, but MPC8548CDS and SBC8548 are with different configurations. How can i customize this to my custom board, which has 128Mbyte flash interface. I changed the Flash Base location to 0xf800 and Banks, Sector informations. But still not booting. The clock configuration is fine (33.33MHz) When i debugged using JTAG, i could notice, when Program Counter is at 0xfff80e00 - its stoping further execution? how can i proceed? regards raghavendra ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix
Dear Renato Andreola, In message 4a7be28a.8080...@imagos.it you wrote: I'd like to clarify what is the problem with the timeout and the Intel flash (even if the following comments can be obvious or already well known) and to ask you an opinion on a small code change. Thanks. ... I think that an expression like this #if CONFIG_SYS_HZ != 1000 if ((ulong)CONFIG_SYS_HZ 1) tout *= ((ulong)CONFIG_SYS_HZ)/1000; /* for a big HZ, avoid overflow */ else tout = (tout * (ulong)CONFIG_SYS_HZ + 500) / 1000; #endif could be better because - it forces the data type of the system dependent CONFIG_SYS_HZ value to ulong (no float!) - it rounds tout to 0.5 timer tick and leaves tout unchanged if CONFIG_SYS_HZ == 1000 What do you think about? I'd prefer tout = DIV_ROUND_UP(tout*CONFIG_SYS_HZ, 1000); Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de I came home the other night and tried to open the door with my car keys...and the building started up. So I took it out for a drive. A cop pulled me over for speeding. He asked me where I live... Right here.- Steven Wright ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] how to make debug() print information
Hi everyone~ I am a beginner for u-boot~ I am using 1.3.4 version now I want to debug() print out information. I see in /tools/Mkimage.h have: #define MKIMAGE_DEBUG #ifdef MKIMAGE_DEBUG #define debug(fmt,args...) printf (fmt ,##args) #else #define debug(fmt,args...) #endif /* MKIMAGE_DEBUG */ how can I do? thanks~ 2009-08-07 fluke56512 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Kirkwood gpio (was: timeout calculation underflow if imprecise 1kHz timer: fix)
I'd prefer tout = DIV_ROUND_UP(tout*CONFIG_SYS_HZ, 1000); Ok for me. BTW: Looking for DIV_ROUND_UP, I found that it's defined in ./include/asm/arch-kirkwood/gpio.h as well. I was checking whether it can be removed, but it looks like nobody is using the driver. tornado$ grep -r CONFIG_KIRKWOOD_GPIO . ./drivers/gpio/Makefile:COBJS-$(CONFIG_KIRKWOOD_GPIO) += kw_gpio.o The header and C file were added on Jun 29th, but there's not user yet. It has been tested by Heiko on the Suen3, but it's not mainline. And even that patch doesn't define CONFIG_KIRKWOOD_GPIO . /alessandro ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Subject: [PATCH] kirkwood/gpio.h: remove duplicate definition
Signed-off-by: Alessandro Rubini rub...@gnudd.com --- To test the define is not really needed, I applied the suen3 patch and added CONFIG_KIRKWOOD_GPIO to the config file. Now back to defrag stuff. include/asm-arm/arch-kirkwood/gpio.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/include/asm-arm/arch-kirkwood/gpio.h b/include/asm-arm/arch-kirkwood/gpio.h index a79102b..b5bacde 100644 --- a/include/asm-arm/arch-kirkwood/gpio.h +++ b/include/asm-arm/arch-kirkwood/gpio.h @@ -17,8 +17,6 @@ #ifndef __KIRKWOOD_GPIO_H #define __KIRKWOOD_GPIO_H -/* got from kernel include/linux/kernel.h */ -#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) /* got from kernel include/linux/bitops.h */ #define BITS_PER_BYTE 8 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] Add driver for the ST M95xxx SPI EEPROM
This chip is used in a number of boards manufactured by Calao-Systems which should be supported soon. This driver provides the necessary spi_read and spi_write functions necessary to communicate with the chip. Signed-off-by: Albin Tonnerre albin.tonne...@free-electrons.com --- drivers/mtd/spi/Makefile|1 + drivers/mtd/spi/eeprom_m95xxx.c | 117 +++ 2 files changed, 118 insertions(+), 0 deletions(-) create mode 100644 drivers/mtd/spi/eeprom_m95xxx.c diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile index 27dcbff..e3e0292 100644 --- a/drivers/mtd/spi/Makefile +++ b/drivers/mtd/spi/Makefile @@ -31,6 +31,7 @@ COBJS-$(CONFIG_SPI_FLASH_MACRONIX)+= macronix.o COBJS-$(CONFIG_SPI_FLASH_SPANSION) += spansion.o COBJS-$(CONFIG_SPI_FLASH_SST) += sst.o COBJS-$(CONFIG_SPI_FLASH_STMICRO) += stmicro.o +COBJS-$(CONFIG_SPI_M95XXX) += eeprom_m95xxx.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/mtd/spi/eeprom_m95xxx.c b/drivers/mtd/spi/eeprom_m95xxx.c new file mode 100644 index 000..59f80e3 --- /dev/null +++ b/drivers/mtd/spi/eeprom_m95xxx.c @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2009 + * Albin Tonnerre, Free Electrons albin.tonne...@free-electrons.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include common.h +#include spi.h + +#define SPI_EEPROM_WREN0x06 +#define SPI_EEPROM_RDSR0x05 +#define SPI_EEPROM_READ0x03 +#define SPI_EEPROM_WRITE 0x02 + +#ifndef CONFIG_DEFAULT_SPI_BUS +#define CONFIG_DEFAULT_SPI_BUS 0 +#endif + +#ifndef CONFIG_DEFAULT_SPI_MODE +#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_0 +#endif + +ssize_t spi_read (uchar *addr, int alen, uchar *buffer, int len) +{ + struct spi_slave *slave; + u8 cmd = SPI_EEPROM_READ; + + slave = spi_setup_slave(CONFIG_DEFAULT_SPI_BUS, 1, 100, + CONFIG_DEFAULT_SPI_MODE); + spi_claim_bus(slave); + + /* command */ + if(spi_xfer(slave, 8, cmd, NULL, SPI_XFER_BEGIN)) + return -1; + + /* +* if alen == 3, addr[0] is the block number, we never use it here. All we +* need are the lower 16 bits +*/ + if (alen == 3) + addr++; + + /* address, and data */ + if(spi_xfer(slave, 16, addr, NULL, 0)) + return -1; + if(spi_xfer(slave, 8 * len, NULL, buffer, SPI_XFER_END)) + return -1; + + spi_release_bus(slave); + spi_free_slave(slave); + return len; +} + +ssize_t spi_write (uchar *addr, int alen, uchar *buffer, int len) +{ + struct spi_slave *slave; + int i; + char buf[3]; + + slave = spi_setup_slave(CONFIG_DEFAULT_SPI_BUS, 1, 100, + CONFIG_DEFAULT_SPI_MODE); + spi_claim_bus(slave); + + buf[0] = SPI_EEPROM_WREN; + if(spi_xfer(slave, 8, buf, NULL, SPI_XFER_BEGIN | SPI_XFER_END)) + return -1; + + buf[0] = SPI_EEPROM_WRITE; + + /* As for reading, drop addr[0] if alen is 3 */ + if (alen == 3) { + alen--; + addr++; + } + + memcpy(buf + 1, addr, alen); + /* command + addr, then data */ + if(spi_xfer(slave, 24, buf, NULL, SPI_XFER_BEGIN)) + return -1; + if(spi_xfer(slave, len * 8, buffer, NULL, SPI_XFER_END)) + return -1; + + reset_timer_masked(); + do { + buf[0] = SPI_EEPROM_RDSR; + buf[1] = 0; + spi_xfer(slave, 16, buf, buf, SPI_XFER_BEGIN | SPI_XFER_END); + + if (!(buf[1] 1)) + break; + + } while (get_timer_masked() CONFIG_SYS_SPI_WRITE_TOUT); + + if (buf[1] 1) + printf (*** spi_write: Time out while writing!\n); + + spi_release_bus(slave); + spi_free_slave(slave); + return len; +} -- 1.6.3.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] Support for the Calao TNY-A9260/TNY-A9G20 boards
The Calao TNY-A9260 and TNY-9G20 are boards manufactured and sold by Calao Systems http://www.calao-systems.com. Their components are very similar to the AT91SAM9260EK board, so their configuration is based on the configuration of this board. There are however some differences: different clocks, no LCD, no ethernet. They also can use SPI EEPROM to store the environment. Signed-off-by: Albin Tonnerre albin.tonne...@free-electrons.com --- MAINTAINERS |4 + MAKEALL |1 + Makefile | 19 board/calao/tny_a9260/Makefile | 55 ++ board/calao/tny_a9260/config.mk |1 + board/calao/tny_a9260/spi.c | 50 + board/calao/tny_a9260/tny_a9260.c| 110 cpu/arm926ejs/at91/at91sam9260_devices.c |2 +- include/configs/tny_a9260.h | 164 ++ 9 files changed, 405 insertions(+), 1 deletions(-) create mode 100644 board/calao/tny_a9260/Makefile create mode 100644 board/calao/tny_a9260/config.mk create mode 100644 board/calao/tny_a9260/spi.c create mode 100644 board/calao/tny_a9260/tny_a9260.c create mode 100644 include/configs/tny_a9260.h diff --git a/MAINTAINERS b/MAINTAINERS index 620604c..79873f3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -681,6 +681,10 @@ Andrea Scian andrea.sc...@dave-tech.it B2 ARM7TDMI (S3C44B0X) +Albin Tonnerre albin.tonne...@free-electrons.com + + tny_a9260 ARM926EJS (AT91SAM9260 SoC) + Greg Ungerer greg.unge...@opengear.com cm4008 ks8695p diff --git a/MAKEALL b/MAKEALL index dd0b761..7a583df 100755 --- a/MAKEALL +++ b/MAKEALL @@ -607,6 +607,7 @@ LIST_at91= \ m501sk \ pm9261 \ pm9263 \ + tny_a9260 \ # diff --git a/Makefile b/Makefile index 8096f91..f3e7aa3 100644 --- a/Makefile +++ b/Makefile @@ -2838,6 +2838,25 @@ at91sam9g45ekes_config : unconfig pm9263_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91 +tny_a9g20_nandflash_config \ +tny_a9g20_eeprom_config \ +tny_a9g20_config \ +tny_a9260_nandflash_config \ +tny_a9260_eeprom_config \ +tny_a9260_config : unconfig + @mkdir -p $(obj)include + @if [ $(findstring _nandflash,$@) ] ; then \ + echo #define CONFIG_ENV_IS_IN_NAND $(obj)include/config.h ; \ + else \ + echo #define CONFIG_ENV_IS_IN_EEPROM $(obj)include/config.h ; \ + fi; + @if [ $(findstring _a9g20,$@) ] ; then \ + echo #define CONFIG_TNY_A9G20 $(obj)include/config.h ; \ + else \ + echo #define CONFIG_TNY_A9260 $(obj)include/config.h ; \ + fi; + @$(MKCONFIG) -a tny_a9260 arm arm926ejs tny_a9260 calao at91 + ## ARM Integrator boards - see doc/README-integrator for more info. integratorap_config\ diff --git a/board/calao/tny_a9260/Makefile b/board/calao/tny_a9260/Makefile new file mode 100644 index 000..21f5ed1 --- /dev/null +++ b/board/calao/tny_a9260/Makefile @@ -0,0 +1,55 @@ +# +# (C) Copyright 2003-2008 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# (C) Copyright 2008 +# Stelian Pop stelian@leadtechdesign.com +# Lead Tech Design www.leadtechdesign.com +# +# 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 $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).a + +COBJS-y+= tny_a9260.o +COBJS-$(CONFIG_ATMEL_SPI) += spi.o + +SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude
Re: [U-Boot] [PATCH 1/2] Add driver for the ST M95xxx SPI EEPROM
On Wed, Aug 05, 2009 at 09:24:43PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote : On 19:16 Wed 05 Aug , Albin Tonnerre wrote: + for (i = 0; i 1000; i++) { why 1000? Oh, true. I meant to fix that and replace it with something similar to what atmel_dataflash does, ie using CONFIG_SYS_SPI_WRITE_TOUT. Updated in the patch I re-submitted. Regards, -- Albin Tonnerre, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] Add driver for the ST M95xxx SPI EEPROM
On 12:37 Fri 07 Aug , Albin Tonnerre wrote: This chip is used in a number of boards manufactured by Calao-Systems which should be supported soon. This driver provides the necessary spi_read and spi_write functions necessary to communicate with the chip. Signed-off-by: Albin Tonnerre albin.tonne...@free-electrons.com --- drivers/mtd/spi/Makefile|1 + drivers/mtd/spi/eeprom_m95xxx.c | 117 +++ 2 files changed, 118 insertions(+), 0 deletions(-) create mode 100644 drivers/mtd/spi/eeprom_m95xxx.c looks fine Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] Support for the Calao TNY-A9260/TNY-A9G20 boards
On 12:37 Fri 07 Aug , Albin Tonnerre wrote: The Calao TNY-A9260 and TNY-9G20 are boards manufactured and sold by Calao Systems http://www.calao-systems.com. Their components are very similar to the AT91SAM9260EK board, so their configuration is based on the configuration of this board. There are however some differences: different clocks, no LCD, no ethernet. They also can use SPI EEPROM to store the environment. Signed-off-by: Albin Tonnerre albin.tonne...@free-electrons.com --- MAINTAINERS |4 + MAKEALL |1 + Makefile | 19 board/calao/tny_a9260/Makefile | 55 ++ board/calao/tny_a9260/config.mk |1 + board/calao/tny_a9260/spi.c | 50 + board/calao/tny_a9260/tny_a9260.c| 110 cpu/arm926ejs/at91/at91sam9260_devices.c |2 +- include/configs/tny_a9260.h | 164 ++ 9 files changed, 405 insertions(+), 1 deletions(-) create mode 100644 board/calao/tny_a9260/Makefile create mode 100644 board/calao/tny_a9260/config.mk create mode 100644 board/calao/tny_a9260/spi.c create mode 100644 board/calao/tny_a9260/tny_a9260.c create mode 100644 include/configs/tny_a9260.h Acked-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Kirkwood gpio (was: timeout calculation underflow if imprecise 1kHz timer: fix)
-Original Message- From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Alessandro Rubini Sent: Friday, August 07, 2009 4:00 PM To: w...@denx.de Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] Kirkwood gpio (was: timeout calculation underflow if imprecise 1kHz timer: fix) I'd prefer tout = DIV_ROUND_UP(tout*CONFIG_SYS_HZ, 1000); Ok for me. BTW: Looking for DIV_ROUND_UP, I found that it's defined in ./include/asm/arch-kirkwood/gpio.h as well. I was checking whether it can be removed, but it looks like nobody is using the driver. I think at least heiko is the customer for this stuff. Copying Heiko, Unfortunately I do not have use case for this :-( But in near future I will have it. Dear Heiko, can you pls check mainlined stuff? Regards.. Prafulla . . tornado$ grep -r CONFIG_KIRKWOOD_GPIO . ./drivers/gpio/Makefile:COBJS-$(CONFIG_KIRKWOOD_GPIO) += kw_gpio.o The header and C file were added on Jun 29th, but there's not user yet. It has been tested by Heiko on the Suen3, but it's not mainline. And even that patch doesn't define CONFIG_KIRKWOOD_GPIO . /alessandro ___ 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] [PATCH v2] arm: Kirkwood: add SYSRSTn Duration Counter Support
This feature can be used to trigger special command sysrstcmd using reset key long press event and environment variable sysrstdelay is set (useful for reset to factory or manufacturing mode execution) Kirkwood SoC implements a hardware-based SYSRSTn duration counter. When SYSRSTn is asserted low, a SYSRSTn duration counter is running. The counter value is stored in the SYSRSTn Length Counter Register The counter is based on the 25-MHz reference clock (40ns) It is a 29-bit counter, yielding a maximum counting duration of 2^29/25 MHz (21.4 seconds). When the counter reach its maximum value, it remains at this value until counter reset is triggered by setting bit 31 of KW_REG_SYSRST_CNT Implementation: Upon long reset assertion ( ${sysrstdleay} in secs) sysrstcmd will be executed if pre-defined in environment variables. This feature will be disabled if sysrstdelay variable is unset. for-ex. setenv sysrst_cmd echo starting factory reset; nand erase 0xa 0x2; echo finish ed sysrst command; will erase particular nand sector if triggered by this event Signed-off-by: Prafulla Wadaskar prafu...@marvell.com --- Change log: v2: command sysrst_cmd renamed as sysrstcmd stsrstdelay variable added instead of hardcoding the value cpu/arm926ejs/kirkwood/cpu.c| 79 +++ include/asm-arm/arch-kirkwood/cpu.h |2 + 2 files changed, 81 insertions(+), 0 deletions(-) diff --git a/cpu/arm926ejs/kirkwood/cpu.c b/cpu/arm926ejs/kirkwood/cpu.c index 795a739..9a6ee57 100644 --- a/cpu/arm926ejs/kirkwood/cpu.c +++ b/cpu/arm926ejs/kirkwood/cpu.c @@ -195,6 +195,82 @@ int kw_config_mpp(u32 mpp0_7, u32 mpp8_15, u32 mpp16_23, u32 mpp24_31, return 0; } +/* + * SYSRSTn Duration Counter Support + * + * Kirkwood SoC implements a hardware-based SYSRSTn duration counter. + * When SYSRSTn is asserted low, a SYSRSTn duration counter is running. + * The SYSRSTn duration counter is useful for implementing a manufacturer + * or factory reset. Upon a long reset assertion that is greater than a + * pre-configured environment variable value for sysrstdelay, + * The counter value is stored in the SYSRSTn Length Counter Register + * The counter is based on the 25-MHz reference clock (40ns) + * It is a 29-bit counter, yielding a maximum counting duration of + * 2^29/25 MHz (21.4 seconds). When the counter reach its maximum value, + * it remains at this value until counter reset is triggered by setting + * bit 31 of KW_REG_SYSRST_CNT + */ +static void kw_sysrst_action(void) +{ +#ifdef CONFIG_CMD_RUN + char cmd[BUFLEN]; + char img[BUFLEN * 2]; + char *argv[3]; + + if (getenv(sysrstcmd) == NULL) { + printf(Error.. %s failed, check sysrstcmd\n, + __FUNCTION__); + return; + } + + printf(Starting %s process...\n, __FUNCTION__); + sprintf(cmd, run ); + sprintf(img, sysrstcmd); + argv[0] = cmd; + argv[1] = img; + if ((do_run(NULL, 0, 2, argv)) != 0x0) { + printf(Error.. %s failed\n, __FUNCTION__); + } else { + printf(%s process finished\n, __FUNCTION__); + } +#else /* CONFIG_CMD_RUN */ + printf(Error.. %s needs run command support\n, __FUNCTION__); +#endif /* CONFIG_CMD_RUN */ +} + +static void kw_sysrst_check(void) +{ + u32 sysrst_cnt, sysrst_dly; + char *s; + + /* +* no action if sysrstdelay environment variable is not defined +*/ + s = getenv(sysrstdelay); + if (s == NULL) + return; + + /* read sysrstdelay value */ + sysrst_dly = (u32) simple_strtoul(s, NULL, 10); + + /* read SysRst Length counter register (bits 28:0) */ + sysrst_cnt = (0x1fff readl(KW_REG_SYSRST_CNT)); + printf(H/w Rst hold time: %d.%d secs\n, + sysrst_cnt/SYSRST_CNT_1SEC_VAL, + sysrst_cnt%SYSRST_CNT_1SEC_VAL); + + /* clear the counter for next valid read*/ + writel(1 31, KW_REG_SYSRST_CNT); + + /* +* sysrst_action: +* if H/w Reset key is pressed and hold for time +* more than sysrst_dly in seconds +*/ + if (sysrst_cnt = SYSRST_CNT_1SEC_VAL * sysrst_dly) + kw_sysrst_action(); +} + #if defined(CONFIG_DISPLAY_CPUINFO) int print_cpuinfo(void) { @@ -298,6 +374,9 @@ int arch_misc_init(void) temp = get_cr(); set_cr(temp ~CR_V); + /* checks and execute resset to factory event */ + kw_sysrst_check(); + return 0; } #endif /* CONFIG_ARCH_MISC_INIT */ diff --git a/include/asm-arm/arch-kirkwood/cpu.h b/include/asm-arm/arch-kirkwood/cpu.h index d1440af..b3022a3 100644 --- a/include/asm-arm/arch-kirkwood/cpu.h +++ b/include/asm-arm/arch-kirkwood/cpu.h @@ -36,6 +36,8 @@ ((_x ? KW_EGIGA0_BASE : KW_EGIGA1_BASE) + 0x44c) #define KW_REG_DEVICE_ID (KW_MPP_BASE + 0x34) +#define
Re: [U-Boot] Kirkwood gpio
Hello Alessandro, Alessandro Rubini wrote: I'd prefer tout = DIV_ROUND_UP(tout*CONFIG_SYS_HZ, 1000); Ok for me. BTW: Looking for DIV_ROUND_UP, I found that it's defined in ./include/asm/arch-kirkwood/gpio.h as well. I was checking whether it can be removed, but it looks like nobody is using the driver. tornado$ grep -r CONFIG_KIRKWOOD_GPIO . ./drivers/gpio/Makefile:COBJS-$(CONFIG_KIRKWOOD_GPIO) += kw_gpio.o The header and C file were added on Jun 29th, but there's not user yet. It has been tested by Heiko on the Suen3, but it's not mainline. And even that patch doesn't define CONFIG_KIRKWOOD_GPIO . This board will come soon with I2C bitbang support, which uses this driver. But this driver comes from Dieter Kiermaier, and I thought it is used from others too ... bye Heiko ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Kirkwood gpio (was: timeout calculati on underflow if imprecise 1kHz timer: fix)
Hi Alessandro, I'd prefer tout = DIV_ROUND_UP(tout*CONFIG_SYS_HZ, 1000); Ok for me. BTW: Looking for DIV_ROUND_UP, I found that it's defined in ./include/asm/arch-kirkwood/gpio.h as well. I was checking whether it can be removed, but it looks like nobody is using the driver. tornado$ grep -r CONFIG_KIRKWOOD_GPIO . ./drivers/gpio/Makefile:COBJS-$(CONFIG_KIRKWOOD_GPIO) += kw_gpio.o The header and C file were added on Jun 29th, but there's not user yet. It has been tested by Heiko on the Suen3, but it's not mainline. And even that patch doesn't define CONFIG_KIRKWOOD_GPIO . I'm working on a bitbanging FPGA load driver based on kirkwood gpio driver at the moment. But I'm on holiday for the next 3 weeks. After it planning to submit new Lattice fpga load driver which uses kirkwood gpio driver. Dieter /alessandro ___ 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] [PATCH] net: kirkwood: updates: used eth_setenv_enetaddr api
eth_setenv_enetaddr is avaible by upper layer using this saves 204 bytes on total image size Signed-off-by: Prafulla Wadaskar prafu...@marvell.com --- drivers/net/kirkwood_egiga.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/kirkwood_egiga.c b/drivers/net/kirkwood_egiga.c index 3d908f8..1a208f2 100644 --- a/drivers/net/kirkwood_egiga.c +++ b/drivers/net/kirkwood_egiga.c @@ -606,7 +606,7 @@ int kirkwood_egiga_initialize(bd_t * bis) struct kwgbe_device *dkwgbe; struct eth_device *dev; int devnum; - char *s, buf[NAMESIZE * 2]; + char *s; u8 used_ports[MAX_KWGBE_DEVS] = CONFIG_KIRKWOOD_EGIGA_PORTS; for (devnum = 0; devnum MAX_KWGBE_DEVS; devnum++) { @@ -665,10 +665,13 @@ int kirkwood_egiga_initialize(bd_t * bis) while (!eth_getenv_enetaddr(s, dev-enetaddr)) { /* Generate Ramdom MAC addresses if not set */ - sprintf(buf, 00:50:43:%02x:%02x:%02x, - get_random_hex(), get_random_hex(), - get_random_hex()); - setenv(s, buf); + dev-enetaddr[0] = 0x00; + dev-enetaddr[1] = 0x50; + dev-enetaddr[2] = 0x43; + dev-enetaddr[3] = get_random_hex(); + dev-enetaddr[4] = get_random_hex(); + dev-enetaddr[5] = get_random_hex(); + eth_setenv_enetaddr(s, dev-enetaddr); } dev-init = (void *)kwgbe_init; -- 1.5.3.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/4] Network defrag
I finally fixed the defrag code, testing with NFS as well. Didn't take performance figures, tough, for lack of time. I wanted to do config + environment for the NFS case, like tftp, but didnt' do the second step out of laziness (also, the source file has long lines while I have 80 columns). For the record, I added the check on ip_src and ip_dst, but everything stopped working. So I reverted that instead of entering a long debugging session. The CONFIG_NET_MAXDEFRAG argument is the actual payload, so I add NFS overhead to that figure, which is expected to a beautiful 4096 or 8192. I feel this is better than other options, as the person writing the config is not expected to know how much protocol overhead is there. Alessandro Rubini (4): net: defragment IP packets tftp: get the tftp block size from config file and from the environment nfs: accept CONFIG_NFS_READ_SIZE from config file arm nomadik: activate defrag choose 4k transfer block size include/configs/nhk8815.h |4 + net/net.c | 188 +++- net/nfs.h | 10 ++- net/tftp.c| 13 +++- 4 files changed, 206 insertions(+), 9 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] net: defragment IP packets
The defragmenting code is enabled by CONFIG_IP_DEFRAG; the code is useful for TFTP and NFS transfers. The user can specify the maximum defragmented payload as CONFIG_NET_MAXDEFRAG (default 16k). Since NFS has a bigger per-packet overhead than TFTP, the static reassembly buffer can hold CONFIG_NET_MAXDEFRAG + the NFS overhead. The packet buffer is used as an array of hole structures, acting as a double-linked list. Each new fragment can split a hole in two, reduce a hole or fill a hole. No support is there for a fragment overlapping two diffrent holes (i.e., thre new fragment is across an already-received fragment). Signed-off-by: Alessandro Rubini rub...@gnudd.com --- net/net.c | 188 +++-- 1 files changed, 183 insertions(+), 5 deletions(-) diff --git a/net/net.c b/net/net.c index 641c37c..986d614 100644 --- a/net/net.c +++ b/net/net.c @@ -1117,6 +1117,176 @@ static void CDPStart(void) } #endif +#ifdef CONFIG_IP_DEFRAG +/* + * This function collects fragments in a single packet, according + * to the algorithm in RFC815. It returns NULL or the pointer to + * a complete packet, in static storage + */ +#ifndef CONFIG_NET_MAXDEFRAG +#define CONFIG_NET_MAXDEFRAG 16384 +#endif +/* + * MAXDEFRAG, above, is chosen in the config file and is real data + * so we need to add the NFS overhead, which is more than TFTP. + * To use sizeof in the internal unnamed structures, we need a real + * instance (can't do sizeof(struct rpc_t.u.reply)), unfortunately). + * The compiler doesn't complain nor allocates the actual structure + */ +static struct rpc_t rpc_specimen; +#define IP_PKTSIZE (CONFIG_NET_MAXDEFRAG + sizeof(rpc_specimen.u.reply)) + +#define IP_MAXUDP (IP_PKTSIZE - IP_HDR_SIZE_NO_UDP) + +/* + * this is the packet being assembled, either data or frag control. + * Fragments go by 8 bytes, so this union must be 8 bytes long + */ +struct hole { + /* first_byte is address of this structure */ + u16 last_byte; /* last byte in this hole + 1 (begin of next hole) */ + u16 next_hole; /* index of next (in 8-b blocks), 0 == none */ + u16 prev_hole; /* index of prev, 0 == none */ + u16 unused; +}; + +static IP_t *__NetDefragment(IP_t *ip, int *lenp) +{ + static uchar pkt_buff[IP_PKTSIZE] __attribute__((aligned(PKTALIGN))); + static u16 first_hole, total_len; + struct hole *payload, *thisfrag, *h, *newh; + IP_t *localip = (IP_t *)pkt_buff; + uchar *indata = (uchar *)ip; + int offset8, start, len, done = 0; + u16 ip_off = ntohs(ip-ip_off); + + /* payload starts after IP header, this fragment is in there */ + payload = (struct hole *)(pkt_buff + IP_HDR_SIZE_NO_UDP); + offset8 = (ip_off IP_OFFS); + thisfrag = payload + offset8; + start = offset8 * 8; + len = ntohs(ip-ip_len) - IP_HDR_SIZE_NO_UDP; + + if (start + len IP_MAXUDP) /* fragment extends too far */ + return NULL; + + if (!total_len || localip-ip_id != ip-ip_id) { + /* new (or different) packet, reset structs */ + total_len = 0x; + payload[0].last_byte = ~0; + payload[0].next_hole = 0; + payload[0].prev_hole = 0; + first_hole = 0; + /* any IP header will work, copy the first we received */ + memcpy(localip, ip, IP_HDR_SIZE_NO_UDP); + } + + /* +* What follows is the reassembly algorithm. We use the payload +* array as a linked list of hole descriptors, as each hole starts +* at a multiple of 8 bytes. However, last byte can be whatever value, +* so it is represented as byte count, not as 8-byte blocks. +*/ + + h = payload + first_hole; + while (h-last_byte start) { + if (!h-next_hole) { + /* no hole that far away */ + return NULL; + } + h = payload + h-next_hole; + } + + if (offset8 + (len / 8) = h - payload) { + /* no overlap with holes (dup fragment?) */ + return NULL; + } + + if (!(ip_off IP_FLAGS_MFRAG)) { + /* no more fragmentss: truncate this (last) hole */ + total_len = start + len; + h-last_byte = start + len; + } + + /* +* There is some overlap: fix the hole list. This code doesn't +* deal with a fragment that overlaps with two different holes +* (thus being a superset of a previously-received fragment). +*/ + + if ( (h = thisfrag) (h-last_byte = start + len) ) { + /* complete overlap with hole: remove hole */ + if (!h-prev_hole !h-next_hole) { + /* last remaining hole */ + done = 1; + } else if (!h-prev_hole) { + /* first hole */ +
[U-Boot] [PATCH 2/4] tftp: get the tftp block size from config file and from the environment
Increasing the block size is useful if CONFIG_IP_DEFRAG is used. Howerver, the last fragments in a burst may overflow the receiving ethernet, so the default is left at 1468, with thre new CONFIG_TFTP_BLOCKSIZE for config files. Further, tftpblocksize can be set in the environment. Signed-off-by: Alessandro Rubini rub...@gnudd.com --- net/tftp.c | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/net/tftp.c b/net/tftp.c index b0f1cca..34b79c4 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -86,8 +86,14 @@ extern flash_info_t flash_info[]; /* 512 is poor choice for ethernet, MTU is typically 1500. * Minus eth.hdrs thats 1468. Can get 2x better throughput with * almost-MTU block sizes. At least try... fall back to 512 if need be. + * (but those using CONFIG_IP_DEFRAG may want to set a larger block in cfg file) */ +#ifdef CONFIG_TFTP_BLOCKSIZE +#define TFTP_MTU_BLOCKSIZE CONFIG_TFTP_BLOCKSIZE +#else #define TFTP_MTU_BLOCKSIZE 1468 +#endif + static unsigned short TftpBlkSize=TFTP_BLOCK_SIZE; static unsigned short TftpBlkSizeOption=TFTP_MTU_BLOCKSIZE; @@ -475,9 +481,12 @@ TftpTimeout (void) void TftpStart (void) { -#ifdef CONFIG_TFTP_PORT char *ep; /* Environment pointer */ -#endif + + /* Allow the user to choose tftpblocksize */ + if ((ep = getenv(tftpblocksize)) != NULL) + TftpBlkSizeOption = simple_strtol(ep, NULL, 10); + debug(tftp block size is %i\n, TftpBlkSizeOption); TftpServerIP = NetServerIP; if (BootFile[0] == '\0') { -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/4] nfs: accept CONFIG_NFS_READ_SIZE from config file
To take advantage of defragmented packets, the config file can define CONFIG_NFS_READ_SIZE to override the 1kB default. No support is there for an environment variable by now. Signed-off-by: Alessandro Rubini rub...@gnudd.com --- net/nfs.h | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/net/nfs.h b/net/nfs.h index 712afa0..de8a0c6 100644 --- a/net/nfs.h +++ b/net/nfs.h @@ -38,8 +38,14 @@ /* Block size used for NFS read accesses. A RPC reply packet (including all * headers) must fit within a single Ethernet frame to avoid fragmentation. - * Chosen to be a power of two, as most NFS servers are optimized for this. */ -#define NFS_READ_SIZE 1024 + * However, if CONFIG_IP_DEFRAG is set, the config file may want to use a + * bigger value. In any case, most NFS servers are optimized for a power of 2. + */ +#ifdef CONFIG_NFS_READ_SIZE +#define NFS_READ_SIZE CONFIG_NFS_READ_SIZE +#else +#define NFS_READ_SIZE 1024 /* biggest power of two that fits Ether frame */ +#endif #define NFS_MAXLINKDEPTH 16 -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4] arm nomadik: activate defrag choose 4k transfer block size
This chooses 4kB data size for both TFTP and NFS, as an example about how to use support for IP fragments. Signed-off-by: Alessandro Rubini rub...@gnudd.com --- include/configs/nhk8815.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/configs/nhk8815.h b/include/configs/nhk8815.h index 67b72dc..4c3c4f8 100644 --- a/include/configs/nhk8815.h +++ b/include/configs/nhk8815.h @@ -147,6 +147,10 @@ #define CONFIG_SMC_USE_32_BIT #define CONFIG_BOOTFILEuImage +#define CONFIG_IP_DEFRAG /* Allows faster download, TFTP and NFS */ +#define CONFIG_TFTP_BLOCKSIZE 4096 +#define CONFIG_NFS_READ_SIZE 4096 + /* Storage information: onenand and nand */ #define CONFIG_CMD_ONENAND #define CONFIG_MTD_ONENAND_VERIFY_WRITE -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm: Sheevaplug: Fixed NAND specific warning
It is recommended to define the macro CONFIG_SYS_64BIT_VSPRINTF for NAND specific warning removal, same is done in this patch Signed-off-by: Prafulla Wadaskar prafu...@marvell.com --- include/configs/sheevaplug.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h index fc401a8..1f95a3c 100644 --- a/include/configs/sheevaplug.h +++ b/include/configs/sheevaplug.h @@ -107,6 +107,7 @@ #define NAND_MAX_CHIPS 1 #define CONFIG_SYS_NAND_BASE 0xD800 /* KW_DEFADR_NANDF */ #define NAND_ALLOW_ERASE_ALL 1 +#define CONFIG_SYS_64BIT_VSPRINTF /* needed for nand_util.c */ #endif /* -- 1.5.3.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix
Ok, for the change. What is the preferred way to proceed? have I got to resubmit a patch for the change with the DIV_ROUND_UP macro? Best regards, Renato Andreola Wolfgang Denk wrote: Dear Renato Andreola, In message 4a7be28a.8080...@imagos.it you wrote: I'd like to clarify what is the problem with the timeout and the Intel flash (even if the following comments can be obvious or already well known) and to ask you an opinion on a small code change. Thanks. ... I think that an expression like this #if CONFIG_SYS_HZ != 1000 if ((ulong)CONFIG_SYS_HZ 1) tout *= ((ulong)CONFIG_SYS_HZ)/1000; /* for a big HZ, avoid overflow */ else tout = (tout * (ulong)CONFIG_SYS_HZ + 500) / 1000; #endif could be better because - it forces the data type of the system dependent CONFIG_SYS_HZ value to ulong (no float!) - it rounds tout to 0.5 timer tick and leaves tout unchanged if CONFIG_SYS_HZ == 1000 What do you think about? I'd prefer tout = DIV_ROUND_UP(tout*CONFIG_SYS_HZ, 1000); Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] stx: add support for STx amc8548 board
On Aug 7, 2009, at 12:28 AM, oa...@yahoo.com wrote: From: Alex Dubov oa...@yahoo.com This board, intended for RapidIO development, has following features: * RapidIO interface to backplane * No PCI * USB controller on LBC (not currently enabled) * 16MiB Spansion flash * one soDIMM DDR2 slot Environment is set to its own, smaller eraseblock near the end of FLASH chip. Signed-off-by: Alex Dubov oa...@yahoo.com --- MAINTAINERS |4 + Makefile |3 + board/stx/common/ddr.c| 11 +- board/stx/stxamc8548/Makefile | 52 ++ board/stx/stxamc8548/config.mk| 32 board/stx/stxamc8548/stxamc8548.c | 215 board/stx/stxamc8548/tlb.c| 84 + board/stx/stxamc8548/u-boot.lds | 152 + include/configs/stxamc8548.h | 334 + 9 files changed, 886 insertions(+), 1 deletions(-) create mode 100644 board/stx/stxamc8548/Makefile create mode 100644 board/stx/stxamc8548/config.mk create mode 100644 board/stx/stxamc8548/stxamc8548.c create mode 100644 board/stx/stxamc8548/tlb.c create mode 100644 board/stx/stxamc8548/u-boot.lds create mode 100644 include/configs/stxamc8548.h Please add the new board to MAKEALL. diff --git a/board/stx/stxamc8548/config.mk b/board/stx/stxamc8548/ config.mk new file mode 100644 index 000..923828b --- /dev/null +++ b/board/stx/stxamc8548/config.mk @@ -0,0 +1,32 @@ +# +# Copyright 2009 Alex Dubov oa...@yahoo.com +# +# 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 +# + +# +# STx amc8548 board +# +ifndef TEXT_BASE +TEXT_BASE = 0xfffc +endif + +PLATFORM_CPPFLAGS += -DCONFIG_E500=1 +PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1 +PLATFORM_CPPFLAGS += -DCONFIG_MPC8548=1 these PLATFORM_CPPFLAGS are not needed, please don't add them. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fdt: Fix fdt_pci_dma_ranges handling of 64-bit ranges
On Aug 5, 2009, at 9:03 AM, Kumar Gala wrote: If the size of a region equal to 4G it can't be represnted in a 32-bit BAR so we should have marked that case as MEM64. Additionally bump the number of inbound windows up to 4 to handle the fact that Freescale PPCs that have an implicit window for CCSRBAR. Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- common/fdt_support.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Can you look at picking this up as a fix for v2009.08. Its a pretty trivial change. - k diff --git a/common/fdt_support.c b/common/fdt_support.c index fc077e8..89164a1 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -625,7 +625,7 @@ int fdt_resize(void *blob) } #ifdef CONFIG_PCI -#define CONFIG_SYS_PCI_NR_INBOUND_WIN 3 +#define CONFIG_SYS_PCI_NR_INBOUND_WIN 4 #define FDT_PCI_PREFETCH (0x4000) #define FDT_PCI_MEM32 (0x0200) @@ -655,7 +655,7 @@ int fdt_pci_dma_ranges(void *blob, int phb_off, struct pci_controller *hose) { size = (u64)hose-regions[r].size; dma_range[0] = 0; - if (size 0x1ull) + if (size = 0x1ull) dma_range[0] |= FDT_PCI_MEM64; else dma_range[0] |= FDT_PCI_MEM32; -- 1.6.0.6 ___ 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] [PATCH v2] 85xx: Add a 36-bit physical configuration for MPC8536DS
Dear Kumar Gala, In message 1249605002-5277-1-git-send-email-ga...@kernel.crashing.org you wrote: We move all IO addressed (CCSR, localbus, PCI) above the 4G boundary to allow for larger memory sizes. Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- Makefile|5 ++- include/configs/MPC8536DS.h | 82 +- 2 files changed, 76 insertions(+), 11 deletions(-) Acked-by: Wolfgang Denk w...@denx.de 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 Ein weiser Herrscher kann in einem großen Land mehr Gutes bewirken als in einem kleinen - ein dummer Herrscher aber auch viel mehr Un- fug. Da weise Herrscher seltener sind als dumme, war ich schon immer gegen große Reiche skeptisch. - Herbert Rosendorfer ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Add support to mkconfig for setting simple #defines in config.h
To simplify the top level makefile it useful to be able to set some #defines in config.h to express different configurations. Added a -D option that allows us to replace: MPC8536DS_36BIT_config \ MPC8536DS_config: unconfig @mkdir -p $(obj)include @echo #define CONFIG_$(@:_config=) 1 $(obj)include/config.h @$(MKCONFIG) -a MPC8536DS ppc mpc85xx mpc8536ds freescale with: MPC8536DS_36BIT_config \ MPC8536DS_config: unconfig @$(MKCONFIG) -D $(@:_config=)=1 MPC8536DS ppc mpc85xx mpc8536ds freescale Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- mkconfig |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/mkconfig b/mkconfig index b0bbbd1..8d778e5 100755 --- a/mkconfig +++ b/mkconfig @@ -10,12 +10,14 @@ APPEND=no # Default: Create new config file BOARD_NAME= # Name to print in make output +DEFINES= while [ $# -gt 0 ] ; do case $1 in --) shift ; break ;; -a) shift ; APPEND=yes ;; -n) shift ; BOARD_NAME=${1%%_config} ; shift ;; + -D) shift ; DEFINES=#define ${1/=/\t}\n${DEFINES} ; shift ;; *) break ;; esac done @@ -84,5 +86,7 @@ fi echo /* Automatically generated - do not edit */ config.h echo #include configs/$1.h config.h echo #include asm/config.h config.h +echo -e ${DEFINES} config.h + exit 0 -- 1.6.0.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] NAND booting of MPC8313 based Custom board
On Fri, Aug 07, 2009 at 09:19:07PM +0530, Rupesh Kumar wrote: Hi Thanks for the reply. I get NAN DSPL - U-Boot 1.3.0-S600-Ver1.1 (Aug 8 2009 - 02:24:03) MPC83XX NAN DSPL - U-Boot 1.3.0-S600-Ver1.1 (Aug 8 2009 - 02:24:03) MPC83XX Loading from NAND : Why did you go back to the old BSP u-boot? I think the boot loader0 is failing to read the nand properly and it is readig zero's. Can u please tell is there something i am missing. We're missing a lot -- the rest of the source to that file, since it's not part of mainline u-boot. If you want to try something similar with mainline, the file to look at is nand_spl/nand_boot_fsl_elbc.c. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] NAND booting of MPC8313 based Custom board
NAN DSPL - U-Boot 1.3.0-S600-Ver1.1 (Aug 8 2009 - 02:24:03) MPC83XX NAN DSPL - U-Boot 1.3.0-S600-Ver1.1 (Aug 8 2009 - 02:24:03) MPC83XX Loading from NAND : I think the boot loader0 is failing to read the nand properly and it is readig zero's. Can u please tell is there something i am missing. I believe that there was a slight issue with reading of the large page flash with version 1.3.x. I believe it was reading the wrong oob bytes to check for bad NAND blocks. I can't remember when it was fixed, but I know that it is resolved in the most current u-boot. Try the most current u-boot and report back if the issue persists. Ron ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] pci/fsl_pci_init: Rework PCI ATMU setup to handle 4G of memory
The old PCI ATMU setup code would just mimic the PCI regions into the ATMU registers. For simple memory maps in which all memory, MMIO, etc space fit into 4G this works ok. However there are issues with we have 4G of memory as we know can't access all of memory and we need to ensure that PCICSRBAR (PEXCSRBAR on PCIe) isn't overlapping with anything since we can't turn it off. We first setup outbound windows based on what the board code setup in the pci regions for MMIO and IO access. Next we place PCICSRBAR below the MMIO window. After which we try to setup the inbound windows to map as much of memory as possible. On PCIe based controllers we are able to overmap the ATMU setup since RX TX links are separate but report the proper amount of inbound address space to the region tracking to ensure there is no overlap. On PCI based controllers we use as many inbound windows as available to map as much of the memory as possible. Additionally we changed all the CCSR register access to use proper IO accessor functions. Also had to add CONFIG_SYS_CCSRBAR_PHYS to some 86xx platforms that didn't have it defined. Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- drivers/pci/fsl_pci_init.c| 225 + include/configs/MPC8610HPCD.h |1 + include/configs/sbc8641d.h|1 + 3 files changed, 164 insertions(+), 63 deletions(-) diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c index 5c54c4f..a6c51ff 100644 --- a/drivers/pci/fsl_pci_init.c +++ b/drivers/pci/fsl_pci_init.c @@ -35,6 +35,7 @@ DECLARE_GLOBAL_DATA_PTR; */ #include pci.h +#include asm/io.h #include asm/fsl_pci.h /* Freescale-specific PCI config registers */ @@ -60,35 +61,98 @@ void pciauto_config_init(struct pci_controller *hose); #define CONFIG_SYS_PCI64_MEMORY_BUS (64ull*1024*1024*1024) #endif -static int fsl_pci_setup_inbound_windows(struct pci_region *r) +/* Setup one inbound ATMU window. + * + * We let the caller decide what the window size should be + */ +static void set_inbound_window(volatile pit_t *pi, + struct pci_region *r, + u64 size) +{ + u32 sz = (__ilog2_u64(size) - 1); + u32 flag = PIWAR_EN | PIWAR_LOCAL | + PIWAR_READ_SNOOP | PIWAR_WRITE_SNOOP; + + out_be32(pi-pitar, r-phys_start 12); + out_be32(pi-piwbar, r-bus_start 12); +#ifdef CONFIG_SYS_PCI_64BIT + out_be32(pi-piwbear, r-bus_start 44); +#else + out_be32(pi-piwbear, 0); +#endif + if (r-flags PCI_REGION_PREFETCH) + flag |= PIWAR_PF; + out_be32(pi-piwar, flag | sz); +} + +static int fsl_pci_setup_inbound_windows(struct pci_controller *hose, +u64 out_lo, u8 pcie_cap, +volatile pit_t *pi) { - struct pci_region *rgn_base = r; - u64 sz = min((u64)gd-ram_size, (1ull 32) - 1); + struct pci_region *r = hose-regions + hose-region_count; + u64 sz = min((u64)gd-ram_size, (1ull 32)); phys_addr_t phys_start = CONFIG_SYS_PCI_MEMORY_PHYS; pci_addr_t bus_start = CONFIG_SYS_PCI_MEMORY_BUS; - pci_size_t pci_sz = 1ull __ilog2_u64(sz); + pci_size_t pci_sz; - debug (R0 bus_start: %llx phys_start: %llx size: %llx\n, - (u64)bus_start, (u64)phys_start, (u64)pci_sz); - pci_set_region(r++, bus_start, phys_start, pci_sz, - PCI_REGION_MEM | PCI_REGION_SYS_MEMORY | - PCI_REGION_PREFETCH); + /* we have no space available for inbound memory mapping */ + if (bus_start out_lo) { + printf (no space for inbound mapping of memory\n); + return 0; + } - sz -= pci_sz; - bus_start += pci_sz; - phys_start += pci_sz; + /* limit size */ + if ((bus_start + sz) out_lo) { + sz = out_lo - bus_start; + debug (limiting size to %llx\n, sz); + } pci_sz = 1ull __ilog2_u64(sz); - if (sz) { - debug (R1 bus_start: %llx phys_start: %llx size: %llx\n, + /* +* we can overlap inbound/outbound windows on PCI-E since RX TX +* links a separate +*/ + if ((pcie_cap == PCI_CAP_ID_EXP) (pci_sz sz)) { + debug (R0 bus_start: %llx phys_start: %llx size: %llx\n, + (u64)bus_start, (u64)phys_start, (u64)sz); + pci_set_region(r, bus_start, phys_start, sz, + PCI_REGION_MEM | PCI_REGION_SYS_MEMORY | + PCI_REGION_PREFETCH); + + /* if we aren't an exact power of two match, pci_sz is smaller +* round it up to the next power of two. We report the actual +* size to pci region tracking. +*/ + if (pci_sz != sz) + sz = 2ull
Re: [U-Boot] [PATCH 3/4] stx: factor out common DIMM enumeration code
On Aug 7, 2009, at 12:28 AM, oa...@yahoo.com wrote: From: Alex Dubov oa...@yahoo.com Board specific ddr options are moved to the main board configuration file. Common DIMM enumeration code is factored out. Signed-off-by: Alex Dubov oa...@yahoo.com --- board/stx/common/Makefile |1 + board/stx/common/ddr.c| 43 + board/stx/stxgp3/Makefile |1 - board/stx/stxgp3/ddr.c| 76 - board/stx/stxgp3/stxgp3.c | 33 +++ board/stx/stxssa/Makefile |1 - board/stx/stxssa/ddr.c| 76 - board/stx/stxssa/stxssa.c | 33 +++ 8 files changed, 110 insertions(+), 154 deletions(-) create mode 100644 board/stx/common/ddr.c delete mode 100644 board/stx/stxgp3/ddr.c delete mode 100644 board/stx/stxssa/ddr.c diff --git a/board/stx/common/Makefile b/board/stx/common/Makefile index 73c6e46..b80570c 100644 --- a/board/stx/common/Makefile +++ b/board/stx/common/Makefile @@ -30,6 +30,7 @@ endif LIB = $(obj)lib$(VENDOR).a COBJS-${CONFIG_MPC85xx} += law.o +COBJS-${CONFIG_MPC85xx} += ddr.o keep this in alphabetic order SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(COBJS-y)) diff --git a/board/stx/common/ddr.c b/board/stx/common/ddr.c new file mode 100644 index 000..401f632 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] 85xx: Remove unused CONFIG_CLEAR_LAW0 defines
On Aug 4, 2009, at 5:38 PM, Peter Tyser wrote: Signed-off-by: Peter Tyser pty...@xes-inc.com --- include/configs/ATUM8548.h |1 - include/configs/MPC8548CDS.h |1 - include/configs/sbc8548.h|1 - 3 files changed, 0 insertions(+), 3 deletions(-) applied to next. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] stx: create common vendor/board hierarchy for STx boards
On Aug 7, 2009, at 12:28 AM, oa...@yahoo.com wrote: From: Alex Dubov oa...@yahoo.com Move files belonging to the STx boards into common vendor directory and update the Makefile to reflect this. Signed-off-by: Alex Dubov oa...@yahoo.com --- Makefile|6 +++--- board/{ = stx}/stxgp3/Makefile |0 board/{ = stx}/stxgp3/config.mk|0 board/{ = stx}/stxgp3/ddr.c|0 board/{ = stx}/stxgp3/flash.c |0 board/{ = stx}/stxgp3/law.c|0 board/{ = stx}/stxgp3/stxgp3.c |0 board/{ = stx}/stxgp3/tlb.c|0 board/{ = stx}/stxgp3/u-boot.lds |0 board/{ = stx}/stxssa/Makefile |0 board/{ = stx}/stxssa/config.mk|0 board/{ = stx}/stxssa/ddr.c|0 board/{ = stx}/stxssa/law.c|0 board/{ = stx}/stxssa/stxssa.c |0 board/{ = stx}/stxssa/tlb.c|0 board/{ = stx}/stxssa/u-boot.lds |0 board/{ = stx}/stxxtc/Makefile |0 board/{ = stx}/stxxtc/config.mk|0 board/{ = stx}/stxxtc/stxxtc.c |0 board/{ = stx}/stxxtc/u-boot.lds |0 board/{ = stx}/stxxtc/u-boot.lds.debug |0 21 files changed, 3 insertions(+), 3 deletions(-) rename board/{ = stx}/stxgp3/Makefile (100%) rename board/{ = stx}/stxgp3/config.mk (100%) rename board/{ = stx}/stxgp3/ddr.c (100%) rename board/{ = stx}/stxgp3/flash.c (100%) rename board/{ = stx}/stxgp3/law.c (100%) rename board/{ = stx}/stxgp3/stxgp3.c (100%) rename board/{ = stx}/stxgp3/tlb.c (100%) rename board/{ = stx}/stxgp3/u-boot.lds (100%) rename board/{ = stx}/stxssa/Makefile (100%) rename board/{ = stx}/stxssa/config.mk (100%) rename board/{ = stx}/stxssa/ddr.c (100%) rename board/{ = stx}/stxssa/law.c (100%) rename board/{ = stx}/stxssa/stxssa.c (100%) rename board/{ = stx}/stxssa/tlb.c (100%) rename board/{ = stx}/stxssa/u-boot.lds (100%) rename board/{ = stx}/stxxtc/Makefile (100%) rename board/{ = stx}/stxxtc/config.mk (100%) rename board/{ = stx}/stxxtc/stxxtc.c (100%) rename board/{ = stx}/stxxtc/u-boot.lds (100%) rename board/{ = stx}/stxxtc/u-boot.lds.debug (100%) applied to 85xx next. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] xes: Use proper IO access functions
On Aug 4, 2009, at 5:47 PM, Peter Tyser wrote: Also fix some minor whitespace oddities while we're cleaning up Signed-off-by: Peter Tyser pty...@xes-inc.com --- board/xes/common/fsl_8xxx_clk.c |6 ++-- board/xes/common/fsl_8xxx_pci.c | 46 +- board/xes/xpedite5200/xpedite5200.c | 17 ++--- board/xes/xpedite5370/xpedite5370.c |8 +++--- 4 files changed, 38 insertions(+), 39 deletions(-) Can I get you to respin thus on the 85xx next branch. thanks - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2 v2] 85xx: CONFIG_MP Boot Page Translation update
On Aug 5, 2009, at 5:23 PM, Peter Tyser wrote: Previously, when CONFIG_MP was defined Boot Page Translation was unconditionally enabled and secondary cores were put in a spin loop at address 0xf000. The 0xfxxx address range (ie the Boot Page) was being remapped to SDRAM via the BPTR register. This change puts secondary cores into spin loops at their 'true' address in SDRAM and doesn't require Boot Page Translation to always be enabled. The main advantage of this change is that Boot Page Translation can be disabled after the secondary cores are brought up which allows the memory region at 0xfxxx to be used for other peripherals, etc. By default, Boot Page Translation remains enabled while U-Boot executes. A new CONFIG_MPC8xxx_DISABLE_BPTR define has been added which causes Boot Page Translation to be disabled for those boards which wish to use the 0xfxxx address range as part of their normal memory map. Signed-off-by: Peter Tyser pty...@xes-inc.com --- Changes since v1: - Use clrbits_be32() instead of in/out_be32() This is very similar to 85xx: Fix mapping of 0xfxxx when CONFIG_MP The 2 differences are: - Boot page translation is only disabled when CONFIG_MPC8xxx_DISABLT_BPTR is defined. - Instead of zeroing out BPTR when disabling translation, this patch only disables translation, but maintins the translation address. This should make it easier to properly re-enable translation if need be. cpu/mpc85xx/mp.c | 22 -- cpu/mpc85xx/release.S | 30 +- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/cpu/mpc85xx/mp.c b/cpu/mpc85xx/mp.c index 76f02a4..53fc3be 100644 --- a/cpu/mpc85xx/mp.c +++ b/cpu/mpc85xx/mp.c @@ -129,7 +129,7 @@ ulong get_spin_addr(void) ulong addr = (ulong)__spin_table - (ulong)__secondary_start_page; - addr += 0xf000; + addr += determine_mp_bootpg(); changing this has some issues. We expect the the address that the spin table is at to be marked cache-inhibited. return addr; } @@ -137,7 +137,8 @@ ulong get_spin_addr(void) static void pq3_mp_up(unsigned long bootpg) { u32 up, cpu_up_mask, whoami; - u32 *table = (u32 *)get_spin_addr(); + /* The table is at 0xfxxx due to boot page translation below */ + u32 *table = (u32 *)(0xf000 | get_spin_addr()); volatile u32 bpcr; volatile ccsr_local_ecm_t *ecm = (void *) (CONFIG_SYS_MPC85xx_ECM_ADDR); volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); @@ -146,6 +147,8 @@ static void pq3_mp_up(unsigned long bootpg) int timeout = 10; whoami = in_be32(pic-whoami); + + /* Translate 0xfxxx 'bootpg' address range to SDRAM */ out_be32(ecm-bptr, 0x8000 | (bootpg 12)); /* disable time base at the platform */ @@ -194,6 +197,17 @@ static void pq3_mp_up(unsigned long bootpg) devdisr = ~(MPC85xx_DEVDISR_TB0 | MPC85xx_DEVDISR_TB1); out_be32(gur-devdisr, devdisr); + +#ifdef CONFIG_MPC8xxx_DISABLE_BPTR + /* + * Disabling Boot Page Translation allows the memory region 0xf000 + * to 0x to be used normally. Leaving Boot Page Translation + * enabled remaps 0xf000 to SDRAM which makes that memory region + * unusable for normal operation but it does allow OSes to easily + * reset a processor core to put it back into U-Boot's spinloop. + */ + clrbits_be32(ecm-bptr, 0x8000); +#endif } void cpu_mp_lmb_reserve(struct lmb *lmb) @@ -206,9 +220,13 @@ void cpu_mp_lmb_reserve(struct lmb *lmb) void setup_mp(void) { extern ulong __secondary_start_page; + extern ulong __bootpg_addr; ulong fixup = (ulong)__secondary_start_page; u32 bootpg = determine_mp_bootpg(); + /* Store the bootpg's SDRAM address for use by secondary CPU cores */ + __bootpg_addr = bootpg; + memcpy((void *)bootpg, (void *)fixup, 4096); flush_cache(bootpg, 4096); diff --git a/cpu/mpc85xx/release.S b/cpu/mpc85xx/release.S index fbefc2c..6799633 100644 --- a/cpu/mpc85xx/release.S +++ b/cpu/mpc85xx/release.S @@ -114,23 +114,38 @@ __secondary_start_page: stw r3,ENTRY_R6_UPPER(r10) stw r3,ENTRY_R6_LOWER(r10) + /* load r13 with the address of the 'bootpg' in SDRAM */ + lis r13,toreset(__bootpg_addr)@h + ori r13,r13,toreset(__bootpg_addr)@l + lwz r13,0(r13) + /* setup mapping for AS = 1, and jump there */ lis r11,(MAS0_TLBSEL(1)|MAS0_ESEL(1))@h mtspr SPRN_MAS0,r11 lis r11,(MAS1_VALID|MAS1_IPROT)@h ori r11,r11,(MAS1_TS|MAS1_TSIZE(BOOKE_PAGESZ_4K))@l mtspr SPRN_MAS1,r11 - lis r11,(0xf000|MAS2_I)@h - ori r11,r11,(0xf000|MAS2_I)@l + orisr11,r13,(MAS2_I)@h + ori r11,r13,(MAS2_I)@l mtspr
Re: [U-Boot] [v2][PATCH 1/2]Refactored common cpu specific code for 85xx/86xx into one file.
On Jul 31, 2009, at 1:37 AM, Poonam Aggrwal wrote: Removed same code pieces from cpu/mpc85xx/cpu.c and cpu/mpc86xx/cpu.c and moved to cpu/mpc8xxx/cpu.c(new file) Signed-off-by: Poonam Aggrwal poonam.aggr...@freescale.com --- - based of u-boot version 2009.08-rc1 - Changes over v1: Incorporated Wolfgang's comments Makefile |2 + cpu/mpc85xx/cpu.c| 70 + cpu/mpc86xx/cpu.c| 32 +--- cpu/mpc8xxx/Makefile | 25 cpu/mpc8xxx/cpu.c| 106 + + 5 files changed, 135 insertions(+), 100 deletions(-) create mode 100644 cpu/mpc8xxx/Makefile create mode 100644 cpu/mpc8xxx/cpu.c applied to 85xx next - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v2][PATCH 2/2] Removed CONFIG_NUM_CPUS from 85xx/86xx
On Jul 31, 2009, at 1:38 AM, Poonam Aggrwal wrote: The number of CPUs are getting detected dynamically by checking the processor SVR value. Also removed CONFIG_NUM_CPUS references from all the platforms with 85xx/86xx processors. This can help to use the same u-boot image across the platforms. Also revamped and corrected few Freescale Copyright messages. Signed-off-by: Poonam Aggrwal poonam.aggr...@freescale.com --- - based of 2009.08-rc1 - depends on the patch [PATCH 1/2] Refactored common cpu specific code for 85xx and 86xx into one file. - Changes over v1: Incorporated Wolfgang's comments common/cmd_mp.c |6 +- cpu/mpc85xx/cpu.c | 21 - cpu/mpc85xx/mp.c |6 +- cpu/mpc85xx/release.S | 25 +++- cpu/mpc85xx/speed.c |4 +- cpu/mpc86xx/cpu.c | 10 +++-- cpu/mpc86xx/cpu_init.c|4 +- cpu/mpc8xxx/cpu.c | 93 + +--- include/asm-ppc/config.h |7 +++ include/asm-ppc/global_data.h |1 + include/asm-ppc/processor.h |5 +- include/common.h |2 + include/configs/MPC8572DS.h |1 - include/configs/MPC8610HPCD.h |1 - include/configs/MPC8641HPCN.h |1 - include/configs/P2020DS.h |1 - include/configs/XPEDITE5170.h |1 - include/configs/XPEDITE5370.h |1 - include/configs/sbc8641d.h|1 - include/e500.h|6 +-- lib_ppc/board.c |3 + lib_ppc/bootm.c |2 +- 22 files changed, 127 insertions(+), 75 deletions(-) applied to 85xx next - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2] P2020RDB Support Added
On Jul 21, 2009, at 5:57 AM, Wolfgang Denk wrote: Which brings up the next question: Kumar: who is supposed to be responsible custodian for QorIQ code? Should we update / reorganize the list of custodians for Freescale's processors? QorIQ products fall into one of two categories. Either they are really 85xx products like p2020 and just renamed by marketing or they are based on the new corenet platform like p4080. Either way Andy I should be the custodians. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] P2020RDB Support Added
On Aug 5, 2009, at 2:59 AM, Poonam Aggrwal wrote: The code base adds P1 P2 RDB platforms support. The folder and file names can cater to future SOCs of P1/P2 family. P1 P2 processors are 85xx platforms, part of Freescale QorIQ series. Tested following on P2020RDB: 1. eTSECs 2. DDR, NAND, NOR, I2C. Signed-off-by: Poonam Aggrwal poonam.aggr...@freescale.com --- - Based of u-boot version 2009.08-rc1 - Incorporated comments of Wolfgang. - PCIe support not included, will send as separate patch after some more cleanup in generic 85xx. - get_ram_size implementation will be added as a separate patch over this. MAINTAINERS |4 + MAKEALL |1 + Makefile |5 + board/freescale/p1_p2_rdb/Makefile| 52 +++ board/freescale/p1_p2_rdb/config.mk | 32 ++ board/freescale/p1_p2_rdb/ddr.c | 244 +++ board/freescale/p1_p2_rdb/law.c | 37 +++ board/freescale/p1_p2_rdb/p1_p2_rdb.c | 223 + board/freescale/p1_p2_rdb/tlb.c | 83 + board/freescale/p1_p2_rdb/u-boot.lds | 143 + doc/README.p2020rdb | 145 + include/configs/P1_P2_RDB.h | 553 + 12 files changed, 1522 insertions(+), 0 deletions(-) create mode 100644 board/freescale/p1_p2_rdb/Makefile create mode 100644 board/freescale/p1_p2_rdb/config.mk create mode 100644 board/freescale/p1_p2_rdb/ddr.c create mode 100644 board/freescale/p1_p2_rdb/law.c create mode 100644 board/freescale/p1_p2_rdb/p1_p2_rdb.c create mode 100644 board/freescale/p1_p2_rdb/tlb.c create mode 100644 board/freescale/p1_p2_rdb/u-boot.lds create mode 100644 doc/README.p2020rdb create mode 100644 include/configs/P1_P2 applied to 85xx next - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v2][PATCH] Added P1020 Processor Support.
On Jul 31, 2009, at 1:38 AM, Poonam Aggrwal wrote: P1020 is another member of QorIQ series of processors which falls in ULE category. It is an e500 based dual core SOC. Being a scaled down version of P2020 it has following differences from P2020: - 533MHz - 800MHz core frequency. - 256Kbyte L2 cache - Ethernet controllers with classification capabilities. Also the SOC is pin compatible with P2020 Signed-off-by: Poonam Aggrwal poonam.aggr...@freescale.com --- - based of 2009.08-rc1 - depends on the patch [PATCH 1/2] Refactored common cpu specific code for 85xx and 86xx into one file. - Changes over v1: Incorporated Wolfgang's comments cpu/mpc85xx/Makefile|3 ++- cpu/mpc8xxx/cpu.c |2 ++ drivers/misc/fsl_law.c |2 +- include/asm-ppc/processor.h |2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) applied to 85xx next - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Dual-license IBM code contributions
It was brought to our attention that U-Boot contains code derived from the IBM OpenBIOS source code originally provided with some of the older PowerPC 4xx development boards. As a result, the original license of this code has been carried in the various files for a number of years in the U-Boot project. IBM is dual-licensing the IBM code contributions already present in U-Boot under either the terms of the GNU General Public License version 2, or the original code license already present. Signed-off-by: Josh Boyer jwbo...@linux.vnet.ibm.com --- diff --git a/board/cray/L1/init.S b/board/cray/L1/init.S index 4b6b3f4..d700ea7 100644 --- a/board/cray/L1/init.S +++ b/board/cray/L1/init.S @@ -1,5 +1,9 @@ /*--+ */ /* */ +/* This source code is dual-licensed. You may use it under the terms */ +/* of the GNU General Public License version 2, or under the license */ +/* below. */ +/* */ /* This source code has been made available to you by IBM on an AS-IS */ /* basis. Anyone receiving this source is licensed under IBM */ /* copyrights to use it in any way he or she deems fit, including */ diff --git a/board/csb272/init.S b/board/csb272/init.S index ab371f2..1cfef37 100644 --- a/board/csb272/init.S +++ b/board/csb272/init.S @@ -1,4 +1,6 @@ /** + * This source code is dual-licensed. You may use it under the terms of the + * GNU General Public License version 2, or under the license below. * * This source code has been made available to you by IBM on an AS-IS * basis. Anyone receiving this source is licensed under IBM diff --git a/board/csb472/init.S b/board/csb472/init.S index 4b6958a..2cf8afc 100644 --- a/board/csb472/init.S +++ b/board/csb472/init.S @@ -1,4 +1,6 @@ /** + * This source code is dual-licensed. You may use it under the terms of the + * GNU General Public License version 2, or under the license below. * * This source code has been made available to you by IBM on an AS-IS * basis. Anyone receiving this source is licensed under IBM diff --git a/board/eric/init.S b/board/eric/init.S index 2304cc7..4820dd0 100644 --- a/board/eric/init.S +++ b/board/eric/init.S @@ -1,5 +1,9 @@ /*--+ */ /* */ +/* This source code is dual-licensed. You may use it under the terms */ +/* of the GNU General Public License version 2, or under the license */ +/* below. */ +/* */ /* This source code has been made available to you by IBM on an AS-IS */ /* basis. Anyone receiving this source is licensed under IBM */ /* copyrights to use it in any way he or she deems fit, including */ diff --git a/board/esd/pci405/writeibm.S b/board/esd/pci405/writeibm.S index 9f5c35b..4e319c1 100644 --- a/board/esd/pci405/writeibm.S +++ b/board/esd/pci405/writeibm.S @@ -1,5 +1,9 @@ /*--+ */ /* */ +/* This source code is dual-licensed. You may use it under the terms */ +/* of the GNU General Public License version 2, or under the license */ +/* below. */ +/* */ /* This source code has been made available to you by IBM on an AS-IS */ /* basis. Anyone receiving this source is licensed under IBM */ /* copyrights to use it in any way he or she deems fit, including */ diff --git a/board/exbitgen/init.S b/board/exbitgen/init.S index 760835a..cb54874 100644 --- a/board/exbitgen/init.S +++ b/board/exbitgen/init.S @@ -1,4 +1,6 @@ /*--+ + * This source code is dual-licensed. You may use it under the terms of + * the GNU General Public License version 2, or under the license below. * * This source code has been made available to you by IBM on an AS-IS * basis. Anyone receiving this source is licensed under IBM diff --git a/board/jse/init.S b/board/jse/init.S index c564ed3..7b932b2 100644 --- a/board/jse/init.S +++ b/board/jse/init.S @@ -1,5 +1,9 @@ /*+ */ /* */ +/* This source code is dual-licensed. You may use it under the terms */ +/* of the GNU General Public License version 2, or under the license */ +/* below.
[U-Boot] [PATCH v2] xes: Use proper IO access functions
Also fix some minor whitespace oddities while we're cleaning up Signed-off-by: Peter Tyser pty...@xes-inc.com --- Changes since v1: - Rebase on 85xx next branch - Use setbits_be32() where possible board/xes/common/fsl_8xxx_clk.c |6 ++-- board/xes/common/fsl_8xxx_pci.c | 44 +- board/xes/xpedite5200/xpedite5200.c | 17 ++--- board/xes/xpedite5370/xpedite5370.c |8 +++--- 4 files changed, 37 insertions(+), 38 deletions(-) diff --git a/board/xes/common/fsl_8xxx_clk.c b/board/xes/common/fsl_8xxx_clk.c index 0155670..f4a17b7 100644 --- a/board/xes/common/fsl_8xxx_clk.c +++ b/board/xes/common/fsl_8xxx_clk.c @@ -21,6 +21,7 @@ */ #include common.h +#include asm/io.h /* * Return SYSCLK input frequency - 50 MHz or 66 MHz depending on POR config @@ -33,9 +34,8 @@ unsigned long get_board_sys_clk(ulong dummy) immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; volatile ccsr_gur_t *gur = immap-im_gur; #endif - u32 gpporcr = gur-gpporcr; - if (gpporcr 0x1) + if (in_be32(gur-gpporcr) 0x1) return ; else return 5000; @@ -49,7 +49,7 @@ unsigned long get_board_sys_clk(ulong dummy) unsigned long get_board_ddr_clk(ulong dummy) { volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); - u32 ddr_ratio = ((gur-porpllsr) 0x3e00) 9; + u32 ddr_ratio = (in_be32(gur-porpllsr) 0x3e00) 9; if (ddr_ratio == 0x7) return get_board_sys_clk(dummy); diff --git a/board/xes/common/fsl_8xxx_pci.c b/board/xes/common/fsl_8xxx_pci.c index 463588f..a615820 100644 --- a/board/xes/common/fsl_8xxx_pci.c +++ b/board/xes/common/fsl_8xxx_pci.c @@ -24,6 +24,7 @@ #include common.h #include pci.h #include asm/fsl_pci.h +#include asm/io.h #include libfdt.h #include fdt_support.h @@ -182,18 +183,18 @@ void pci_init_board(void) immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; volatile ccsr_gur_t *gur = immap-im_gur; #endif - uint devdisr = gur-devdisr; - uint io_sel = (gur-pordevsr MPC8xxx_PORDEVSR_IO_SEL) + uint devdisr = in_be32(gur-devdisr); + uint io_sel = (in_be32(gur-pordevsr) MPC8xxx_PORDEVSR_IO_SEL) MPC8xxx_PORDEVSR_IO_SEL_SHIFT; - uint host_agent = (gur-porbmsr MPC8xxx_PORBMSR_HA) + uint host_agent = (in_be32(gur-porbmsr) MPC8xxx_PORBMSR_HA) MPC8xxx_PORBMSR_HA_SHIFT; struct pci_region *r; #ifdef CONFIG_PCI1 - uint pci_spd_norm = (gur-pordevsr MPC85xx_PORDEVSR_PCI1_SPD); - uint pci_32 = gur-pordevsr MPC85xx_PORDEVSR_PCI1_PCI32; - uint pci_arb = gur-pordevsr MPC85xx_PORDEVSR_PCI1_ARB; - uint pcix = gur-pordevsr MPC85xx_PORDEVSR_PCI1; + uint pci_spd_norm = in_be32(gur-pordevsr) MPC85xx_PORDEVSR_PCI1_SPD; + uint pci_32 = in_be32(gur-pordevsr) MPC85xx_PORDEVSR_PCI1_PCI32; + uint pci_arb = in_be32(gur-pordevsr) MPC85xx_PORDEVSR_PCI1_ARB; + uint pcix = in_be32(gur-pordevsr) MPC85xx_PORDEVSR_PCI1; uint freq = CONFIG_SYS_CLK_FREQ / 1000 / 1000; width = 0; /* Silence compiler warning... */ @@ -203,12 +204,11 @@ void pci_init_board(void) host = host_agent_cfg[host_agent].pci_host[0]; r = hose-regions; - if (!(devdisr MPC85xx_DEVDISR_PCI1)) { printf(\nPCI1: %d bit %s, %s %d MHz, %s, %s\n, pci_32 ? 32 : 64, pcix ? PCIX : PCI, - pci_spd_norm ? = : =, + pci_spd_norm ? = : =, pcix ? freq * 2 : freq, host ? host : agent, pci_arb ? arbiter : external-arbiter); @@ -245,7 +245,7 @@ void pci_init_board(void) } #elif defined CONFIG_MPC8548 /* PCI1 not present on MPC8572 */ - gur-devdisr |= MPC85xx_DEVDISR_PCI1; /* disable */ + setbits_be32(gur-devdisr, MPC85xx_DEVDISR_PCI1); #endif #ifdef CONFIG_PCIE1 pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCIE1_ADDR; @@ -257,10 +257,10 @@ void pci_init_board(void) if (width !(devdisr MPC8xxx_DEVDISR_PCIE1)) { printf(\nPCIE1 connected as %s (x%d), host ? Root Complex : End Point, width); - if (pci-pme_msg_det) { - pci-pme_msg_det = 0x; + if (in_be32(pci-pme_msg_det)) { + out_be32(pci-pme_msg_det, 0x); debug( with errors. Clearing. Now 0x%08x, - pci-pme_msg_det); + in_be32(pci-pme_msg_det)); } printf(\n); @@ -293,7 +293,7 @@ void pci_init_board(void) hose-first_busno, hose-last_busno); } #else - gur-devdisr |= MPC8xxx_DEVDISR_PCIE1; /* disable */ +
Re: [U-Boot] [PATCH 0/2] P2020RDB Support Added
Dear Kumar Gala, In message c1e6cebe-ca48-48ed-b28c-04f3156bb...@freescale.com you wrote: Kumar: who is supposed to be responsible custodian for QorIQ code? Should we update / reorganize the list of custodians for Freescale's processors? QorIQ products fall into one of two categories. Either they are really 85xx products like p2020 and just renamed by marketing or they are based on the new corenet platform like p4080. Either way Andy I should be the custodians. OK, thanks; updated list of custodians accordingly. 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 Nobody trips over mountains. It is the small pebble that causes you to stumble. Pass all the pebbles in your path and you will find you have crossed the mountain. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Add support to mkconfig for setting simple #defines in config.h
On Fri, Aug 07, 2009 at 09:03:03AM -0500, Kumar Gala wrote: while [ $# -gt 0 ] ; do case $1 in --) shift ; break ;; -a) shift ; APPEND=yes ;; -n) shift ; BOARD_NAME=${1%%_config} ; shift ;; + -D) shift ; DEFINES=#define ${1/=/\t}\n${DEFINES} ; shift ;; How about something like: -D) shift ; DEFINES=${1//_/ } ${DEFINES}; shift ;; ... for i in ${DEFINES}; do echo #define CONFIG_${i} config.h done ? This would allow multiple underscore-separated booleans in the target name. If we really need values on the options, we could change CONFIG_${i} to CONFIG_${i/=/\t} similar to what you do above, and embed the =value in the target name (MPC83536DS_NAND_FOO=2_36BIT_BAR=blah ends up defining NAND, FOO as 2, 36BIT, and BAR as blah). I think simple bools (MPC8536DS_NAND_36BIT) will be enough until we get kconfig, though. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2] Don't inline weak symbols
From: Ron Lee r...@debian.org use the same dummy weak functions too it will save 200 bytes Signed-off-by: Ron Lee r...@debian.org update the implementation Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com --- lib_arm/board.c | 28 ++-- 1 files changed, 10 insertions(+), 18 deletions(-) diff --git a/lib_arm/board.c b/lib_arm/board.c index a44d308..37e4cc9 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -123,24 +123,16 @@ void *sbrk (ptrdiff_t increment) * May be supplied by boards if desired */ -void inline __coloured_LED_init (void) {} -void inline coloured_LED_init (void) __attribute__((weak, alias(__coloured_LED_init))); -void inline __red_LED_on (void) {} -void inline red_LED_on (void) __attribute__((weak, alias(__red_LED_on))); -void inline __red_LED_off(void) {} -void inline red_LED_off(void) __attribute__((weak, alias(__red_LED_off))); -void inline __green_LED_on(void) {} -void inline green_LED_on(void) __attribute__((weak, alias(__green_LED_on))); -void inline __green_LED_off(void) {} -void inline green_LED_off(void)__attribute__((weak, alias(__green_LED_off))); -void inline __yellow_LED_on(void) {} -void inline yellow_LED_on(void)__attribute__((weak, alias(__yellow_LED_on))); -void inline __yellow_LED_off(void) {} -void inline yellow_LED_off(void)__attribute__((weak, alias(__yellow_LED_off))); -void inline __blue_LED_on(void) {} -void inline blue_LED_on(void)__attribute__((weak, alias(__blue_LED_on))); -void inline __blue_LED_off(void) {} -void inline blue_LED_off(void)__attribute__((weak, alias(__blue_LED_off))); +void __coloured_dummy(void) {} +void coloured_LED_init(void) __attribute__((weak, alias(__coloured_dummy))); +void red_LED_on(void) __attribute__((weak, alias(__coloured_dummy))); +void red_LED_off(void) __attribute__((weak, alias(__coloured_dummy))); +void green_LED_on(void)__attribute__((weak, alias(__coloured_dummy))); +void green_LED_off(void) __attribute__((weak, alias(__coloured_dummy))); +void yellow_LED_on(void) __attribute__((weak, alias(__coloured_dummy))); +void yellow_LED_off(void) __attribute__((weak, alias(__coloured_dummy))); +void blue_LED_on(void) __attribute__((weak, alias(__coloured_dummy))); +void blue_LED_off(void)__attribute__((weak, alias(__coloured_dummy))); / * Init Utilities * -- 1.6.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: Sheevaplug: Fixed NAND specific warning
On 22:27 Fri 07 Aug , Prafulla Wadaskar wrote: It is recommended to define the macro CONFIG_SYS_64BIT_VSPRINTF for NAND specific warning removal, same is done in this patch Signed-off-by: Prafulla Wadaskar prafu...@marvell.com --- include/configs/sheevaplug.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) applied to u-boo-arm Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Subject: [PATCH] kirkwood/gpio.h: remove duplicate definition
On 12:35 Fri 07 Aug , Alessandro Rubini wrote: Signed-off-by: Alessandro Rubini rub...@gnudd.com --- To test the define is not really needed, I applied the suen3 patch and added CONFIG_KIRKWOOD_GPIO to the config file. Now back to defrag stuff. include/asm-arm/arch-kirkwood/gpio.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) applied to u-boo-arm Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/7] mxc-mmc: sdhc host driver for MX2 and MX3 proccessor
On 04:12 Mon 08 Jun , Ilya Yanok wrote: This is a port of Linux driver for SDHC host controller hardware found on Freescale's MX2 and MX3 processors. Uses new generic MMC framework (CONFIG_GENERIC_MMC) and it looks like there are some problems with a framework (at least on LE cpus). Some of these problems are addressed in the following patches. Signed-off-by: Ilya Yanok ya...@emcraft.com --- cpu/arm926ejs/mx27/generic.c | 16 ++ drivers/mmc/Makefile |1 + drivers/mmc/mxcmmc.c | 523 include/asm-arm/arch-mx27/mxcmmc.h | 25 ++ 4 files changed, 565 insertions(+), 0 deletions(-) create mode 100644 drivers/mmc/mxcmmc.c create mode 100644 include/asm-arm/arch-mx27/mxcmmc.h applied to u-boot-arm Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2 v2] 85xx: CONFIG_MP Boot Page Translation update
diff --git a/cpu/mpc85xx/mp.c b/cpu/mpc85xx/mp.c index 76f02a4..53fc3be 100644 --- a/cpu/mpc85xx/mp.c +++ b/cpu/mpc85xx/mp.c @@ -129,7 +129,7 @@ ulong get_spin_addr(void) ulong addr = (ulong)__spin_table - (ulong)__secondary_start_page; - addr += 0xf000; + addr += determine_mp_bootpg(); changing this has some issues. We expect the the address that the spin table is at to be marked cache-inhibited. The secondary cores will be running with the spin table in cache-inhibited memory and it looks like Linux accesses the spin table after ioremapping it, so that flow looks OK. I assumed the e500 Coherency Module will ensure that the cpu_status() function should also be OK as is. It looks like I should have added 2 cache flushes to U-Boot's cpu_release(), like: --- a/cpu/mpc85xx/mp.c +++ b/cpu/mpc85xx/mp.c @@ -106,9 +106,11 @@ int cpu_release(int nr, int argc, char *argv[]) table[BOOT_ENTRY_ADDR_UPPER] = (u32)(boot_addr 32); /* ensure all table updates complete before final address write */ - eieio(); + ppcDcbf((unsigned long)table); + asm(msync); table[BOOT_ENTRY_ADDR_LOWER] = (u32)(boot_addr 0x); + ppcDcbf((unsigned long)table); return 0; } I'll resubmit with the change above, let me know if I'm off base. Thanks, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] net: kirkwood: updates: used eth_setenv_enetaddr api
On 22:17 Fri 07 Aug , Prafulla Wadaskar wrote: eth_setenv_enetaddr is avaible by upper layer using this saves 204 bytes on total image size Signed-off-by: Prafulla Wadaskar prafu...@marvell.com --- drivers/net/kirkwood_egiga.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/kirkwood_egiga.c b/drivers/net/kirkwood_egiga.c index 3d908f8..1a208f2 100644 --- a/drivers/net/kirkwood_egiga.c +++ b/drivers/net/kirkwood_egiga.c @@ -606,7 +606,7 @@ int kirkwood_egiga_initialize(bd_t * bis) struct kwgbe_device *dkwgbe; struct eth_device *dev; int devnum; - char *s, buf[NAMESIZE * 2]; + char *s; u8 used_ports[MAX_KWGBE_DEVS] = CONFIG_KIRKWOOD_EGIGA_PORTS; for (devnum = 0; devnum MAX_KWGBE_DEVS; devnum++) { @@ -665,10 +665,13 @@ int kirkwood_egiga_initialize(bd_t * bis) while (!eth_getenv_enetaddr(s, dev-enetaddr)) { /* Generate Ramdom MAC addresses if not set */ - sprintf(buf, 00:50:43:%02x:%02x:%02x, - get_random_hex(), get_random_hex(), - get_random_hex()); - setenv(s, buf); + dev-enetaddr[0] = 0x00; + dev-enetaddr[1] = 0x50; + dev-enetaddr[2] = 0x43; + dev-enetaddr[3] = get_random_hex(); + dev-enetaddr[4] = get_random_hex(); + dev-enetaddr[5] = get_random_hex(); + eth_setenv_enetaddr(s, dev-enetaddr); it will be also good to use a private mac address dev-enetaddr[0] = 0x02; Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv3 2/5] omap3: embedd gpmc_cs into gpmc config struct
Dear Matthias Ludwig, In message 4a7b8b5de50ee2b17fba444c8816c35d1fda1477.1242716287.git.mlud...@ultratronik.de you wrote: Embedd chip select configuration into struct for gpmc config instead of having it completely separated as suggested by Wolfgang Denk on http://lists.denx.de/pipermail/u-boot/2009-May/052247.html Signed-off-by: Matthias Ludwig mlud...@ultratronik.de --- board/omap3/evm/evm.c | 16 +++--- board/omap3/zoom2/zoom2.c | 14 cpu/arm_cortexa8/omap3/mem.c | 33 +++-- cpu/arm_cortexa8/omap3/sys_info.c |4 +- drivers/mtd/nand/omap_gpmc.c | 22 ++- include/asm-arm/arch-omap3/cpu.h | 41 include/configs/omap3_beagle.h|1 - include/configs/omap3_evm.h |1 - include/configs/omap3_overo.h |1 - include/configs/omap3_pandora.h |1 - include/configs/omap3_zoom1.h |1 - include/configs/omap3_zoom2.h |1 - 12 files changed, 53 insertions(+), 83 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 I believe you find life such a problem because you think there are the good people and the bad people. You're wrong, of course. There are, always and only, the bad people, but some of them are on oppo- site sides. - Terry Pratchett, _Guards! Guards!_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] net: kirkwood: updates: used eth_setenv_enetaddr api
Jean-Christophe PLAGNIOL-VILLARD wrote: On 22:17 Fri 07 Aug , Prafulla Wadaskar wrote: eth_setenv_enetaddr is avaible by upper layer using this saves 204 bytes on total image size Signed-off-by: Prafulla Wadaskar prafu...@marvell.com --- drivers/net/kirkwood_egiga.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/kirkwood_egiga.c b/drivers/net/kirkwood_egiga.c index 3d908f8..1a208f2 100644 --- a/drivers/net/kirkwood_egiga.c +++ b/drivers/net/kirkwood_egiga.c @@ -606,7 +606,7 @@ int kirkwood_egiga_initialize(bd_t * bis) struct kwgbe_device *dkwgbe; struct eth_device *dev; int devnum; -char *s, buf[NAMESIZE * 2]; +char *s; u8 used_ports[MAX_KWGBE_DEVS] = CONFIG_KIRKWOOD_EGIGA_PORTS; for (devnum = 0; devnum MAX_KWGBE_DEVS; devnum++) { @@ -665,10 +665,13 @@ int kirkwood_egiga_initialize(bd_t * bis) while (!eth_getenv_enetaddr(s, dev-enetaddr)) { /* Generate Ramdom MAC addresses if not set */ -sprintf(buf, 00:50:43:%02x:%02x:%02x, -get_random_hex(), get_random_hex(), -get_random_hex()); -setenv(s, buf); +dev-enetaddr[0] = 0x00; +dev-enetaddr[1] = 0x50; +dev-enetaddr[2] = 0x43; +dev-enetaddr[3] = get_random_hex(); +dev-enetaddr[4] = get_random_hex(); +dev-enetaddr[5] = get_random_hex(); +eth_setenv_enetaddr(s, dev-enetaddr); it will be also good to use a private mac address dev-enetaddr[0] = 0x02; Full ACK. If you're generating something random, it MUST have the private bit. Unless Marvell owns this block and is giving it away and is keeping track of all used numbers and ... regards, Ben ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V3] ARM: Don't include libgcc anymore
This patch removes the inclusion of libgcc functions into U-Boot on the ARM architecture. Only the really needed functions are provided in the lib_arm directory. Those implementations are copied from Linux where they are well proven related to reliably, performance. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com --- board/trab/u-boot.lds |2 +- include/asm-arm/assembler.h | 112 include/asm-arm/linkage.h | 11 ++ include/linux/linkage.h | 95 ++ lib_arm/Makefile | 19 +-- lib_arm/_divsi3.S | 140 --- lib_arm/_modsi3.S | 99 --- lib_arm/_udivsi3.S| 77 lib_arm/_umodsi3.S| 88 -- lib_arm/{_ashldi3.S = ashldi3.S} |9 +- lib_arm/{_ashrdi3.S = ashrdi3.S} |9 +- lib_arm/config.mk |2 + lib_arm/lib1funcs.S | 344 + lib_arm/{_ashrdi3.S = lshrdi3.S} | 13 +- 14 files changed, 596 insertions(+), 424 deletions(-) create mode 100644 include/asm-arm/assembler.h create mode 100644 include/asm-arm/linkage.h create mode 100644 include/linux/linkage.h delete mode 100644 lib_arm/_divsi3.S delete mode 100644 lib_arm/_modsi3.S delete mode 100644 lib_arm/_udivsi3.S delete mode 100644 lib_arm/_umodsi3.S rename lib_arm/{_ashldi3.S = ashldi3.S} (93%) copy lib_arm/{_ashrdi3.S = ashrdi3.S} (93%) create mode 100644 lib_arm/lib1funcs.S rename lib_arm/{_ashrdi3.S = lshrdi3.S} (90%) diff --git a/board/trab/u-boot.lds b/board/trab/u-boot.lds index d8bcfa4..a83853e 100644 --- a/board/trab/u-boot.lds +++ b/board/trab/u-boot.lds @@ -33,7 +33,7 @@ SECTIONS .text : { cpu/arm920t/start.o (.text) - lib_arm/_umodsi3.o(.text) + lib_arm/lib1funcs.o (.text) lib_generic/zlib.o(.text) lib_generic/crc32.o (.text) lib_generic/string.o (.text) diff --git a/include/asm-arm/assembler.h b/include/asm-arm/assembler.h new file mode 100644 index 000..c7916d1 --- /dev/null +++ b/include/asm-arm/assembler.h @@ -0,0 +1,112 @@ +/* + * arch/arm/include/asm/assembler.h + * + * Copyright (C) 1996-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This file contains arm architecture specific defines + * for the different processors. + * + * Do not include any C declarations in this file - it is included by + * assembler source. + */ +#include asm/ptrace.h + +/* + * Endian independent macros for shifting bytes within registers. + */ +#ifndef __ARMEB__ +#define pulllsr +#define pushlsl +#define get_byte_0 lsl #0 +#define get_byte_1 lsr #8 +#define get_byte_2 lsr #16 +#define get_byte_3 lsr #24 +#define put_byte_0 lsl #0 +#define put_byte_1 lsl #8 +#define put_byte_2 lsl #16 +#define put_byte_3 lsl #24 +#else +#define pulllsl +#define pushlsr +#define get_byte_0 lsr #24 +#define get_byte_1 lsr #16 +#define get_byte_2 lsr #8 +#define get_byte_3 lsl #0 +#define put_byte_0 lsl #24 +#define put_byte_1 lsl #16 +#define put_byte_2 lsl #8 +#define put_byte_3 lsl #0 +#endif + +/* + * Data preload for architectures that support it + */ +#if __LINUX_ARM_ARCH__ = 5 +#define PLD(code...) code +#else +#define PLD(code...) +#endif + +/* + * This can be used to enable code to cacheline align the destination + * pointer when bulk writing to memory. Experiments on StrongARM and + * XScale didn't show this a worthwhile thing to do when the cache is not + * set to write-allocate (this would need further testing on XScale when WA + * is used). + * + * On Feroceon there is much to gain however, regardless of cache mode. + */ +#ifdef CONFIG_CPU_FEROCEON +#define CALGN(code...) code +#else +#define CALGN(code...) +#endif + +/* + * Enable and disable interrupts + */ +#if __LINUX_ARM_ARCH__ = 6 + .macro disable_irq + cpsid i + .endm + + .macro enable_irq + cpsie i + .endm +#else + .macro disable_irq + msr cpsr_c, #PSR_I_BIT | SVC_MODE + .endm + + .macro enable_irq + msr cpsr_c, #SVC_MODE + .endm +#endif + +/* + * Save the current IRQ state and disable IRQs. Note that this macro + * assumes FIQs are enabled, and that the processor is in SVC mode. + */ + .macro save_and_disable_irqs, oldcpsr + mrs \oldcpsr, cpsr + disable_irq + .endm + +/* + * Restore interrupt state previously stored in a register. We don't + * guarantee that this will preserve the flags. + */ + .macro restore_irqs, oldcpsr + msr cpsr_c, \oldcpsr + .endm + +#define USER(x...)
Re: [U-Boot] [PATCHv3 3/5] omap3: remove typedefs for configuration structs
Dear Matthias Ludwig, In message 042680c935ee2a71d7cd006d3fd5c01e7893b2db.1242716287.git.mlud...@ultratronik.de you wrote: Signed-off-by: Matthias Ludwig mlud...@ultratronik.de --- board/omap3/beagle/beagle.c|6 ++-- board/omap3/evm/evm.c |6 ++-- board/omap3/pandora/pandora.c |8 +++--- board/omap3/zoom2/zoom2.c |2 +- cpu/arm_cortexa8/omap3/board.c | 16 ++-- cpu/arm_cortexa8/omap3/clock.c | 14 +- cpu/arm_cortexa8/omap3/mem.c | 14 +- cpu/arm_cortexa8/omap3/sys_info.c | 12 cpu/arm_cortexa8/omap3/timer.c |2 +- drivers/mtd/nand/omap_gpmc.c |2 +- include/asm-arm/arch-omap3/cpu.h | 50 ++-- include/asm-arm/arch-omap3/mem.h |4 +- include/asm-arm/arch-omap3/omap3.h |8 +++--- include/configs/omap3_beagle.h |2 +- include/configs/omap3_evm.h|2 +- include/configs/omap3_overo.h |2 +- include/configs/omap3_pandora.h|2 +- include/configs/omap3_zoom1.h |2 +- include/configs/omap3_zoom2.h |2 +- 19 files changed, 78 insertions(+), 78 deletions(-) Sorry, this does not apply, and the required changes may be small, but are non-trivial for me: Applying: omap3: remove typedefs for configuration structs error: patch failed: board/omap3/beagle/beagle.c:74 error: board/omap3/beagle/beagle.c: patch does not apply error: patch failed: board/omap3/pandora/pandora.c:59 error: board/omap3/pandora/pandora.c: patch does not apply fatal: sha1 information is lacking or useless (board/omap3/evm/evm.c). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001. Please rebase and resubmit. 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 When a child is taught ... its programmed with simple instructions -- and at some point, if its mind develops properly, it exceeds the sum of what it was taught, thinks independently. -- Dr. Richard Daystrom, The Ultimate Computer, stardate 4731.3. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] eeprom_m95xxx: remove unused variable i
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com --- drivers/mtd/spi/eeprom_m95xxx.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/spi/eeprom_m95xxx.c b/drivers/mtd/spi/eeprom_m95xxx.c index 59f80e3..0148d00 100644 --- a/drivers/mtd/spi/eeprom_m95xxx.c +++ b/drivers/mtd/spi/eeprom_m95xxx.c @@ -71,7 +71,6 @@ ssize_t spi_read (uchar *addr, int alen, uchar *buffer, int len) ssize_t spi_write (uchar *addr, int alen, uchar *buffer, int len) { struct spi_slave *slave; - int i; char buf[3]; slave = spi_setup_slave(CONFIG_DEFAULT_SPI_BUS, 1, 100, -- 1.6.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3] ARM: Don't include libgcc anymore
Dear Jean-Christophe PLAGNIOL-VILLARD, In message 1249680826-20181-1-git-send-email-plagn...@jcrosoft.com you wrote: This patch removes the inclusion of libgcc functions into U-Boot on the ARM architecture. Only the really needed functions are provided in the lib_arm directory. Those implementations are copied from Linux where they are well proven related to reliably, performance. Why would this be needed? I posted a patch that seems to fix all currently known issues. Do you see any remaining problems with my patch applied? If so, please let me know, and include exact information how to reproduce such problems - which board, which exact tool chain, how to run it, which error messages you see, etc. At the moment I don't see any advantages of your patch. On contrary, I would like to avoid such an intrusive change so late in the release cycle unless there is really good reason for it. 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 One possible reason that things aren't going according to plan is that there never was a plan in the first place. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] eeprom_m95xxx: remove unused variable i
Dear Jean-Christophe PLAGNIOL-VILLARD, In message 1249681074-21164-1-git-send-email-plagn...@jcrosoft.com you wrote: Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com --- drivers/mtd/spi/eeprom_m95xxx.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) No such file or directory. 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 In an infinite universe all things are possible, including the possi- bility that the universe does not exist. - 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] Don't inline weak symbols
Dear Jean-Christophe PLAGNIOL-VILLARD, In message 1249675613-10949-1-git-send-email-plagn...@jcrosoft.com you wrote: From: Ron Lee r...@debian.org use the same dummy weak functions too it will save 200 bytes Signed-off-by: Ron Lee r...@debian.org update the implementation Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com --- lib_arm/board.c | 28 ++-- 1 files changed, 10 insertions(+), 18 deletions(-) This whole stuff should be #ifdef'ed and only included when some board actually uses such a feature. 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 One day, said a dull voice from down below, I'm going to be back in form again and you're going to be very sorry you said that. For a very long time. I might even go so far as to make even more Time just for you to be sorry in. - Terry Pratchett, _Small Gods_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3] ARM: Don't include libgcc anymore
On 23:55 Fri 07 Aug , Wolfgang Denk wrote: Dear Jean-Christophe PLAGNIOL-VILLARD, In message 1249680826-20181-1-git-send-email-plagn...@jcrosoft.com you wrote: This patch removes the inclusion of libgcc functions into U-Boot on the ARM architecture. Only the really needed functions are provided in the lib_arm directory. Those implementations are copied from Linux where they are well proven related to reliably, performance. Why would this be needed? I posted a patch that seems to fix all currently known issues. Do you see any remaining problems with my patch applied? If so, please let me know, and include exact information how to reproduce such problems - which board, which exact tool chain, how to run it, which error messages you see, etc. At the moment I don't see any advantages of your patch. On contrary, I would like to avoid such an intrusive change so late in the release cycle unless there is really good reason for it. the omap3 does not build with my toolchains as it's also miss other EABI function __aeabi_idivmod __aeabi_uidivmod so yes we do need it Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2] Don't inline weak symbols
On 23:58 Fri 07 Aug , Wolfgang Denk wrote: Dear Jean-Christophe PLAGNIOL-VILLARD, In message 1249675613-10949-1-git-send-email-plagn...@jcrosoft.com you wrote: From: Ron Lee r...@debian.org use the same dummy weak functions too it will save 200 bytes Signed-off-by: Ron Lee r...@debian.org update the implementation Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com --- lib_arm/board.c | 28 ++-- 1 files changed, 10 insertions(+), 18 deletions(-) This whole stuff should be #ifdef'ed and only included when some board actually uses such a feature. the current patch is a fix for gcc 4.4 such update could be done later as we need to touch a lot's of file c and assembly Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/8] tools: mkimage : bugfix returns correct value for list command
Dear Prafulla Wadaskar, In message 1248804270-13715-1-git-send-email-prafu...@marvell.com you wrote: List command always return EXIT_SUCCESS even in case of failure by any means. This patch return 0 if list command is sucessful, returns negative value reported by check_header functions Signed-off-by: Prafulla Wadaskar prafu...@marvell.com --- tools/mkimage.c | 27 +-- 1 files changed, 13 insertions(+), 14 deletions(-) Just a minor nitpick: ... - if (fdt_check_header (ptr)) { - /* old-style image */ - image_verify_header ((char *)ptr, sbuf.st_size); - image_print_contents ((image_header_t *)ptr); - } else { - /* FIT image */ + if (!(retval = fdt_check_header (ptr))) /* FIT image */ fit_print_contents (ptr); - } + else if (!(retval = image_verify_header ( + (char *)ptr, sbuf.st_size))) /* old-style image */ + image_print_contents ((image_header_t *)ptr); The resulting code looks ugly to me. Please write as: if (!(retval = fdt_check_header(ptr))) { /* FIT image */ fit_print_contents (ptr); } else if (!(retval = image_verify_header((char *)ptr, sbuf.st_size))) { /* old-style image */ image_print_contents ((image_header_t *)ptr); } 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 a multi-legged creature crawling on your shoulder. -- Spock, A Taste of Armageddon, stardate 3193.9 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/8] tools: mkimage: code abstraction generic and image specific
Dear Prafulla Wadaskar, In message 1248804270-13715-2-git-send-email-prafu...@marvell.com you wrote: This is first step towards cleaning mkimage code for kwbimage support in clean way. Current mkimage code is very specific to uimge generation whereas the same framework can be used to generate other image types like kwbimage. For this, the architecture of mkimage code need to modified. Here is the brief plan for the same:- a) Abstract image specific code to saperate file (this patch) b) Move image header code from mkimage.c to respective image specific code c) Implement callback function for image specific functions d) Add kwbimage type support to this framework In this patch- 1. Image specific code abstracted from mkimage.c to default_image.c/h to make mkimage code more generic 2. struct mkimage_params introduced to pass basic mkimage specific flags and variables to image specific functions Signed-off-by: Prafulla Wadaskar prafu...@marvell.com --- tools/Makefile|4 + tools/default_image.c | 227 ++ tools/default_image.h | 36 + tools/mkimage.c | 368 ++--- tools/mkimage.h | 25 5 files changed, 394 insertions(+), 266 deletions(-) create mode 100644 tools/default_image.c create mode 100644 tools/default_image.h Just nitpicking... diff --git a/tools/Makefile b/tools/Makefile index b5a1e39..6ef15d9 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -171,6 +171,7 @@ $(obj)img2srec$(SFX): $(obj)img2srec.o $(STRIP) $@ $(obj)mkimage$(SFX): $(obj)mkimage.o $(obj)crc32.o $(obj)image.o $(obj)md5.o \ + $(obj)default_image.o \ $(obj)sha1.o $(LIBFDT_OBJS) $(obj)os_support.o Please let's sort the files... $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ $(STRIP) $@ @@ -203,6 +204,9 @@ $(obj)bin2header$(SFX): $(obj)bin2header.o $(obj)image.o: $(SRCTREE)/common/image.c $(CC) -g $(FIT_CFLAGS) -c -o $@ $ +$(obj)default_image.o: $(SRCTREE)/tools/default_image.c + $(CC) -g $(FIT_CFLAGS) -c -o $@ $ + Please sort here, too. diff --git a/tools/mkimage.c b/tools/mkimage.c index b7b383a..66d6c8e 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -24,28 +24,30 @@ ... +struct mkimage_params params = { ... + .opt_os = IH_OS_LINUX, + .opt_arch = IH_ARCH_PPC, + .opt_type = IH_TYPE_KERNEL, + .opt_comp = IH_COMP_GZIP, + .opt_dtc = MKIMAGE_DEFAULT_DTC_OPTIONS, ... + .imagename = , + .datafile = , + .imagefile = , + .cmdname = , I see no reason to initialize these strings. Please omit. +}; ... case 'A': if ((--argc = 0) || - (opt_arch = genimg_get_arch_id (*++argv)) 0) + (params.opt_arch = + genimg_get_arch_id (*++argv)) 0) usage (); goto NXTARG; case 'C': if ((--argc = 0) || - (opt_comp = genimg_get_comp_id (*++argv)) 0) + (params.opt_comp = + genimg_get_comp_id (*++argv)) 0) The new code looks really ugly here and in all the following case:s; This is mostly caused by the fact that the new code is much longer params.opt_XXX versus opt_XXX). With the new code all the options are in the params structure anyway, so ther eis no danger to confuse these withother variables, so we should omit the opt_ part, I think. This gives: struct mkimage_params params = { ... .os = IH_OS_LINUX, .arch = IH_ARCH_PPC, .type = IH_TYPE_KERNEL, .comp = IH_COMP_GZIP, .dtc = MKIMAGE_DEFAULT_DTC_OPTIONS, ... }; ... case 'A': if ((--argc = 0) || (params.arch = genimg_get_arch_id(*++argv)) 0) { usage (); } goto NXTARG; case 'C': if ((--argc = 0) || (params.comp = genimg_get_comp_id(*++argv)) 0) { usage (); } goto NXTARG; ... etc. 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 Extended Epstein-Heisenberg Principle: In an R D orbit, only 2 of the existing 3 parameters can be defined simultaneously. The parame- ters are: task,
Re: [U-Boot] [PATCH 3/8] tools: mkimage: Move image header code to image specific files
Dear Prafulla Wadaskar, In message 1248804270-13715-3-git-send-email-prafu...@marvell.com you wrote: This is second step towards cleaning mkimage code for kwbimage support in clean way. In this patch- 1. The image_get_header_size function call is replaced by sizeof(image_header_t) in default_image.c I still fail to understand why this would be needed, or even wanted. 2. image header code moved form mkimage.c to default_image .c This looks incorrect to me (not to mention the form/from typo): I see no code being moved, only variable declarations. +/* + * Default image parameters + */ +struct image_type_params defimage_params = { + .header_size = sizeof(image_header_t), + .hdr = (void*)header, +}; + +void *image_get_tparams (void){ + return (void *)defimage_params; +} We need better documentation. Why would that function be needed? int image_check_params (struct mkimage_params *params) { return ((params-dflag (params-fflag || params-lflag)) || @@ -100,13 +114,13 @@ void image_set_header (char *ptr, struct stat *sbuf, image_header_t * hdr = (image_header_t *)ptr; checksum = crc32 (0, - (const char *)(ptr + image_get_header_size ()), - sbuf-st_size - image_get_header_size ()); + (const char *)(ptr + sizeof(image_header_t)), + sbuf-st_size - sizeof(image_header_t)); I cannot help it, but this change looks like a step backward to me. Why don't we use the header_size entry from the image_type_params here, too? ... --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -49,9 +49,6 @@ struct mkimage_params params = { .cmdname = , }; -image_header_t header; -image_header_t *hdr = header; - int main (int argc, char **argv) { @@ -59,6 +56,7 @@ main (int argc, char **argv) struct stat sbuf; unsigned char *ptr; int retval; + struct image_type_params *tparams = image_get_tparams (); params.cmdname = *argv; @@ -163,7 +161,7 @@ NXTARG: ; params.ep = params.addr; /* If XIP, entry point must be after the U-Boot header */ if (params.xflag) - params.ep += image_get_header_size (); + params.ep += tparams-header_size; Would it not be better to stick with the image_get_header_size() function, and instead make it aware which image type we are asking for? The old code was homnogenuous: it consistently used image_get_header_size(); now we have a sizeof() here and a ptr-header_size there. I really dislike that. 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 Here's a fish hangs in the net like a poor man's right in the law. 'Twill hardly come out. - Shakespeare, Pericles, Act II, Scene 1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/8] tools: mkimage: Implemented callback function for default image support
Dear Prafulla Wadaskar, In message 1248804270-13715-4-git-send-email-prafu...@marvell.com you wrote: This is Third step towards cleaning mkimage code for kwbimage BTW - I think cleaning mkimage code is not correct. This is not a clean up, but a major rework. 1. callback functions are used in mkimage.c those are defined in defaut_image.c for currently supported images. Typo... 2. scan loop implemented for image header verify and print What does that mean? Please provide better documentation / comments so we understand what you are doing. void image_print_header (char *ptr) { - image_header_t * hdr = (image_header_t *)ptr; - - image_print_contents (hdr); + image_print_contents ((image_header_t *)ptr); } The new code looks uglier than the old one. Please don;t change. +/* + * FIT image support + */ +int +fitimage_verify_header (char *ptr, int image_size, + struct mkimage_params *params) +{ + fdt_check_header ((void *)ptr); +} Do other image types need the provided parameters? +void fitimage_print_header (char *ptr) +{ + fit_print_contents ((void *)ptr); +} Maybe we can omit this function, then? +struct image_type_params fitimage_params = { + .header_size = sizeof(image_header_t), + .hdr = (void*)header, + .check_params = image_check_params, + .verify_header = fitimage_verify_header, + .print_header = fitimage_print_header, ... and just use .print_header = fit_print_contents, here? ... diff --git a/tools/mkimage.c b/tools/mkimage.c index d1636d8..3a3cb19 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -49,14 +49,28 @@ struct mkimage_params params = { .cmdname = , }; +static struct image_functions image_ftable[] = { + {image_get_tparams,}, /* for IH_TYPE_INVALID */ + {image_get_tparams,}, /* for IH_TYPE_FILESYSTEM */ + {image_get_tparams,}, /* for IH_TYPE_FIRMWARE */ + {image_get_tparams,}, /* for IH_TYPE_KERNEL */ + {image_get_tparams,}, /* for IH_TYPE_MULTI */ + {image_get_tparams,}, /* for IH_TYPE_RAMDISK */ + {image_get_tparams,}, /* for IH_TYPE_SCRIPT */ + {image_get_tparams,}, /* for IH_TYPE_STANDALONE */ + {fitimage_get_tparams,},/* for IH_TYPE_FLATDT */ +}; What is this? Please explain. The table looks pretty bogus to me. If all but one use the same function, why do we need such a table then? int main (int argc, char **argv) { int ifd = -1; struct stat sbuf; unsigned char *ptr; - int retval; + int i, retval; struct image_type_params *tparams = image_get_tparams (); Such initialization here looks bad to me, as it is in no way correlated to the image_ftable[] settinga above. + struct image_type_params *scantparams; + int image_ftable_size = ARRAY_SIZE(image_ftable); params.cmdname = *argv; @@ -97,6 +111,15 @@ main (int argc, char **argv) (params.opt_type = genimg_get_type_id (*++argv)) 0) usage (); + if (image_ftable_size = params.opt_type) { Logic here looks inverted to me. And is the = correct? + /* + * Scan image headers for all supported types + * and print if veryfy_header sucessful Typo. I have to admit that I do not understand what you are actually doing here. + */ + for (i = image_ftable_size - 1; i != IH_TYPE_INVALID; i--) { + scantparams = image_ftable[i].get_tparams (); + fprintf (stderr, %s: Verify header for type=%s\n, + params.cmdname, genimg_get_type_name (i)); + + retval = scantparams-verify_header ( (char *)ptr, sbuf.st_size, - params))) /* old-style image */ - image_print_contents ((image_header_t *)ptr); + params); + + if (retval == 0) { + scantparams-print_header ((char *)ptr); + break; + } + } Maybe you can explain what you're doing? (void) munmap((void *)ptr, sbuf.st_size); (void) close (ifd); @@ -333,9 +368,9 @@ NXTARG: ; exit (EXIT_FAILURE); } - image_set_header (ptr, sbuf, params); + tparams-set_header (ptr, sbuf, ifd, params); - image_print_header (ptr); + tparams-print_header (ptr); The longer I read this, the more I dislike the tparams- code. I tend to think the type switching should be transparent, and not visible in the code. +/* + * Image type specific function pointers list + */ +struct image_functions { + void * (*get_tparams) (void); +}; What's that? +#define
Re: [U-Boot] [PATCH 6/8] tools: mkimage: Making table_entry code global
Dear Prafulla Wadaskar, In message 1248804270-13715-6-git-send-email-prafu...@marvell.com you wrote: diff --git a/include/image.h b/include/image.h index 88a13ab..f119cee 100644 --- a/include/image.h +++ b/include/image.h @@ -168,6 +168,15 @@ #define IH_MAGIC 0x27051956 /* Image Magic Number */ #define IH_NMLEN 32 /* Image Name Length*/ +typedef struct table_entry { + int id; /* as defined in image.h*/ + char*sname; /* short (input) name */ + char*lname; /* long (output) name */ +} table_entry_t; Now read this code again, with the distance of a couple of days, and tell me what you think. as defined in image.h - hey, this _is_ image.h ! So, struct table_entry - what sort of table is this? short (input) name, long (output) name - what the heck is this about? In the old version, the declaration of the struct was followed by the declarations of the actual tables, so we could _see_ what was meant. You rip the code out of context, which makes it unreadable and ununderstandable. This is a really bad idea, it seems. 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 He only drinks when he gets depressed. Why does he get depressed? Sometimes it's because he hasn't had a drink. - Terry Pratchett, _Men at Arms_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 7/8] tools: mkimage: Add: Kirkwood Boot Image support (kwbimage)
Dear Prafulla Wadaskar, In message 1248804270-13715-7-git-send-email-prafu...@marvell.com you wrote: This is Third step towards cleaning mkimage code for kwbimage support in clean way. Umm... The Third step was already in patch 4/8. I guess you have to check your commit messages better... diff --git a/tools/Makefile b/tools/Makefile index 6ef15d9..07a1c27 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -172,6 +172,7 @@ $(obj)img2srec$(SFX): $(obj)img2srec.o $(obj)mkimage$(SFX): $(obj)mkimage.o $(obj)crc32.o $(obj)image.o $(obj)md5.o \ $(obj)default_image.o \ + $(obj)kwbimage.o \ $(obj)sha1.o $(LIBFDT_OBJS) $(obj)os_support.o Please keep sorted. --- /dev/null +++ b/tools/kwbimage.c @@ -0,0 +1,364 @@ +/* + * (C) Copyright 2008 + * Marvell Semiconductor www.marvell.com + * Written-by: Prafulla Wadaskar prafu...@marvell.com + * + * 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 mkimage.h +#include image.h +#include kwbimage.h + +/* + * Suported commands for configuration file + */ +static table_entry_t kwbimage_cmds[] = { + { CMD_BOOT_FROM, BOOT_FROM,, }, + { CMD_NAND_ECC_MODE, NAND_ECC_MODE,, }, + { CMD_NAND_PAGE_SIZE, NAND_PAGE_SIZE, , }, + { CMD_SATA_PIO_MODE, SATA_PIO_MODE,, }, + { CMD_DDR_INIT_DELAY, DDR_INIT_DELAY, , }, + { CMD_DATA, DATA, , }, + { CMD_INVALID,, , }, +}; Why don't these entries have any printable names associated? +/* + * Suported Boot options for configuration file Typo. ... +/* + * Suported NAND ecc options configuration file + */ +static table_entry_t kwbimage_eccmodes[] = { + { IBR_HDR_ECC_DEFAULT,default, , }, + { IBR_HDR_ECC_FORCED_HAMMING,hamming, , }, + { IBR_HDR_ECC_FORCED_RS, rs, , }, + { IBR_HDR_ECC_DISABLED, disabled, , }, + { -1, , , }, +}; Why don't these entries have any printable names associated? +uint32_t check_get_hexval (char *token) +{ + uint32_t hexval; + + if (!sscanf (token, %x, hexval)) { + printf (Error:%s[%d] - Invalid hex data\n, fname, lineno); + exit (EXIT_FAILURE); + } + return hexval; +} scanf() is not a good or reliable conversion tool. Better avoid it. Use strto[u]l() instead. In the error case, please also print the string that you cannot convert. +/* + * Generates 8 bit checksum + */ +uint8_t kwbimage_checksum8 (void *start, uint32_t len, uint8_t csum) +{ + register uint8_t sum = csum; + volatile uint8_t *startp = (volatile uint8_t *)start; + + do { + sum += *startp; + startp++; + } while (--len); startp is incorrectly named. It is only _start_ at the beginning. Just call it p :-) Maybe you should add handling for the len=0 case. +/* + * Generates 32 bit checksum + */ +uint32_t kwbimage_checksum32 (uint32_t *start, uint32_t len, uint32_t csum) +{ + register uint32_t sum = csum; + volatile uint32_t *startp = start; + + do { + sum += *startp; + startp++; + len -= sizeof(uint32_t); + } while (len 0); + return (sum); You should error handling for the cas ethet len is not an even multiple of sizeof(uint32_t). Maybe you should add handling for the len=0 case. ... + case CMD_NAND_PAGE_SIZE: + mhdr-nandpagesize = + (uint16_t) check_get_hexval (token); + printf (Nand page size = 0x%x\n, + mhdr-nandpagesize); Indentation incorrect. + break; + case CMD_SATA_PIO_MODE: + mhdr-satapiomode = + (uint8_t) check_get_hexval (token); + printf (Sata PIO mode = 0x%x\n, +
Re: [U-Boot] [PATCH V3] ARM: Don't include libgcc anymore
Dear Jean-Christophe PLAGNIOL-VILLARD, In message 20090807215836.gr13...@game.jcrosoft.org you wrote: If so, please let me know, and include exact information how to reproduce such problems - which board, which exact tool chain, how to run it, which error messages you see, etc. Please read what I wrote. At the moment I don't see any advantages of your patch. On contrary, I would like to avoid such an intrusive change so late in the release cycle unless there is really good reason for it. the omap3 does not build with my toolchains The omap3? There is no board configuration omap3 in Mainline. Please provide full details - which board name (so I can try and byuild it, too), which exact tool chain (so I can try this one, too), and especially what your error messages were. as it's also miss other EABI function __aeabi_idivmod __aeabi_uidivmod What are you talking about? Did you actually test my patch? I don't think so. See the last lines of it: ... + +.globl __aeabi_uidivmod +__aeabi_uidivmod: + + stmfd sp!, {r0, r1, ip, lr} + bl __aeabi_uidiv + ldmfd sp!, {r1, r2, ip, lr} + mul r3, r0, r2 + sub r1, r1, r3 + mov pc, lr + +.globl __aeabi_idivmod +__aeabi_idivmod: + + stmfd sp!, {r0, r1, ip, lr} + bl __aeabi_idiv + ldmfd sp!, {r1, r2, ip, lr} + mul r3, r0, r2 + sub r1, r1, r3 + mov pc, lr -- 1.6.0.6 So - which function names get added here? so yes we do need it You must provide better facts. What you claim here is obviously not correct. Please check again. 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 Of all possible committee reactions to any given agenda item, the reaction that will occur is the one which will liberate the greatest amount of hot air.-- Thomas L. Martin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2] Don't inline weak symbols
Dear Jean-Christophe PLAGNIOL-VILLARD, In message 20090807220403.gs13...@game.jcrosoft.org you wrote: Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com --- lib_arm/board.c | 28 ++-- 1 files changed, 10 insertions(+), 18 deletions(-) This whole stuff should be #ifdef'ed and only included when some board actually uses such a feature. the current patch is a fix for gcc 4.4 such update could be done later as we need to touch a lot's of file c and assembly We could also do the change to lib_arm/board.c right now. This should not affect any other boards or files. 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 more data I punch in this card, the lighter it becomes, and the lower the mailing cost. - Stan Kelly-Bootle, The Devil's DP Dictionary ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3] ARM: Don't include libgcc anymore
At the moment I don't see any advantages of your patch. On contrary, I would like to avoid such an intrusive change so late in the release cycle unless there is really good reason for it. on contrary my patch was patch months ago and well tested on multiple boards and socs your patch is more dangerous IMHO as it is not well tested and as you just send few days ago so for my point of view non well tested patch against well tested please let us use this one and we will need it any way really soon to support cortex m3 and will remove anyway the current code Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] net: sync env ethaddr to device enetaddr in eth_init()
Mike, Mike Frysinger wrote: In the previous enetaddr refactoring, the assumption with commit 56b555a644 was that the eth layer would handle the env - device enetaddr syncing. This was not the case as eth_initialize() is called only once and the sync occurs there. So make sure the eth_init() function does the env - device sync with every network init. Reported-by: Andrzej Wolski awol...@poczta.fm Signed-off-by: Mike Frysinger vap...@gentoo.org --- Applied to net repo. thanks, Ben ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] undefined reference to `pci_find_class'
Hi All, I am in the middle of doing some x86 code cleanups ready for my next phase of work on getting linux running on my custom board. I doing so, I have found some PCI related code in the 386 cpu and lib folders that needed tweaking. I have two issues that I need help to resolve 1) in lib_i386/pci.c the following results in a compiler warning 'large integer implicitly truncated to unsigned type': pci_write_config_dword(dev, PCI_ROM_ADDRESS, PCI_ROM_ADDRESS_MASK); Would it be 'right' to simply cast PCI_ROM_ADDRESS_MASK to a u32? (I have done this just to get it to compile for the moment) 2) in lib_i386/pci.c, probe_pci_video() calls pci_find_class(), but the pci_find_class() is undefined. The only other references I can find in the code are in include/pci.h (where it is declared) and drivers/net/sk98lin/skge.c where it is called. I have used gitk to search the git history to see if it was removed for some reason, but can find no references to it in any prior commit Does anyone have any ideas on what I should do to resolve these? Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] U boot booting issues on soft reset
Hi All, When i do a soft reset or issue a reboot command from linux, uboot is unable to boot,getting stuck . Uncompressing Linux. ... done, booting the kernel. But on a power cycle, U-boot seems to be booting kernel just fine without issues . Initially , i thought the U-boot config was not persistent but looks like the U-boot'd doing something weird. What might be the issue? Does anyone have clues/hints? -Alfred. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot