Re: [U-Boot] [PATCH 01/10] lcd, amba: remove this frame buffer driver since it is not used

2013-01-13 Thread Alessandro Rubini
I used it in 32-bit mode and had to hack some things to make it work, inluding a fater memcopy as scrolling was very slow. I don't think I can resurrect my nhk8815 device any soon, and it looks like nobody else is using this logic cell, so I'm fine removing the driver. Acked-by: Alessandro Rubini

Re: [U-Boot] http client?

2009-07-22 Thread Alessandro Rubini
Hm... but 20 minutes versus 30 seconds cannot be explained by TFTP versus HTTP alone. There must be other effects impacting your network traffic. Did you run any deeper analysis? I'm sure it depends on network delays. TCP has the sliding window mechanism, so several packets can be in flight

[U-Boot] [RFC] arm/board.c: avoid ifdef using weak default functions

2009-07-22 Thread Alessandro Rubini
From: Alessandro Rubini rub...@gnudd.com While it's a matter of personal taste, I prefer to avoid ifdef when possible. For example, I don't like to add BOARD_LATE_INIT in the config file just to have my board_late_init() function called. This patch (not meant to be applied mainstram, jsut

Re: [U-Boot] http client?

2009-07-22 Thread Alessandro Rubini
When I looked at the RFC data it appears that the overhead of IP fragmentation and reassembly (which does add overhead as the number of gateways increases) may be worth the time... Just tried it: U-Boot doesn't support reassembly, it seems. net.c confirms it: /* Can't deal

[U-Boot] [PATCH/RFC] net: defragment IP packets

2009-07-24 Thread Alessandro Rubini
from 1500 to 800 and then 550. However, on a LAN connection, I didn't see advantes with using a 4k block size with default MTU. Signed-off-by: Alessandro Rubini rub...@gnudd.com --- This patch is over mainline, without the (much appreciated) cleanup patch that reached the list these days. net

Re: [U-Boot] http client?

2009-07-24 Thread Alessandro Rubini
Me: Just tried it: U-Boot doesn't support reassembly, it seems. Robin Getz: I don't think anyone said it did. I'm sorry, I misread that in your message. Me: I don't think it's worth adding. Robin: This is based on ... ? laziness, mainly. And personal preference over simpler code where

[U-Boot] [PATCH v2 1/2] arm nomadik: add gpio support

2009-07-24 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- cpu/arm926ejs/nomadik/Makefile |2 +- cpu/arm926ejs/nomadik/gpio.c| 99 +++ include/asm-arm/arch

[U-Boot] [PATCH v2 2/2] arm nomadik: add i2c

2009-07-24 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- board/st/nhk8815/nhk8815.c | 16 ++-- include/configs/nhk8815.h | 18 +- 2 files changed, 31 insertions(+), 3

Re: [U-Boot] [PATCH/RFC] net: defragment IP packets

2009-07-26 Thread Alessandro Rubini
http://www.faqs.org/rfcs/rfc815.html Yeah, I had seen this - but didn't want to duplicate something that Alessandro might already working on... Alessandro - were you going to add out of order packets? If the code has chances to go mainline, I'll be happy to complete this task. So

Re: [U-Boot] [PATCH/RFC] net: defragment IP packets

2009-07-27 Thread Alessandro Rubini
Thanks for your comments. Should have a CONFIG_ something - to make this conditional. This has been asked by Ben too. Will do, although I'm not very happy about all those conditionals for every few lines of code. Some of your remarks are just symptoms of this being a quick hack, like the

Re: [U-Boot] [PATCH v3] zlib: updated to v.1.2.3

2009-07-27 Thread Alessandro Rubini
Please, is there somebody that can test this patch on a differen arch than PPC? Arm: success. tornado% git log --pretty=oneline | head -1 b201171f2b4d509f3ad510b214bee70ff902e3d6 zlib: updated to v.1.2.3 U-Boot 2009.06-00494-gb201171 (Jul 27 2009 - 17:05:15) [...] ## Booting

[U-Boot] [PATCH] zlib: allow 0 as destination pointer

2009-07-27 Thread Alessandro Rubini
The entry point of an image can be 0 (like on PowerPC), so allow next_out to be NULL in inflate() Signed-off-by: Alessandro Rubini rub...@unipv.it --- Stefan Roese: I'll try to uncompress to something != 0 tomorrow on PPC. You are right. I naively thought my arm has RAM at 0 like PPC

Re: [U-Boot] [PATCH] zlib: allow 0 as destination pointer

2009-07-29 Thread Alessandro Rubini
Hi rhabarber1848, please could you test latest two zlib patches I have sent few minutes ago? Unfortunately you add outcb() only in inflatestart and inflateend. IT should also go in the main loop. Being an out-callback with arguments, it should be called during copy to output, with proper

[U-Boot] [PATCH 0/3] Defragment IP packets

2009-07-30 Thread Alessandro Rubini
. Actually, my code is not called in this case. /alessandro Alessandro Rubini (3): net: defragment IP packets tftp: get the tftp block size from config file and from the environment arm nomadik: select defrag and 4k tftp block size include/configs/nhk8815.h |3 + net/net.c

[U-Boot] [PATCH 1/3] net: defragment IP packets

2009-07-30 Thread Alessandro Rubini
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). The code includes a number of suggestions by Robin Getz. Signed-off-by: Alessandro Rubini rub...@gnudd.com --- net

