Re: [U-Boot] [PATCH 07/10] Rearrange i386 Interupt Handling

2009-10-20 Thread Joakim Tjernlund
In preperation for full relocation Signed-off-by: Graeme Russ graeme.r...@gmail.com --- cpu/i386/Makefile |2 +- cpu/i386/cpu.c |1 - cpu/i386/exceptions.c | 229 - cpu/i386/interrupts.c | 431

Re: [U-Boot] Relocation size penalty calculation

2009-10-17 Thread Joakim Tjernlund
Graeme Russ graeme.r...@gmail.com wrote on 17/10/2009 07:17:04: [SNIP] Apologies if this is getting way off-topic for a simple boot loader, but this is information I have gathered from far and wide over the net. I am surprised that there isn't a web site out there on 'How to create a

Re: [U-Boot] Relocation size penalty calculation

2009-10-14 Thread Joakim Tjernlund
J. William Campbell jwilliamcampb...@comcast.net wrote on 14/10/2009 01:48:52: Joakim Tjernlund wrote: Graeme Russ graeme.r...@gmail.com wrote on 13/10/2009 22:06:56: On Tue, Oct 13, 2009 at 10:53 PM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: Graeme Russ graeme.r

Re: [U-Boot] Relocation size penalty calculation

2009-10-14 Thread Joakim Tjernlund
Graeme Russ graeme.r...@gmail.com wrote on 14/10/2009 13:48:27: On Wed, Oct 14, 2009 at 6:25 PM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: J. William Campbell jwilliamcampb...@comcast.net wrote on 14/10/2009 01:48:52: Joakim Tjernlund wrote: Graeme Russ graeme.r

Re: [U-Boot] Relocation size penalty calculation

2009-10-14 Thread Joakim Tjernlund
J. William Campbell jwilliamcampb...@comcast.net wrote on 14/10/2009 17:35:44: Joakim Tjernlund wrote: J. William Campbell jwilliamcampb...@comcast.net wrote on 14/10/2009 01:48:52: Joakim Tjernlund wrote: Graeme Russ graeme.r...@gmail.com wrote on 13/10/2009 22:06:56

Re: [U-Boot] Relocation size penalty calculation

2009-10-13 Thread Joakim Tjernlund
Graeme Russ graeme.r...@gmail.com wrote on 13/10/2009 13:21:05: On Sun, Oct 11, 2009 at 11:51 PM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: Graeme Russ graeme.r...@gmail.com wrote on 11/10/2009 12:47:19: [Massive Snip :)] So, all that is left are .dynsym and .dynamic

Re: [U-Boot] Relocation size penalty calculation

2009-10-13 Thread Joakim Tjernlund
J. William Campbell jwilliamcampb...@comcast.net wrote on 13/10/2009 18:30:43: Joakim Tjernlund wrote: Graeme Russ graeme.r...@gmail.com wrote on 13/10/2009 13:21:05: On Sun, Oct 11, 2009 at 11:51 PM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: Graeme Russ graeme.r

Re: [U-Boot] Relocation size penalty calculation

2009-10-13 Thread Joakim Tjernlund
Graeme Russ graeme.r...@gmail.com wrote on 13/10/2009 22:06:56: On Tue, Oct 13, 2009 at 10:53 PM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: Graeme Russ graeme.r...@gmail.com wrote on 13/10/2009 13:21:05: On Sun, Oct 11, 2009 at 11:51 PM, Joakim Tjernlund joakim.tjernl

Re: [U-Boot] Relocation size penalty calculation

2009-10-10 Thread Joakim Tjernlund
Graeme Russ graeme.r...@gmail.com wrote on 10/10/2009 06:43:52: On Fri, Oct 9, 2009 at 10:12 AM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: On Fri, Oct 9, 2009 at 9:27 AM, J. William Campbell jwilliamcampb...@comcast.net wrote: Graeme Russ wrote: On Fri, Oct 9, 2009

Re: [U-Boot] Relocation size penalty calculation

2009-10-10 Thread Joakim Tjernlund
Graeme Russ graeme.r...@gmail.com wrote on 10/10/2009 10:46:52: On Sat, Oct 10, 2009 at 7:07 PM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: Graeme Russ graeme.r...@gmail.com wrote on 10/10/2009 06:43:52: On Fri, Oct 9, 2009 at 10:12 AM, Joakim Tjernlund joakim.tjernl

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

2009-10-10 Thread Joakim Tjernlund
u-boot-boun...@lists.denx.de wrote on 10/10/2009 11:51:16: From: Alessandro Rubini rubini-l...@gnudd.com To: u-boot@lists.denx.de Cc: stericsson_nomadik_li...@list.st.com, andrea.ga...@stericsson.com Date: 10/10/2009 11:51 Subject: [U-Boot] [PATCH V4 2/3] lib_generic memset:

Re: [U-Boot] Relocation size penalty calculation

2009-10-10 Thread Joakim Tjernlund
Graeme Russ graeme.r...@gmail.com wrote on 10/10/2009 12:38:19: On Sat, Oct 10, 2009 at 8:27 PM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: Graeme Russ graeme.r...@gmail.com wrote on 10/10/2009 10:46:52: On Sat, Oct 10, 2009 at 7:07 PM, Joakim Tjernlund joakim.tjernl