[U-Boot] [PATCH 2/3] tftp: get the tftp block size from config file and from the environment

2009-07-30 Thread Alessandro Rubini
-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..b315d5a 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -86,8 +86,14 @@ extern flash_info_t flash_info[]; /* 512 is poor choice

[U-Boot] [PATCH 3/3] arm nomadik: select defrag and 4k tftp block size

2009-07-30 Thread Alessandro Rubini
Signed-off-by: Alessandro Rubini rub...@gnudd.com --- include/configs/nhk8815.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/configs/nhk8815.h b/include/configs/nhk8815.h index bfa91a2..fd6d7d1 100644 --- a/include/configs/nhk8815.h +++ b/include/configs

[U-Boot] [PATCH 2/3 V2] tftp: get tftpblocksize from cfg file and env

2009-07-30 Thread Alessandro Rubini
-by: Alessandro Rubini rub...@gnudd.com --- V2: fixed a damned typo in CONFIG_ names Also, I shortened the first line. Sorry for this bad V1. 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

Re: [U-Boot] [PATCH 1/3] net: defragment IP packets

2009-07-31 Thread Alessandro Rubini
Thanks for your comments. +#ifndef CONFIG_TFTP_MAXBLOCK +#define CONFIG_TFTP_MAXBLOCK 16384 It is more than tftp - nfs could also use the same. Yes, I know. But most users are tftp ones. And if you want an even number (like 16k) as a tftp packet you need to add the headers and the sequence

Re: [U-Boot] [PATCH 1/3] net: defragment IP packets

2009-07-31 Thread Alessandro Rubini
or simply your ether+uboot can't keep up with the data rate. That doesn't explain, why does it work, when there is no fragmentation??? Well, with no fragmentation there is less traffic. Each tftp packet is one patch, instead of a burst of packets (intermixed with pings). Is the target

Re: [U-Boot] [PATCH 1/3] net: defragment IP packets

2009-07-31 Thread Alessandro Rubini
Is the target replying to all pings? Yes. And I can see the same in wireshark. Ah. I see. Strange... What is missing in the reassembly code (that is described in RFC815) is the timer. (quote from the RFC): -- The final part of the algorithm is some sort of timer

Re: [U-Boot] [PATCH 1/3] net: defragment IP packets

2009-07-31 Thread Alessandro Rubini
What I'm talking about is: - start a tftp file transfer. - CNTR-C it, causing a partial reassembly to done. - start a new transfer. Yes, exactly the case I observed. But you are not guaranteed a partial reassembly happens, as you should be ctrl-c-ing at the exact right time. All I did

Re: [U-Boot] [U-BOOT] error: end address not on sector boundary when I use saveenv cmd

2009-08-05 Thread Alessandro Rubini
When I set all the environment variable and try to save on flash , I am getting Error: end address not on sector boundary. Check the settings in your config file. The environment must live in an integer number of sectors, and sector size depends on the flash chip (usually 64k or 128k).

Re: [U-Boot] [U-BOOT] error: end address not on sector boundary when I use saveenv cmd

2009-08-05 Thread Alessandro Rubini
I already looked at my config file, but couldn't root cause the problem Here are some of the definitions from my configs, incase anything wrong CONFIG_SYS_FLASH_BASE 0x1000 CONFIG_ENV_ADDR0x1004 Ok. But you'd better copy whole lines from config file instead of

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Alessandro Rubini
With old configuration it could happen tout=0 if CONFIG_SYS_HZ1000 solved using an unsigned long long I had the same problem with an ancient version of a vendor-ported u-boot. There my CFG_HZ was 100, so the timeout was 0. I used this, which avoids the preprocessor conditional. Since the HZ

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Alessandro Rubini
+tout = tout * CONFIG_SYS_HZ / 1000 + 1; 2) There should be a Signed-off-by: from Alessandro, too. Signed-off-by: Alessandro Rubini rub...@gnudd.com 5) Omit the +1. It seems bogus to me. Since the timeout is an error condition, It's better to have it longer than shorter

Re: [U-Boot] U-boot make config errors

2009-08-06 Thread Alessandro Rubini
u-boot]$ make mx31_config Configuring for mx31 board... rm: cannot remove `asm': Is a directory Asm should be a symlink. It seems you checked in your own versioning system the directory pointed by the link and not the link itself. Most likely your versioning system doesn't handle symlinks.

Re: [U-Boot] Kirkwood gpio (was: timeout calculation underflow if imprecise 1kHz timer: fix)

2009-08-07 Thread Alessandro Rubini
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

[U-Boot] Subject: [PATCH] kirkwood/gpio.h: remove duplicate definition

2009-08-07 Thread Alessandro Rubini
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

[U-Boot] [PATCH 0/4] Network defrag

2009-08-07 Thread Alessandro Rubini
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

[U-Boot] [PATCH 1/4] net: defragment IP packets

2009-08-07 Thread Alessandro Rubini
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

[U-Boot] [PATCH 2/4] tftp: get the tftp block size from config file and from the environment

2009-08-07 Thread Alessandro Rubini
-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

[U-Boot] [PATCH 3/4] nfs: accept CONFIG_NFS_READ_SIZE from config file

2009-08-07 Thread Alessandro Rubini
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

[U-Boot] [PATCH 4/4] arm nomadik: activate defrag choose 4k transfer block size

2009-08-07 Thread Alessandro Rubini
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

Re: [U-Boot] [RFC PATCH v2] ARM: Avoid compiler optimization for usages of readb, writeb and friends.

2010-12-29 Thread Alessandro Rubini
Dirk Behme: Just for the record: The trick is to ensure that the __arch_putx() containing the volatile is not the last statement in the GCC statement-expression. So, using something like #define writeb(v,c) ({ __iowmb(); __arch_putb(v,c); v;}) (note the additional 'v;')

[U-Boot] [PATCH] arm nomadik: rename board and cleanup config

2009-06-18 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it This patch cleans up some glitches in the initial submission: - nobody calls it nmdk8815: the board is nhk8815, so rename - nand and onenand can coexist, so fix config file accordingly - configure the chip select for OneNand, so it works properly

[U-Boot] [PATCH 0/4 v2] Clean up the Nomadik board and add OneNand

2009-06-22 Thread Alessandro Rubini
didn't split clean and onenand, since the change in partitioning information in the config file is part of introducing onenand. A split would have introduced a never-tested artificial middle version. Alessandro Rubini (4): arm nomadik: rename board to nhk8815 arm nomadik: cleanup reset arm

[U-Boot] [PATCH 1/4 v2] arm nomadik: rename board to nhk8815

2009-06-22 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it This is an error in my side in the initial submission: nobody calls it nmdk8815, it's nomadik hardware kit, nhk8815, instead. Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- Makefile

[U-Boot] [PATCH 2/4 v2] arm nomadik: cleanup reset

2009-06-22 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it There is only one public release of the Nomadik chip, so the ifdef in reset code as well as a define in the config file are not needed Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- cpu/arm926ejs

[U-Boot] [PATCH 3/4 v2] arm nomadik: allow Nand and OneNand to coexists

2009-06-22 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it The evaluation kit has both Nand and OneNand, both drivers are there and the two configurations only select a different default for the jffs partition. This adds the OneNand driver and cleans up storage. Signed-off-by: Alessandro Rubini rub...@unipv.it

[U-Boot] [PATCH 4/4 v2] arm nomadik: use 1000 as HZ value and rewrite timer code

2009-06-22 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it This sets CONFIG_SYS_HZ to 1000 as required, and completely rewrites timer code, which is now both correct and much smaller. Unused functions like udelay_masked() have been removed as no driver uses them, even the ones that are not currently active

[U-Boot] [PATCH v3] arm nomadik: use 1000 as HZ value and rewrite timer code

2009-06-29 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it This sets CONFIG_SYS_HZ to 1000 as required, and completely rewrites timer code, which is now both correct and much smaller. Unused functions like udelay_masked() have been removed as no driver uses them, even the ones that are not currently active

Re: [U-Boot] [help] u-boot mailing list seems to block my git send-email

2009-07-13 Thread Alessandro Rubini
[sorry for my previous post, I messed the headers] Both mails are not appeared in the mailing list, but Stefan received (1) and I received (1) and (2). Actually, the mailing list is configured to not send a copy to you if you are in the Cc: list. I changed it for myself, but I fear this is the

Re: [U-Boot] [PATCH 1/1] Add support for Eukrea CPU9260 SBC

2009-07-16 Thread Alessandro Rubini
I've tried something very close to what is done in tqm8xx but I don't manage to get something reliable : either it hangs or I get data abort. After checking the datasheet, I don't understand how we can change the geometry of this SDRAM controler while running from SDRAM No, you can't.

Re: [U-Boot] [PATCH] Refresh LZMA-lib to 4.65

2009-07-17 Thread Alessandro Rubini
watchdog.diff reset watchdog timer to avoid reboot during decompression on slow machines. Actually, you don't need all these ifdef, that clutter the code. watchdog.h already include this: /* * No hardware or software watchdog. */

[U-Boot] [PATCH] cmd_i2c: bugfix: add missing brace

2009-07-17 Thread Alessandro Rubini
From: Alessandro Rubini rubini-l...@gnudd.com The sub-command parser missed a brace, so return 0; is always taken and no error message is diplayed if you say i2c scan instead of i2c probe, for example. Proper brace is added. Also, a misleading and unneeded else is removed. Signed-off

Re: [U-Boot] [PATCH 1/1] Add support for Eukrea CPU9260 SBC

2009-07-18 Thread Alessandro Rubini
So, with the current code base, you can't autodetect ram size on the atmel 926x. Argh. So this should be fixed. Yes. Other architectures (like PPC) do all this in C. This should be possible on ARM, too. Everything is possible. I fear it's not trivial to make a generic ARM

[U-Boot] [PATCH 0/2] arm nomadik: gpio and i2c

2009-07-19 Thread Alessandro Rubini
? /alessandro Alessandro Rubini (2): arm nomadik: add gpio support arm nomadik: add i2c board/st/nhk8815/Makefile |2 +- board/st/nhk8815/gpio.c| 99 board/st/nhk8815/gpio.h| 42 ++ board/st/nhk8815/nhk8815.c | 16

[U-Boot] [PATCH 1/2] arm nomadik: add gpio support