Re: [U-Boot] Relocation size penalty calculation

2009-10-10 Thread Joakim Tjernlund
Graeme Russ graeme.r...@gmail.com wrote on 10/10/2009 13:21:10: On Sat, Oct 10, 2009 at 9:47 PM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: Graeme Russ graeme.r...@gmail.com wrote on 10/10/2009 12:38:19: On Sat, Oct 10, 2009 at 8:27 PM, Joakim Tjernlund joakim.tjernl

Re: [U-Boot] Relocation size penalty calculation

2009-10-10 Thread Joakim Tjernlund
Mike Frysinger vap...@gentoo.org wrote on 10/10/2009 18:52:29: On Saturday 10 October 2009 06:47:42 Joakim Tjernlund wrote: Graeme Russ graeme.r...@gmail.com wrote on 10/10/2009 12:38:19: -fpic / -pic make no difference not on x86, on ppc it is a big difference. i think you guys mean

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-10-08 Thread Joakim Tjernlund
Dear Joakim Tjernlund, In message 1254960231-11441-1-git-send-email-joakim.tjernl...@transmode.se you wrote: NULL is an absolute value and should not be relocated. After this correction code like: void weak_fun(void) __attribute__((weak)); printf(weak_fun:%p\n, weak_fun

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

2009-10-08 Thread Joakim Tjernlund
Dear Alessandro Rubini, In message 20091008074114.ga30...@mail.gnudd.com you wrote: Since int is 32 also on 64bit systems, I used unsigned long. Note that this is not guaranteed, though. It could be 64 bit as well. /* do it one word at a time (32 bits or 64 bits) if possible

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

2009-10-08 Thread Joakim Tjernlund
Wolfgang Denk w...@denx.de wrote on 08/10/2009 14:49:15: Dear Joakim Tjernlund, In message OF26FEA2CB.36E102EE-ONC1257649.0031301D-C1257649. 0031e...@transmode.se you wrote: How about: cl = 0; for (i=0; isizeof(long); ++i) { cl = 8; cl |= c

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-10-08 Thread Joakim Tjernlund
Wolfgang Denk w...@denx.de wrote on 08/10/2009 14:44:07: Dear Joakim Tjernlund, In message OF5F1602B1.C165074D-ONC1257649.0030F813-C1257649. 00311...@transmode.se you wrote: Could you next time _please_ add this v3 information to the Subject:, say as [PATCH v3] relocation

Re: [U-Boot] Relocation size penalty calculation

2009-10-08 Thread Joakim Tjernlund
On Fri, Oct 9, 2009 at 9:27 AM, J. William Campbell jwilliamcampb...@comcast.net wrote: Graeme Russ wrote: On Fri, Oct 9, 2009 at 2:58 AM, J. William Campbell jwilliamcampb...@comcast.net wrote: Graeme Russ wrote: Out of curiosity, I wanted to see just how much of a size

Re: [U-Boot] [PATCH 0/2] Make sure 85xx bss doesn't start at 0x0

2009-10-07 Thread Joakim Tjernlund
On Wed, Oct 7, 2009 at 5:55 PM, Wolfgang Denk w...@denx.de wrote: Dear Graeme Russ, In message d66caabb0910061824s4165d33bu5d5213f6783c0...@mail.gmail.com you wrote: I think that even the -mrelocatable / .fixup method may not be needed at all. -pie / -pic used by themselves

[U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-10-07 Thread Joakim Tjernlund
NULL is an absolute value and should not be relocated. After this correction code like: void weak_fun(void) __attribute__((weak)); printf(weak_fun:%p\n, weak_fun); will still print null after relocation. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- So here is the latest

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-10-07 Thread Joakim Tjernlund
Peter Tyser pty...@xes-inc.com wrote on 08/10/2009 01:49:40: Hi Jocke, v2: included ppc4xx too. Looks like cpu/74xx_7xx is missing too:( Yeah, the cpu directory is a mess. Sending a new version. cpu/mpc512x/start.S |6 -- cpu/mpc5xx/start.S |6 --

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-10-06 Thread Joakim Tjernlund
Wolfgang Denk w...@denx.de wrote on 06/10/2009 10:58:53: Dear Peter Tyser, In message 1254784811.24664.968.ca...@localhost.localdomain you wrote: 1. is just a small fix the the existing asm reloc functions. Pretty much ready but needs some linker tweeks it seems. No idea if other

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-10-03 Thread Joakim Tjernlund
Wolfgang Denk w...@denx.de wrote on 03/10/2009 10:13:45: Dear Jocke Peter, In message OF1F14A150.6DF103F0-ONC125763F.00559936-C125763F. 0055d...@transmode.se you wrote: ehh, that is strange. Did you run a make clean in between? Do you see any bl _global_offset_tab...@local-4 if you

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-10-03 Thread Joakim Tjernlund
Wolfgang Denk w...@denx.de wrote on 03/10/2009 14:13:57: Dear Joakim Tjernlund, In message OF3474ED49.C18DA041-ONC1257644.0033ADEB-C1257644. 00341...@transmode.se you wrote: It seems discussion stopped here. Is it correct forme to assume that there is no patch available yet

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-09-28 Thread Joakim Tjernlund
Graeme Russ graeme.r...@gmail.com wrote on 28/09/2009 01:23:36: On Mon, Sep 28, 2009 at 2:18 AM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: Graeme Russ graeme.r...@gmail.com wrote on 27/09/2009 15:52:38: On Sun, Sep 27, 2009 at 11:15 PM, Joakim Tjernlund joakim.tjernl

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-09-28 Thread Joakim Tjernlund
Peter Tyser pty...@xes-inc.com wrote on 28/09/2009 06:31:28: On Sun, 2009-09-27 at 15:15 +0200, Joakim Tjernlund wrote: Wolfgang Denk w...@denx.de wrote on 23/09/2009 20:23:14: Dear Peter Tyser, In message 1253710639.3968.19.ca...@ptyser-laptop you wrote: My fix

[U-Boot] [PATCH] [RFC]mpc83xx: Remove need for -ffixed-r14

2009-09-28 Thread Joakim Tjernlund
Seems to me that the only need for -ffixed-r14 is to find transfer_to_handler from whithin an IRQ. Add transfer_to_handler to the trap relocation so the need for a GOT access in IRQ context goes away. NOTE: This will break other PPC archs until their start.S is updated accordingly. Comments? ---

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-09-28 Thread Joakim Tjernlund
Peter Tyser pty...@xes-inc.com wrote on 28/09/2009 14:45:46: On Mon, 2009-09-28 at 09:34 +0200, Joakim Tjernlund wrote: Peter Tyser pty...@xes-inc.com wrote on 28/09/2009 06:31:28: On Sun, 2009-09-27 at 15:15 +0200, Joakim Tjernlund wrote: Wolfgang Denk w...@denx.de wrote on 23/09

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-09-28 Thread Joakim Tjernlund
Peter Tyser pty...@xes-inc.com wrote on 28/09/2009 14:45:46: On Mon, 2009-09-28 at 09:34 +0200, Joakim Tjernlund wrote: Peter Tyser pty...@xes-inc.com wrote on 28/09/2009 06:31:28: On Sun, 2009-09-27 at 15:15 +0200, Joakim Tjernlund wrote: Wolfgang Denk w...@denx.de wrote on 23/09

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-09-28 Thread Joakim Tjernlund
Peter Tyser pty...@xes-inc.com wrote on 28/09/2009 16:29:15: Anyhow, I have also been thinking/working on making U-boot fully PIC and reached a important conclusion. The GOT holds absolute ptr values and there is not much one can do about it sans modifying gcc.

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-09-28 Thread Joakim Tjernlund
Peter Tyser pty...@xes-inc.com wrote on 28/09/2009 17:08:58: Peter, I just discovered that my gcc 3.4.6 allows me to use -mrelocatable with -fpie -fpie is about the same as -fpic and -fPIE is similar to -fPIC -fpie generates smaller code so one could consider using -fpie and

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-09-28 Thread Joakim Tjernlund
Peter Tyser pty...@xes-inc.com wrote on 28/09/2009 17:08:58: Peter, I just discovered that my gcc 3.4.6 allows me to use -mrelocatable with -fpie -fpie is about the same as -fpic and -fPIE is similar to -fPIC -fpie generates smaller code so one could consider using -fpie and

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-09-27 Thread Joakim Tjernlund
Wolfgang Denk w...@denx.de wrote on 23/09/2009 20:23:14: Dear Peter Tyser, In message 1253710639.3968.19.ca...@ptyser-laptop you wrote: My fix to the linker script was to change: __bss_start = .; into: __bss_start = . | 4; ie, a big hack, but it did work:) I'll take a peek at a

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-09-27 Thread Joakim Tjernlund
Graeme Russ graeme.r...@gmail.com wrote on 27/09/2009 15:52:38: On Sun, Sep 27, 2009 at 11:15 PM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: Wolfgang Denk w...@denx.de wrote on 23/09/2009 20:23:14: Dear Peter Tyser, In message 1253710639.3968.19.ca...@ptyser-laptop you

Re: [U-Boot] [PATCH 00/13] ppc: Fix relocation

2009-09-24 Thread Joakim Tjernlund
On Thursday 24 September 2009 16:28:39 Peter Tyser wrote: All patches applied to reloc branch. Thanks for all this work. So far the only issue I've seen (I didn't do any actual testing yet, though) is the missing increment to the XF_VERSION value to indicate incompatibility with

Re: [U-Boot] [PATCH 1/3] fsl_i2c: Wait for STOP condition to propagate

2009-09-23 Thread Joakim Tjernlund
Dear Joakim Tjernlund, In message 1253178437-32398-1-git-send-email-joakim.tjernl...@transmode.se you wrote: After issuing a STOP one must wait until the STOP has completed on the bus before doing something new to the controller. Also add an extra read of SR as the manual mentions

Re: [U-Boot] [PATCH 1/3] fsl_i2c: Wait for STOP condition to propagate

2009-09-23 Thread Joakim Tjernlund
Heiko Schocher heiko.schoc...@invitel.hu wrote on 23/09/2009 11:02:09: Hello Joakim, Joakim Tjernlund wrote: Dear Joakim Tjernlund, In message 1253178437-32398-1-git-send-email- joakim.tjernl...@transmode.se you wrote: After issuing a STOP one must wait until the STOP has completed

[U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-09-23 Thread Joakim Tjernlund
NULL is an absolute value and should not be relocated. After this correction code like: void weak_fun(void) __attribute__((weak)); printf(weak_fun:%p\n, weak_fun); will still print null after relocation. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- I have only tested

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-09-23 Thread Joakim Tjernlund
Stefan Roese s...@denx.de wrote on 23/09/2009 14:24:34: On Wednesday 23 September 2009 13:51:46 Joakim Tjernlund wrote: NULL is an absolute value and should not be relocated. After this correction code like: void weak_fun(void) __attribute__((weak)); printf(weak_fun:%p\n, weak_fun

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-09-23 Thread Joakim Tjernlund
Peter Tyser pty...@xes-inc.com wrote on 23/09/2009 14:17:51: On Wed, 2009-09-23 at 13:51 +0200, Joakim Tjernlund wrote: NULL is an absolute value and should not be relocated. After this correction code like: void weak_fun(void) __attribute__((weak)); printf(weak_fun:%p\n, weak_fun

Re: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

2009-09-23 Thread Joakim Tjernlund
) wants to play some more. I will answer questions though. From 684443ce6870eac2878026e47cc107fbfcdefc02 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund joakim.tjernl...@transmode.se Date: Wed, 23 Sep 2009 18:41:44 +0200 Subject: [PATCH] relocation: Use C as much as possible to do relocation

Re: [U-Boot] [PATCH 00/13] ppc: Fix relocation

2009-09-22 Thread Joakim Tjernlund
This series attempts to fix relocation to RAM for ppc boards. I split the patches up pretty liberally, let me know if you'd like them organized differently. I tried to be thorough during the changes (especially #1), let me know if I missed anything, there's lots of linker scripts for ppc

Re: [U-Boot] MPC83xx and uec

2009-09-22 Thread Joakim Tjernlund
I can't find a way to get at uec_info_t/STD_UEC_INFO from my board_eth_init() in current u-boot. Am I missing something? Also drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info); include/netdev.h:int uec_initialize(int index); different prototypes for the same function.

[U-Boot] [PATCH] fsl_i2c: Do not generate STOP after read.

2009-09-22 Thread Joakim Tjernlund
__i2c_read always ends with a STOP condition thereby releasing the bus. It is cleaner to do the STOP magic in i2c_read(), like i2c_write() does. This may also help future multimaster systems which wants to hold on to the bus until all transactions are finished. Signed-off-by: Joakim Tjernlund

Re: [U-Boot] MPC83xx and uec

2009-09-22 Thread Joakim Tjernlund
Anton Vorontsov avoront...@ru.mvista.com wrote on 22/09/2009 15:51:17: From: Anton Vorontsov avoront...@ru.mvista.com To: Joakim Tjernlund joakim.tjernl...@transmode.se Cc: u-boot@lists.denx.de, kim.phill...@freescale.com Date: 22/09/2009 15:51 Subject: Re: [U-Boot] MPC83xx

Re: [U-Boot] MPC83xx and uec

2009-09-22 Thread Joakim Tjernlund
Ben Warren biggerbadder...@gmail.com wrote on 22/09/2009 18:55:22: Anton Vorontsov wrote: On Tue, Sep 22, 2009 at 04:03:16PM +0200, Joakim Tjernlund wrote: [...] Also drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info); include/netdev.h:int uec_initialize(int index

Re: [U-Boot] [PATCH 3/3] fsl_i2c: Impl. AN2919, rev 5 to calculate FDR/DFSR

2009-09-21 Thread Joakim Tjernlund
Wolfgang Grandegger w...@denx.de wrote on 21/09/2009 12:53:36: Hi Joakim, Joakim Tjernlund wrote: The latest AN2919 has changed the way FDR/DFSR should be calculated. Update the driver according to spec. However, Condition 2 is not accounted for as it is not clear how to do so. I

Re: [U-Boot] [PATCH 3/3] fsl_i2c: Impl. AN2919, rev 5 to calculate FDR/DFSR

2009-09-21 Thread Joakim Tjernlund
Wolfgang Grandegger w...@denx.de wrote on 21/09/2009 13:59:04: Joakim Tjernlund wrote: Wolfgang Grandegger w...@denx.de wrote on 21/09/2009 12:53:36: Hi Joakim, Joakim Tjernlund wrote: The latest AN2919 has changed the way FDR/DFSR should be calculated. Update the driver according

Re: [U-Boot] [TESTING PATCH] ppc: Relocation test patch

2009-09-18 Thread Joakim Tjernlund
Peter Tyser pty...@xes-inc.com wrote on 17/09/2009 19:29:18: From: Peter Tyser pty...@xes-inc.com To: Joakim Tjernlund joakim.tjernl...@transmode.se Cc: pieter.voorthuij...@prodrive.nl, u-boot@lists.denx.de, Wolfgang Denk w...@denx.de Date: 17/09/2009 19:29 Subject: Re: [U

Re: [U-Boot] [TESTING PATCH] ppc: Relocation test patch

2009-09-18 Thread Joakim Tjernlund
Peter Tyser pty...@xes-inc.com wrote on 18/09/2009 16:28:35: On Thu, 2009-09-17 at 09:06 +0200, Joakim Tjernlund wrote: When preparing the ppc relocation patches I noticed that the gcc -mrelocatable compiler flag increases the .reloc section by 3 or 4 Kbytes. I did

Re: [U-Boot] [TESTING PATCH] ppc: Relocation test patch

2009-09-18 Thread Joakim Tjernlund
Peter Tyser pty...@xes-inc.com wrote on 18/09/2009 17:21:57: Sorry, I don't have an example. Just a guess, weak function references: void weak_fun(void) __attribute__ ((weak)); if (weak_fun) weak_fun(); Using default weak functions as well as overridden weak functions both

Re: [U-Boot] [TESTING PATCH] ppc: Relocation test patch

2009-09-18 Thread Joakim Tjernlund
Peter Tyser pty...@xes-inc.com wrote on 18/09/2009 18:24:48: Sorry, I don't have an example. Just a guess, weak function references: void weak_fun(void) __attribute__ ((weak)); if (weak_fun) weak_fun(); Using default weak functions as well as overridden weak

Re: [U-Boot] [PATCH 2/2] fsl_i2c: Add CONFIG_FSL_I2C_CUSTOM_DFSR

2009-09-17 Thread Joakim Tjernlund
Wolfgang Grandegger w...@denx.de wrote on 17/09/2009 08:36:32: mpc8321, I2C bus is between 34KHz and 100KHz, CSB is 133.332 MHz OK, where can I find the new AN2819? I found Document Number: AN2919, Rev. 5, 12/2008. That is the one I found too. Jocke

Re: [U-Boot] [PATCH 3/3] fsl_i2c: Impl. AN2819, rev 5 to calculate FDR/DFSR

2009-09-17 Thread Joakim Tjernlund
Heiko Schocher h...@denx.de wrote on 17/09/2009 08:00:34: Hello Joakim, Hi Heiko Joakim Tjernlund wrote: The latest AN2819 has changed the way FDR/DFSR should be calculated. Update the driver according to spec. However, Condition 2 is not accounted for as it is not clear how to do so

Re: [U-Boot] [TESTING PATCH] ppc: Relocation test patch

2009-09-17 Thread Joakim Tjernlund
When preparing the ppc relocation patches I noticed that the gcc -mrelocatable compiler flag increases the .reloc section by 3 or 4 Kbytes. I did a compile test, and this increase pushes the ALPR board back over 256K (it recently had the same size issue, see ppc4xx: Remove some features

Re: [U-Boot] [TESTING PATCH] ppc: Relocation test patch

2009-09-17 Thread Joakim Tjernlund
Wolfgang Denk w...@denx.de wrote on 17/09/2009 09:50:51: Dear Joakim Tjernlund, In message OFF85C09CB.2A4A1999-ONC1257634.0025DF59-C1257634. 00270...@transmode.se you wrote: One day we can fit the whole relocation table into built-in CPU memory, hopefully that will make it possible

[U-Boot] [PATCH 2/3] fsl_i2c: Add CONFIG_FSL_I2C_CUSTOM_{DFSR/FDR}

2009-09-17 Thread Joakim Tjernlund
Some boards need a higher DFSR value than the spec currently recommends so give these boards the means to define there own. For completeness, add CONFIG_FSL_I2C_CUSTOM_FDR too. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- drivers/i2c/fsl_i2c.c | 14 +++--- 1 files

[U-Boot] [PATCH 3/3] fsl_i2c: Impl. AN2919, rev 5 to calculate FDR/DFSR

2009-09-17 Thread Joakim Tjernlund
The latest AN2919 has changed the way FDR/DFSR should be calculated. Update the driver according to spec. However, Condition 2 is not accounted for as it is not clear how to do so. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- drivers/i2c/fsl_i2c.c | 90

[U-Boot] [PATCH 1/3] fsl_i2c: Wait for STOP condition to propagate

2009-09-17 Thread Joakim Tjernlund
the I2C bus. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- drivers/i2c/fsl_i2c.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c index 47bbf79..56f9680 100644 --- a/drivers/i2c/fsl_i2c.c +++ b

Re: [U-Boot] [PATCH 1/3] fsl_i2c: Wait for STOP condition to propagate

2009-09-17 Thread Joakim Tjernlund
Hello Joakim, Joakim Tjernlund wrote: After issuing a STOP one must wait until the STOP has completed on the bus before doing something new to the controller. Also add an extra read of SR as the manual mentions doing that is a good idea. Remove surplus write of CR just before

Re: [U-Boot] [TESTING PATCH] ppc: Relocation test patch

2009-09-17 Thread Joakim Tjernlund
Wolfgang Denk w...@denx.de wrote on 17/09/2009 12:15:42: Dear Joakim Tjernlund, In message OFA0E17029.E568D101-ONC1257634.002EFBFD-C1257634. 002f9...@transmode.se you wrote: One day we can fit the whole relocation table into built-in CPU memory, hopefully that will make

Re: [U-Boot] [TESTING PATCH] ppc: Relocation test patch

2009-09-17 Thread Joakim Tjernlund
Wolfgang Denk w...@denx.de wrote on 17/09/2009 14:53:59: Dear Joakim Tjernlund, Dear me :) In message OF680476D5.A9D9D259-ONC1257634.00449AC4-C1257634. 00451...@transmode.se you wrote: But why has the GOT table to fit into built-in CPU memory? When we are about to relocate U-Boot

Re: [U-Boot] [PATCH 2/3] fsl_i2c: Add CONFIG_FSL_I2C_CUSTOM_{DFSR/FDR}

2009-09-17 Thread Joakim Tjernlund
Joakim Tjernlund wrote: +#ifdef CONFIG_FSL_I2C_CUSTOM_FDR + fdr = CONFIG_FSL_I2C_CUSTOM_FDR; + speed = i2c_clk / divider; /* Fake something */ How about setting 'speed' to CONFIG_SYS_I2C_SPEED? Naa, if you want that you just pass CONFIG_SYS_I2C_SPEED to i2c_init

Re: [U-Boot] [TESTING PATCH] ppc: Relocation test patch

2009-09-17 Thread Joakim Tjernlund
Graeme Russ graeme.r...@gmail.com wrote on 17/09/2009 23:57:56: On Thu, Sep 17, 2009 at 10:53 PM, Wolfgang Denk w...@denx.de wrote: Dear Joakim Tjernlund, In message OF680476D5.A9D9D259-ONC1257634.00449AC4-C1257634. 00451...@transmode.se you wrote: But why has the GOT table to fit

[U-Boot] [PATCH 2/3] fsl_i2c: Add CONFIG_FSL_I2C_CUSTOM_{DFSR/DFR}

2009-09-16 Thread Joakim Tjernlund
Some boards need a higher DFSR value than the spec currently recommends so give these boards the means to define there own. For completeness, add CONFIG_FSL_I2C_CUSTOM_DFR too. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- drivers/i2c/fsl_i2c.c | 14 +++--- 1 files

[U-Boot] [PATCH 3/3] fsl_i2c: Impl. AN2819, rev 5 to calculate FDR/DFSR

2009-09-16 Thread Joakim Tjernlund
The latest AN2819 has changed the way FDR/DFSR should be calculated. Update the driver according to spec. However, Condition 2 is not accounted for as it is not clear how to do so. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- drivers/i2c/fsl_i2c.c | 88

[U-Boot] [PATCH 1/3] fsl_i2c: Wait for STOP condition to propagate

2009-09-16 Thread Joakim Tjernlund
the I2C bus. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- drivers/i2c/fsl_i2c.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c index 47bbf79..56f9680 100644 --- a/drivers/i2c/fsl_i2c.c +++ b

Re: [U-Boot] [PATCH 2/2] fsl_i2c: Add CONFIG_FSL_I2C_CUSTOM_DFSR

2009-09-16 Thread Joakim Tjernlund
Wolfgang Grandegger w...@denx.de wrote on 16/09/2009 12:22:05: Joakim Tjernlund wrote: Timur Tabi ti...@freescale.com wrote on 15/09/2009 21:04:47: Joakim Tjernlund wrote: No, the impact on speed from DFSR is pretty small so it will be close enough. How small? From the app note

Re: [U-Boot] [PATCH 2/2] fsl_i2c: Add CONFIG_FSL_I2C_CUSTOM_DFSR

2009-09-16 Thread Joakim Tjernlund
Wolfgang Grandegger w...@grandegger.com wrote on 16/09/2009 13:45:03: Joakim Tjernlund wrote: Wolfgang Grandegger w...@denx.de wrote on 16/09/2009 12:22:05: Joakim Tjernlund wrote: Timur Tabi ti...@freescale.com wrote on 15/09/2009 21:04:47: Joakim Tjernlund wrote: No, the impact

Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-15 Thread Joakim Tjernlund
Wolfgang Grandegger w...@grandegger.com wrote on 15/09/2009 13:53:13: Joakim Tjernlund wrote: Wolfgang Grandegger wrote: I did not follow the thread yet, sorry. I implemented AN2819 for Linux (see http://lxr.linux.no/#linux+v2.6.31/drivers/i2c/busses/i2c-mpc.c) some time ago using

[U-Boot] [PATCH 1/2] fsl_i2c: Wait for STOP condition to propagate

2009-09-15 Thread Joakim Tjernlund
the I2C bus. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- drivers/i2c/fsl_i2c.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c index 47bbf79..59bfab6 100644 --- a/drivers/i2c/fsl_i2c.c +++ b

[U-Boot] [PATCH 2/2] fsl_i2c: Add CONFIG_FSL_I2C_CUSTOM_DFSR

2009-09-15 Thread Joakim Tjernlund
Some boards need a higher DFSR value than the spec currently recommends so give these boards the means to define there own. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- drivers/i2c/fsl_i2c.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git

Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-15 Thread Joakim Tjernlund
I am using 2.6.30 and I think it is fairly equal to yours. I am not using either property above so the linux i2c-mpc. driver falls back to fdr=0x31 and dfsr=0x10 and this works well. It is u-boot that isn't working. However, I have found a few driver bugs in the u-boot driver and fixing

Re: [U-Boot] [PATCH 2/2] fsl_i2c: Add CONFIG_FSL_I2C_CUSTOM_DFSR

2009-09-15 Thread Joakim Tjernlund
Joakim Tjernlund wrote: Some boards need a higher DFSR value than the spec currently recommends so give these boards the means to define there own. Wow, that was fast :) If you're going to do this, then you need to also define CONFIG_FSL_I2C_CUSTOM_FSR and CONFIG_FSL_I2C_CUSTOM_SPEED

Re: [U-Boot] [PATCH 2/2] fsl_i2c: Add CONFIG_FSL_I2C_CUSTOM_DFSR

2009-09-15 Thread Joakim Tjernlund
Timur Tabi ti...@freescale.com wrote on 15/09/2009 21:04:47: Joakim Tjernlund wrote: No, the impact on speed from DFSR is pretty small so it will be close enough. How small? From the app note: divisor = B * (A + ((3*C)/B)*2); C is dfsr and 10 = A = 30, 16 = B = 2048 Considering

Re: [U-Boot] [PATCH 2/2] fsl_i2c: Add CONFIG_FSL_I2C_CUSTOM_DFSR

2009-09-15 Thread Joakim Tjernlund
Timur Tabi ti...@freescale.com wrote on 15/09/2009 21:04:47: Joakim Tjernlund wrote: No, the impact on speed from DFSR is pretty small so it will be close enough. How small? From the app note: divisor = B * (A + ((3*C)/B)*2); C is dfsr and 10 = A = 30, 16 = B = 2048

Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-14 Thread Joakim Tjernlund
Wolfgang Grandegger wrote: I did not follow the thread yet, sorry. I implemented AN2819 for Linux (see http://lxr.linux.no/#linux+v2.6.31/drivers/i2c/busses/i2c-mpc.c) some time ago using Timur's table approach. But there is no difference between the table and the algorithm to calculate

Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-14 Thread Joakim Tjernlund
Timur Tabi wrote: Wolfgang Grandegger wrote: I did not follow the thread yet, sorry. I implemented AN2819 for Linux (see http://lxr.linux.no/#linux+v2.6.31/drivers/i2c/busses/i2c-mpc.c) some time ago using Timur's table approach. But there is no difference between the table and the

Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-11 Thread Joakim Tjernlund
Timur Tabi ti...@freescale.com wrote on 10/09/2009 18:13:03: Joakim Tjernlund wrote: This calculation does not seem to match AN2919. When I wrote the code, AN2919 was much smaller than what you have today. Suppose one used only Table 7(almost what we have if you exclude dfsr

Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-10 Thread Joakim Tjernlund
timur.t...@gmail.com wrote on 09/09/2009 16:24:15: On Wed, Sep 9, 2009 at 4:19 AM, Joakim Tjernlundjoakim.tjernl...@transmode.se wrote: I wonder if this hides another problem too. if the timeout hits, -1 is returned. Then in i2c_read()/i2c_write() you have:        if

Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-10 Thread Joakim Tjernlund
Timur Tabi ti...@freescale.com wrote on 10/09/2009 15:07:36: Joakim Tjernlund wrote: BTW, the fdr and dfsr calculations appears totally bogus. It seems like the table is taken from some examples in AN2919 and it is pure luck that it works most of the time. For me it does not work 100

Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-10 Thread Joakim Tjernlund
Timur Tabi ti...@freescale.com wrote on 10/09/2009 15:29:35: Joakim Tjernlund wrote: A while back, someone posted a version of this code that computed the values of fdr/dfsr. I nack'd that patch because I thought the algorithm was too Not so sure about that, but I haven't tried

Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-10 Thread Joakim Tjernlund
Timur Tabi ti...@freescale.com wrote on 10/09/2009 15:29:35: Joakim Tjernlund wrote: A while back, someone posted a version of this code that computed the values of fdr/dfsr. I nack'd that patch because I thought the algorithm was too Not so sure about that, but I haven't tried

Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-10 Thread Joakim Tjernlund
Timur Tabi ti...@freescale.com wrote on 10/09/2009 17:22:38: Joakim Tjernlund wrote: Come on, just because my board is somewhat broken, it doesn't mean the driver is correct. If I define my speed to 100KHz I get a DFSR of 22, way over what is allowed for my board. Why is a value of 22

Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-10 Thread Joakim Tjernlund
Timur Tabi ti...@freescale.com wrote on 10/09/2009 17:26:29: Joakim Tjernlund wrote: Looking a bit harder at the table I don't understand some entries, where does the entries with dfsr != 1 come from? They don't look like any table in AN2919 They're all calculated. I entered

Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-10 Thread Joakim Tjernlund
Timur Tabi ti...@freescale.com wrote on 10/09/2009 18:13:03: Joakim Tjernlund wrote: This calculation does not seem to match AN2919. When I wrote the code, AN2919 was much smaller than what you have today. Suppose one used only Table 7(almost what we have if you exclude dfsr!= 1) Table

Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-10 Thread Joakim Tjernlund
Timur Tabi ti...@freescale.com wrote on 10/09/2009 18:13:03: Joakim Tjernlund wrote: This calculation does not seem to match AN2919. When I wrote the code, AN2919 was much smaller than what you have today. Suppose one used only Table 7(almost what we have if you exclude dfsr!= 1) Table

Re: [U-Boot] PowerPC -mrelocatable

2009-09-09 Thread Joakim Tjernlund
Dear Peter, In message 1252426573.6005.253.ca...@localhost.localdomain you wrote: Going over the emails and my own testing, it looks the following versions worked: ... Thanks for the detailed analysis. I remember that gcc-3.4.x has always been marked as suspicious in our tests, so

[U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-09 Thread Joakim Tjernlund
I wonder if this hides another problem too. if the timeout hits, -1 is returned. Then in i2c_read()/i2c_write() you have: if (i2c_wait4bus() = 0 i2c_write_addr(dev, I2C_WRITE_BIT, 0) != 0 __i2c_write(a[4 - alen], alen) == alen) i = 0; /* No error

Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-09 Thread Joakim Tjernlund
timur.t...@gmail.com wrote on 09/09/2009 16:24:15: On Wed, Sep 9, 2009 at 4:19 AM, Joakim Tjernlundjoakim.tjernl...@transmode.se wrote: I wonder if this hides another problem too. if the timeout hits, -1 is returned. Then in i2c_read()/i2c_write() you have:        if (i2c_wait4bus()

Re: [U-Boot] [PATCH] 85xx: Fix the wrong SYS_CLK_IN for 8569MDS

2009-05-18 Thread Joakim Tjernlund
The SYS_CLK_IN of MPC8569MDS is 66.66MHz, The DDR_CLK_IN is same with SYS_CLK_IN in 8569 processor. so, change the SYS_CLK_IN from 66MHz to 66.66MHz. Signed-off-by: Dave Liu dave...@freescale.com --- include/configs/MPC8569MDS.h |4 ++-- 1 files changed, 2 insertions(+), 2

[U-Boot] Hard SPI broken on mpc832x?

2009-05-04 Thread Joakim Tjernlund
I get this when compiling on a fairly recent u-boot: mpc8xxx_spi.c: In function `spi_init': mpc8xxx_spi.c:70: error: syntax error before '*' token mpc8xxx_spi.c:76: error: `spi' undeclared (first use in this function) mpc8xxx_spi.c:76: error: (Each undeclared identifier is reported only once

Re: [U-Boot] PCI on mpc832x?

2009-04-29 Thread Joakim Tjernlund
Kumar Gala ga...@kernel.crashing.org wrote on 27/04/2009 16:12:35: From: Kumar Gala ga...@kernel.crashing.org To: Joakim Tjernlund joakim.tjernl...@transmode.se Cc: Scott Wood scottw...@freescale.com, u-boot@lists.denx.de Date: 27/04/2009 16:15 Subject: Re: [U-Boot

Re: [U-Boot] PCI on mpc832x?

2009-04-29 Thread Joakim Tjernlund
Kumar Gala ga...@kernel.crashing.org wrote on 29/04/2009 14:35:19: I think I got the mapping of memory space now, thanks. A few questions though. I have noted that some boards map the PCI IO space to 0x0 and some use the same address space as the CPU. If I use the CPU address space

Re: [U-Boot] [PATCH] 83xx: Fix some bugs in spd sdram code

2009-03-09 Thread Joakim Tjernlund
On Wed, 25 Feb 2009 10:30:26 +0100 Joakim Tjernlund joakim.tjernl...@transmode.se wrote: 1, 2 and 5 Acked-by: Joakim Tjernlund joakim.tjernl...@transmode.se Don't understand cpo and haven't looked at 3 so I can't say anything useful. Did you test the patch on your

Re: [U-Boot] [PATCH] fsl-ddr: Fix some bugs in the ddr infrastructure

2009-02-25 Thread Joakim Tjernlund
requirement for tWTR. Reported-by: Joakim Tjernlund joakim.tjernl...@transmode.se Signed-off-by: Dave Liu dave...@freescale.com Acked-by: Joakim Tjernlund joakim.tjernl...@transmode.se ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman

Re: [U-Boot] [PATCH] 83xx: Fix some bugs in spd sdram code

2009-02-25 Thread Joakim Tjernlund
MT9HTF6472CHY-667D1 DIMMs test passed on MPC837xEMDS platform at 266MHz/333MHz/400MHz data rate. Reported-by: Joakim Tjernlund joakim.tjernl...@transmode.se Signed-off-by: Dave Liu dave...@freescale.com 1, 2 and 5 Acked-by: Joakim Tjernlund joakim.tjernl...@transmode.se Don't understand cpo and haven't

Re: [U-Boot] spd_dram.c for mpc83xx broken

2009-02-20 Thread Joakim Tjernlund
On Tue, 17 Feb 2009 20:25:03 +0100 Joakim Tjernlund joakim.tjernl...@transmode.se wrote: The spd code for mpc83xx is so broken it isn't funny. This is what I had to do to get my Micron MT47H64M16-3. This isn't against current u-boot, but it is a start. well it applies

Re: [U-Boot] spd_dram.c for mpc83xx broken

2009-02-18 Thread Joakim Tjernlund
Kim Phillips kim.phill...@freescale.com wrote on 18/02/2009 02:35:50: On Tue, 17 Feb 2009 20:25:03 +0100 Joakim Tjernlund joakim.tjernl...@transmode.se wrote: The spd code for mpc83xx is so broken it isn't funny. This is what I had to do to get my Micron MT47H64M16-3. This isn't

<    2   3   4   5   6   7   8   >