2009-07-19 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- board/st/nhk8815/Makefile |2 +- board/st/nhk8815/gpio.c | 99 + board/st/nhk8815/gpio.h | 42

[U-Boot] [PATCH 2/2] arm nomadik: add i2c

2009-07-19 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- board/st/nhk8815/nhk8815.c | 16 ++-- include/configs/nhk8815.h | 18 +- 2 files changed, 31 insertions(+), 3 deletions

[U-Boot] [PATCH] env_onenand: fix compiler warning for error message

2009-07-19 Thread Alessandro Rubini
From: Alessandro Rubini rub...@gnudd.com Since env_addr is a loff_t (long long), %08lx is not a good format; this uses %08llx (not %016llx), to get 8 or more hex digits. I tnknk padding to 8 digits makes things more readable for small numbers, and the unlikely values over 4GB are reported

[U-Boot] [PATCH] video: move extern declarations from C to headers

2009-07-19 Thread Alessandro Rubini
From: Alessandro Rubini rub...@gnudd.com This moves some extern declaration from lcd.c to lcd.h, removing unneeded ifdef around a pair of them. Additionally, since gunzip_bmp() was declared static in cmd_bmp.c but extern in lcd.c, I removed the static. The extra #include lcd.h in cmd_bmp.c

[U-Boot] [PATCH] cmd_flash.c: fix compile error for boards with DataFlash

2009-07-19 Thread Alessandro Rubini
From: Alessandro Rubini rub...@gnudd.com The local variables addr_first and addr_last are used if HAS_DATAFLASH even if SYS_NO_FLASH (meaning no NOR flash). This adds the definitions withing the brace where the names are used, to avoid cluttering the initial ifdef. Signed-off-by: Alessandro

Re: [U-Boot] [RFC] CONFIG naming convetion

2009-07-20 Thread Alessandro Rubini
I would think should be CONFIG_DRIVERS_PATA_BFIN I dosagree, the DRIVERS part is just added line noise. It's a name space - making sure it is differentiated from an option. Yeah, and we end up with variable names that cannot be used any more because they exceed the maximum line

Re: [U-Boot] [PATCH 0/2] arm nomadik: gpio and i2c

2009-07-20 Thread Alessandro Rubini
Agreed. So we need an gpio_core.c / .h which defines the following functions (just a proposal): Yes. typedef struct gpio_adapter { int (*init_pin)(int pin); int (*set)(int pin, value); int (*get)(int pin); int (*dir)(int pin, int direction);

Re: [U-Boot] [PATCH 0/2] arm nomadik: gpio and i2c

2009-07-20 Thread Alessandro Rubini
what with deinit_pin(pin, function)? That would be in shape with init_pin()? No, it's not clear what it is. I'd rename init to setup, adding an AF argument. So I can setup it as AF2, or as GPIO-OUT, or whatever. (There, we could also unset the marker, that this pin is no longer used for gpio

Re: [U-Boot] U-Boot environment update in linux embedded ARM architecture

2009-07-20 Thread Alessandro Rubini
0x2 *U-Boot (2009.06)* 0x6 *U-Boot Env.* So two blocks. for u-boot, which is bigger than one block. the u-boot environment part of the u-boot code is overwritten with the environment parameters. This happens only when our NAND flash has bad blocks in the u-boot zone. (Block 1 and

[U-Boot] [PATCH] lcd.h: define extern vidinfo_t for all cases

2009-07-21 Thread Alessandro Rubini
From: Alessandro Rubini rub...@gnudd.com include/lcd.h has different vidinfo for different platforms, and several extern declaration, but one for the default case was missing. This makes them a single extern declaration for everyone. Signed-off-by: Alessandro Rubini rub...@gnudd.com --- include

[U-Boot] [PATCH] Nomadik: fix reset_timer()

2009-09-28 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it The timer decrements and READ_TIMER() negates the value read. Writing 0 in reset_timer() is this wrong, as a readback before 400us will read back 0 and will report 1780 seconds, so nand operations did timeout. This patch writes ~0 in reset_timer to prevent

[U-Boot] [PATCH 0/3] make memcpy and memset 32-bit copies

2009-10-07 Thread Alessandro Rubini
the #if 0 part in the scroll function. For me it's 4 times faster (help from 14s to 3.5s). I agree I should use 8-bits in u-boot, but the speedup of 32bit memcpy/memset is there regardless, as most users are 32-bit aligned anyways. Alessandro Rubini (3): memcpy: use 32-bit copies if possible

[U-Boot] [PATCH 1/3] memcpy: use 32-bit copies if possible

2009-10-07 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- lib_generic/string.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/lib_generic/string.c b/lib_generic/string.c

[U-Boot] [PATCH 3/3] lcd: remove '#if 0' 32-bit scroll, now memcpy does it

2009-10-07 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- common/lcd.c | 21 - 1 files changed, 0 insertions(+), 21 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index dc8fea6

[U-Boot] [PATCH 2/3] memset: use 32-bit copies if possible

2009-10-07 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- lib_generic/string.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/lib_generic/string.c b/lib_generic

Re: [U-Boot] [PATCH 1/3] memcpy: use 32-bit copies if possible

2009-10-07 Thread Alessandro Rubini
while 64bit isnt in today, might as well avoid unclean code from the start when possible. in other words, used unsigned int rather than u32 and cast to unsigned long rather than int. You are right. Will do. +count /= 4; count = 2 ? although gcc probably optimizes this

Re: [U-Boot] [PATCH 1/3] memcpy: use 32-bit copies if possible

2009-10-08 Thread Alessandro Rubini
I was making my v2, and I found a problem wrt: while 64bit isnt in today, might as well avoid unclean code from the start when possible. in other words, used unsigned int rather than u32 and cast to unsigned long rather than int. Since int is 32 also on 64bit systems, I used unsigned long.

[U-Boot] [PATCH V2 0/3] make memcpy and memset faster

2009-10-08 Thread Alessandro Rubini
. Similarly, I'm not interested in 4 bytes at a time, then 1 at a time as it's quite a corner case. If such optimizations are really useful, then we'd better have hand-crafted assembly for each arch, possibly lifted from glibc. Alessandro Rubini (3): memcpy: copy one word at a time if possible

[U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- lib_generic/string.c | 17 + 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib_generic/string.c b/lib_generic

[U-Boot] [PATCH V2 2/3] memset: fill one word at a time if possible

2009-10-08 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- lib_generic/string.c | 17 - 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/lib_generic/string.c b/lib_generic

[U-Boot] [PATCH V2 3/3] lcd: remove '#if 0' 32-bit scroll, now memcpy does it

2009-10-08 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- common/lcd.c | 21 - 1 files changed, 0 insertions(+), 21 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index dc8fea6

[U-Boot] [PATCH] setenv: do console redirection even if previously unset

2009-10-08 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it If stdout is not previously set, doing setenv stdout lcd had no effect, since console redirection only worked if the environment variable was already set; the second time you run setenv it worked. Most default environments lack stdin/out/err definitions, so

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Alessandro Rubini
No interest in the suggestion to not require count to be an exact multiple of 4/8? Actually, I wrote about that in my patch 0/3. I don't think it would be that hard to update the logic accordingly and this would let your code be utilized much more often, especially if/when we run on a

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Alessandro Rubini
That's true, but I think the most important case is lcd scrolling, where it's usually a big power of two -- that's where we had the #ifdef, so the problem was known, I suppose. I think the most important case for *you* is lcd scrolling, but for 99% of everyone else, it isn't at all:) Well,

Re: [U-Boot] [PATCH V2 1/3] memcpy: copy one word at a time if possible

2009-10-08 Thread Alessandro Rubini
The statistics are going to be very different for different scenarios. Yes, I know. For example, network operations seem to be the majority of your large memcpys, this isn't the case for everyone. True. I noticed it after sending -- although I expected it. In any case, my only suggestion

[U-Boot] [PATCH V3 1/3] lib_generic memcpy: copy one word at a time if possible

2009-10-09 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it If source and destination are aligned, this copies ulong values until possible, trailing part is copied by byte. Thanks for the details to Wolfgang Denk, Mike Frysinger, Peter Tyser, Chris Moore. Signed-off-by: Alessandro Rubini rub...@unipv.it Acked

[U-Boot] [PATCH V3 2/3] lib_generic memset: fill one word at a time if possible

2009-10-09 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it If the destination is aligned, fill ulong values until possible. Then fill remaining part by bytes. Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- lib_generic/string.c | 22

[U-Boot] [PATCH V3 3/3] lcd: remove '#if 0' 32-bit scroll, now memcpy does it

2009-10-09 Thread Alessandro Rubini
Actually, we should use memmove here, as areas overlap, but memmove is not yet optimized. From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- common/lcd.c | 21 - 1 files changed, 0

Re: [U-Boot] [PATCH V3 1/3] lib_generic memcpy: copy one word at a time if possible

2009-10-09 Thread Alessandro Rubini
i think you want to drop the count from the list, otherwise we dont consume the leading groups of 4 bytes if count isnt a multiple of 4. Yes, same for memset. See Wolfgang it was not 10% more? These micro optimizations are hairy, as you need to measure them to make sure they work. Ok, V4

[U-Boot] [PATCH 2/8] include/nomadik.h: add physical address for cldc

2009-10-09 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- include/nomadik.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/nomadik.h b/include/nomadik.h index d9405fd..ea65b2d

[U-Boot] [PATCH 3/8] drivers/misc: add stmpe2401 port extender and keypad controller

2009-10-09 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- drivers/misc/Makefile|1 + drivers/misc/stmpe2401.c | 176 ++ include/stmpe2401.h | 66

[U-Boot] [PATCH 4/8] nhk8815.h: define we need stmpe

2009-10-09 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- include/configs/nhk8815.h |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/include/configs/nhk8815.h b/include/configs

[U-Boot] [PATCH 5/8] lcd: make 16bpp work

2009-10-09 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- common/lcd.c | 26 -- 1 files changed, 20 insertions(+), 6 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index

[U-Boot] [PATCH 0/8] ARM Nomadik: video and keypad for nhk8815 (and RFC inside)

2009-10-09 Thread Alessandro Rubini
it at this point. Similarly, there are no comments within each patch, I'll split this explanation in proper places for V2. Alessandro Rubini (8): video: add amba-clcd prime-cell include/nomadik.h: add physical address for cldc drivers/misc: add stmpe2401 port extender and keypad controller nhk8815.h

[U-Boot] [PATCH 6/8] nhk8815: added keypad

2009-10-09 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- board/st/nhk8815/Makefile |5 ++- board/st/nhk8815/keypad.c | 100 board/st/nhk8815/nhk8815.c |5

[U-Boot] [PATCH 7/8] nhk8815: start lower in RAM, so the 800x480 frame buffer fits

2009-10-09 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- board/st/nhk8815/config.mk |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/board/st/nhk8815/config.mk b/board/st/nhk8815

[U-Boot] [PATCH 8/8] nhk8815: added lcd support

2009-10-09 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- board/st/nhk8815/Makefile |1 + board/st/nhk8815/lcd.c | 89 board/st/nhk8815/nhk8815.c |4

Re: [U-Boot] [PATCH V3 1/3] lib_generic memcpy: copy one word at a time if possible

2009-10-10 Thread Alessandro Rubini
Hello Chris +unsigned long *dl = (unsigned long *)dest, *sl = (unsigned long *)src; Nitpick: Are you sure the casts are necessary here ? Without the one on src it complains because of const. So I write both for symetry. + if ( (((ulong)dest | (ulong)src) (sizeof(*dl) - 1)) == 0) {

[U-Boot] [PATCH V4 1/3] lib_generic memcpy: copy one word at a time if possible

2009-10-10 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it If source and destination are aligned, this copies ulong values until possible, trailing part is copied by byte. Thanks for the details to Wolfgang Denk, Mike Frysinger, Peter Tyser, Chris Moore. Signed-off-by: Alessandro Rubini rub...@unipv.it Acked

[U-Boot] [PATCH V4 2/3] lib_generic memset: fill one word at a time if possible

2009-10-10 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it If the destination is aligned, fill ulong values until possible. Then fill remaining part by byte. Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com Acked-by: Mike Frysinger vap...@gentoo.org

[U-Boot] [PATCH V4 3/3] lcd: remove '#if 0' 32-bit scroll, now memcpy does it

2009-10-10 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- common/lcd.c | 21 - 1 files changed, 0 insertions(+), 21 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index dc8fea6

Re: [U-Boot] [PATCH V4 2/3] lib_generic memset: fill one word at a time if possible

2009-10-10 Thread Alessandro Rubini
The above while can be slow if not the complier manages to turn into: But the compiler is able, and Wolfgang already told that in another thread. Yes, I checked my assembly. No, not all platforms and all versions. like Wolfgang. I think you may have a point, but unless you have a measured

[U-Boot] [PATCH (repost)] Nomadik: fix reset_timer()

2009-11-03 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it The timer decrements and READ_TIMER() negates the value read. Writing 0 in reset_timer() is this wrong, as a readback before 400us will read back 0 and will report 1780 seconds, so nand operations did timeout. This patch writes ~0 in reset_timer to prevent

Re: [U-Boot] [PATCH (repost)] Nomadik: fix reset_timer()

2009-11-03 Thread Alessandro Rubini
Um... why is READ_TIMER doing such a stupid thing as negating values? Because the counter counts down. I could have returns 0 - value or ~value. Since I chose the latter initially, this fix keeps the same approach. I can't return the value I read, since it goes backwards. /alessandro

Re: [U-Boot] [PATCH (repost)] Nomadik: fix reset_timer()

2009-11-03 Thread Alessandro Rubini
Well, to me READ_TIMER() sounds like a function/macro to read some value from some timer; if that timer counts doen, then successive calls to that macro/function would return decreasing values. Counting up or down is a property of the specific timer and should be handled elsewhere; such

[U-Boot] [PATCH V3] Nomadik: fix reset_timer()

2009-11-06 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Previous code was failing when reading back the timer less than 400us after resetting it. This lead nand operations to incorrectly timeout any now and then. This changes READ_TIMER from negation to subtraction, so after writing 0 to reset it, an immediate

[U-Boot] [PATCH V2] Nomadik: fix reset_timer()

2009-11-06 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Previously the code wrote 0 to reset the counter and used negation to read an increasing value from the register. However, a readback before 400us still returned 0, which was reported as 1780 seconds, thus nand failed to work any now and then. As suggested

Re: [U-Boot] [PATCH 1/2] ARM Conditionally compile board LED functions

2009-11-12 Thread Alessandro Rubini
I withdraw this patch. I will rethink this and come up with something better. I agree weak is better than ifdef. But the led situation on ARM isn't really pleasant when you look in lib_arm/board.c . When I proposed a simplification of board.c back on Jul 22 ([RFC] arm/board.c: avoid ifdef

Re: [U-Boot] [PATCH 6/8] nhk8815: added keypad

2009-11-22 Thread Alessandro Rubini
Hello Wolfgang. Thanks for looking at my patch-set. +printf(%s:%s\n, __FILE__, __func__); Guess this should be debug() instead? Actually, this was meant to be removed in final code. As explained in the 0/8 message, this patch set was mainly and RFC, as some of the stuff looked

Re: [U-Boot] [PATCH 8/8] nhk8815: added lcd support

2009-11-25 Thread Alessandro Rubini
I'm almost done with the requested changes on this patch set, will post V2 this evening after re-running ./makeall as needed. I've a question, though: +extern int nhk8815_backlight_on(void); /* in ./lcd.c */ Please move prototype decl;arations to some header file.

[U-Boot] [PATCH V2 0/9] display and keypad support for nhk8815

2009-11-25 Thread Alessandro Rubini
prototypes Alessandro Rubini (9): nhk8815: change the order of initialization video: add amba-clcd prime-cell include/nomadik.h: add physical address for cldc drivers/misc: add stmpe2401 port extender and keypad controller nhk8815.h: define we need stmpe lcd: make 16bpp work nhk8815

[U-Boot] [PATCH V2 1/9] nhk8815: change the order of initialization

2009-11-25 Thread Alessandro Rubini
From: Alessandro Rubini rub...@unipv.it Some inizialization was in board_late_init(), but to satisfy drivers added in the next patches must be performed in normal board_init. This patch leaves board_late_init() empty, but later patches fill it. Signed-off-by: Alessandro Rubini rub...@unipv.it

  1   2   3   >